The logging added in this patch was landed to help debug very rare shutdown
failures on android, but the logging runs on other platforms and is annoying.
No one is looking at fixing the rare shutdown problem on Android. So remove the
logging until fixing the shutdown failure becomes a priority.
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.
MozReview-Commit-ID: IeJJmzYqWMQ
--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
machine -> reader -> demuxer -> resource, etc.
And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)
More will be added later on, from just converting MOZ_LOGs, and as needed.
MozReview-Commit-ID: KgNhHSz35t0
--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
The WaitForDataPromise cannot be resolved even when key has been updated and decode request has be resolved.
2 ScheduleUpdate(NotifyTrackDemuxer, NotifyNewOutput) are merged into 1 so that only mReceivedNewData is set to false again but MFR will
never have a chance to trigger another Update to call CancelWaitingForKey.
By refactoring the condition to resolve the WaitForDataPromise, MDSM is able to request new data and MFR is able to cancel waitingforkey then continue the flow.
MozReview-Commit-ID: 31brwzOoUvF
--HG--
extra : rebase_source : 8caf8b426dd693e2806ebb8a059a3b91026d7f52
Capturing |this| only if |self| needs to appear more than twice in a lambda.
MozReview-Commit-ID: 38iYDznjgBH
--HG--
extra : rebase_source : 9471fd4519c5c5be6e6e10eb11db8eeb041327d1
None of our audio decoders require draining, and as all audio frames are keyframes, we can always resume decoding from where we left of when encountering a gap in the data.
The vorbis decoder always "eats" the first sample provided, causing unecessary seek and drain.
This issue will be addressed in another change.
MozReview-Commit-ID: LNd3Pz4QT4v
--HG--
extra : rebase_source : e9e2763ec8d9e933a88319f5965fc08e154347ae
Use ErrorName() as it provides more useful information for the error detail.
MozReview-Commit-ID: BQUPQGcLd8L
--HG--
extra : rebase_source : 734825c88dfbe79de1e61498dcc24606c50314ee
Print error code couldn't effectively help people understand the reason of error, we should print its name.
MozReview-Commit-ID: KaBTi8zpq91
--HG--
extra : rebase_source : 64eebd9af18fcb5062ff347464045bb9327fb716
We misused MFR::DecoderData's address as an identity in bug 1393399 but our intention was MediaDataDecoder's address.
We report telemetry data when we get the 1st decoded frame from a new MediaDataDecoder, which is identified by its address.
If we misuse the MFR::DecoderData's address as identity, it will take longer than we expect since only when
the MFR is recreated will we get a new MFR::DecoderData.
MozReview-Commit-ID: HOf5hTSoBed
--HG--
extra : rebase_source : 76731bd11eac9243a23a972f85c72203c3a3e7f1
PDMFactory::CreateDecoder may not always modify CreateDecoderParams::mError as not all PDM handle this optional return value.
MozReview-Commit-ID: K8WFA0o778U
--HG--
extra : rebase_source : 55c35ab0cb5282d8dfbd1bbc1a2e6e22d97d3209
We only process a demuxed sample at a time. Waiting until one is decoded to do the next pending ones.
MozReview-Commit-ID: JlXhyPzso8U
--HG--
extra : rebase_source : c11185ca75fd5950aa4273dd9ec03d2cf9b217ba
We unfortunately can't store this information in the VideoInfo as typically the framerate isn't found in the container's metadata. Additionally, the VideoInfo object is readable-only as it is shared across threads.
As such, we can only estimate it as we demux samples.
MozReview-Commit-ID: 5HB33ubfGAs
--HG--
extra : rebase_source : 1d6d09da76a99524422b14d50db477a9aa222da0
Don't unnecessarily, create a decoder, flush, shutdown and create a new one on the first sample.
MozReview-Commit-ID: 8utEX5JEmq8
--HG--
extra : rebase_source : e40548e7ef4ad1a8e3c57f3070a2ffc77bf81a3f
Automatic conversion (say from int to bool) makes DecoderParam difficult to extend.
MozReview-Commit-ID: G0T7jPogskN
--HG--
extra : rebase_source : 59437fd2b430ccd6be50b18c98b5a5c4ed2c8240
The default string is over 400 bytes long, it will never fit in the default 64 bytes buffer of an nsAutoCString.
MozReview-Commit-ID: 3FHPQDgCtMF
--HG--
extra : rebase_source : 13d6070acc9f29afab922d9e37c215114729aef4
This will allow to modify the string returned later.
MozReview-Commit-ID: Giw1JyukE4v
--HG--
extra : rebase_source : d126b8b956ff1f54c33a838834aee9cc6340de95
This will allow to modify the string returned later.
MozReview-Commit-ID: Giw1JyukE4v
--HG--
extra : rebase_source : d126b8b956ff1f54c33a838834aee9cc6340de95
GPUProcessCrashTelemetryLogger is used to report telemetry of the time used to recover a decoder from GPU crash.
It uses MediaDecoderOwnerID to identify which video we're dealing with.
It uses MediaDataDecoderID to make sure that the old MediaDataDecoder has been deleted and we're already recovered.
It reports two recovery times, one is calculated from GPU crashed (that is, the time when VideoDecoderChild::ActorDestory() is called) and the other is calculated from the MFR is notified with NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER error.
MozReview-Commit-ID: 82BRc2Vs3cw
--HG--
extra : rebase_source : 8c92501f625d44e9391a2432b98842769ed8a199
When GPU process crashes, the MediaDecoder, MDSM, and MFR are all destroyed.
So, we use MediaDecoderOwner to identify which video we're dealing with.
MozReview-Commit-ID: 1cv08M7Cpcf
--HG--
extra : rebase_source : 62f7be874d97a58eb4c1d7a98b4e9fe83a9313d3
The nsRect.h and nsSize.h headers typedef nsIntRect to gfx::IntRect etc, so the
rect/size objects we use will be the same, just under a different name.
However the old headers #include a bunch of things we don't use, so we if we
use the gfx objects directly we end up with a smaller include graph.
MozReview-Commit-ID: 7S4OSqBJK9m
--HG--
extra : rebase_source : 7cc48507356ce754e8395af957fa68a28711e00a