An interesting intermittent condition not previously handled.
We were incorrectly assuming that we always had a decode promise pending when a drain was requested.
If a change of content occurred when resuming from a waiting for data condition: we would have stalled forever as the waiting promise would never have been resolved even after new data was appended.
MozReview-Commit-ID: BQSRSHYqTSe
--HG--
extra : rebase_source : e091969ce35728cd3ded40161eaaa117df2c6886
https://hg.mozilla.org/mozilla-central/file/34c6c2f302e7b48e3ad2cec575cbd34d423a9d32/dom/media/MediaFormatReader.cpp#l2835
NotifyDataArrived() is dispatched again if |mNotifyDataArrivedPromise.Exists()| which will then be dispatched again
recursively until mNotifyDataArrivedPromise is completed. This is a waste of CPU cycles.
We can use a dirty flag to note we should update buffer ranges again when the current update is done.
MozReview-Commit-ID: 6hInhGKnXJE
--HG--
extra : rebase_source : 71aa2c16112428c34def094515e37aa1f028a3fc
An interesting intermittent condition not previously handled.
We were incorrectly assuming that we always had a decode promise pending when a drain was requested.
If a change of content occurred when resuming from a waiting for data condition: we would have stalled forever as the waiting promise would never have been resolved even after new data was appended.
MozReview-Commit-ID: BQSRSHYqTSe
--HG--
extra : rebase_source : a608377b935427faa7cd8042d0226e64e86e17b9
The next run of Update would have cleared the mWaitingForKey flag, may as well do it early.
MozReview-Commit-ID: DXiqSDAxnnz
--HG--
extra : rebase_source : ecdaaab1560d3e4637bbc05689cb9ab91294ae7c
into TrackInfoSharedPtr to better indicate what this class is about.
Adding cast operator to allow transparent conversion from TrackInfoSharedPtr to const TrackInfo*
MozReview-Commit-ID: 6RwXl5CG0fG
--HG--
extra : rebase_source : b5a7a0f06793c609e2eab60aacc4f76d96d6ec32
We now use a generic state rather than various booleans.
We handle partial drains better too.
MozReview-Commit-ID: AJSTcJivfEm
--HG--
extra : rebase_source : 26386cea20b97f1f76df829241b091ba837b301a
This is a big change, and unfortunately impossible to break down with independently functional commits.
There are four main changes being applied here:
* Code cleanup, including making all MediaDataDecoder related code mozilla coding style compliant
* Make MediaDataDecoder use MozPromise
* Making Flush and Shutdown processes fully asynchronous
* Fixing few data races encountered across the code, in particular in the Android PDM
MozReview-Commit-ID: DpiZucGofJT
--HG--
extra : rebase_source : 80bd6c6f9726d536b6f306c40d9af6df27333be9
This is not compatible with promise based decoders. We'll re-implement it in a different fashion later on.
MozReview-Commit-ID: HYBNKVxEUmB
--HG--
extra : rebase_source : fe9f26e47b77a64099a422be844d20f4108663d0
We runs all demuxing operations on a dedicated task queue.
MediaDataDemuxer's members using a synchronous API are handled via thread-safe copy that are updated along the operations.
The buffered range calculation is now handled separately and the entire operation is made asynchronous.
MozReview-Commit-ID: Gd4DCC8Ix6n
--HG--
extra : rebase_source : b90bad0a386c2a1e30acc00e3db9db6b6762aa3b
We runs all demuxing operations on a dedicated task queue.
MediaDataDemuxer's members using a synchronous API are handled via thread-safe copy that are updated along the operations.
The buffered range calculation is now handled separately and the entire operation is made asynchronous.
MozReview-Commit-ID: Gd4DCC8Ix6n
--HG--
extra : rebase_source : 6a18ce2552bf4cbf88e9b8db1c9a87e70623fd15
We runs all demuxing operations on a dedicated task queue.
MediaDataDemuxer's members using a synchronous API are handled via thread-safe copy that are updated along the operations.
The buffered range calculation is now handled separately and the entire operation is made asynchronous.
MozReview-Commit-ID: Gd4DCC8Ix6n
--HG--
extra : rebase_source : fb157f58e38c2f3199ed96095634bf8e4ab6065b
Because it will change the ref-count which might cause destructor to run before exiting the constructor.
MozReview-Commit-ID: MMIea970Dv
--HG--
extra : rebase_source : faf898a3107706bc0ea750e738d8c3a7a3824264
Bug 1313635 ensures buffer ranges are updated before resolving metadata.
So we can revert the changes in bug 1251460.
MozReview-Commit-ID: Ek0sgPpv92s
--HG--
extra : rebase_source : 79b457167d5b987280083364afe31b31860b48fe
extra : intermediate-source : 9205ca61bb2255e33744af7ec4e13059f275960c
extra : source : 14d155274dc4e0d2daa8a90b1bbb15f975d7ac24
Thanks to this, MediaDecoderReader::Seek and overrides can take SeekTarget by
const&.
MozReview-Commit-ID: C5D26jKrW3p
--HG--
extra : rebase_source : 6f6278654ff3c51f6331cbf683c22622223a8cd2