This moves the include into the file where it's used, and means I don't need
to import it into gecko-media crate yet.
MozReview-Commit-ID: JnEgtwnLxgO
--HG--
extra : rebase_source : 84f9b98e3c64dc1a337a12b714fd4c8bc45429a1
extra : source : 396e995935c6ada2a069c56cd1ede3c9ef418f31
The only actual code use in MediaSourceDemuxer can trivially be folded into
its caller GetNumberTracks in the same class.
MozReview-Commit-ID: E6zh98zmJwJ
--HG--
extra : rebase_source : 9358dc37523d6cd7c1a4d5ec62a790db6a092063
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
Move the dependent method into HLSDecoder.
Remove the class entirely.
MozReview-Commit-ID: F9eOFQvgeLQ
--HG--
extra : rebase_source : a45407d88513883245f429c5f4bd09c78bef6f10
Sub-classes should know how to pin/unpin the resource.
MozReview-Commit-ID: 50S8oSD5oEU
--HG--
extra : rebase_source : 5e1b7c657b759c0d1dfdd7b5c0a4b7dbc4077ffe
extra : intermediate-source : 3000b76a3b97c08955c2d584ac215114c8e8f59a
extra : source : a56b9846db916ff85a0cae09736c3284bd895506
We will move the implementation to sub-classes which have more details
about how to calculate the resource size.
MozReview-Commit-ID: 7lfiz5GNtPE
--HG--
extra : rebase_source : bf14ef91a6de456d65bee7cb1f53f8e542f55247
extra : source : 22640df9dd3a1491594a82b3d0bd175e46073fa3
If AddMediaElementToURITable() is called after the decoder Load failed, mDecoder
will be reset and it is sufficient to assert mDecoder only.
MozReview-Commit-ID: 58WT8zFeiFj
--HG--
extra : rebase_source : 712579b544e9a9ce971778b85795d06e58bd4ea5
extra : intermediate-source : 470e2d8a20010e11d7a7dce5540957e89439811e
extra : source : 59f4b2b33212794aa1cf3e8782737a2d4af8c241
It would be less accurate to call SetReadMode(MediaCacheStream::MODE_PLAYBACK)
in ChannelMediaDecoder::MetadataLoaded() instead of DecodeMetadataState::OnMetadataRead()
because MDSM might have started decoding by the time 'metadata loaded' event arrives
in the main thread. However this little inaccuracy should be fine since it only
affects a small amount of data concerning the eviction algorithm.
MozReview-Commit-ID: JoQMGr5Fvge
--HG--
extra : rebase_source : 3663a028522cc8b973964f62e59d7568a5eba10a
extra : source : 359b4454633432d3334a106aedb267a2451afb45
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.
MozReview-Commit-ID: EAmUEv9WQk8
--HG--
extra : rebase_source : deed5fd089e8c42a5a6ab0546e0781d0061591e5
Because GetStatistics() only makes sense for ChannelMediaResource.
MozReview-Commit-ID: HkEpb4frUx1
--HG--
extra : rebase_source : 7086721f47b381b692a165302ff3bdc13caa8b41
We can't use MediaResourceCallback since HLSDecoder will not inherit ChannelMediaDecoder.
MozReview-Commit-ID: BzKatvYU90Y
--HG--
extra : rebase_source : a3fea763ef5f484fd1e455add4e6e6c91277aff1
extra : source : a9332539c0bc1ef81286b0e119250c3fce84101b
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().
MozReview-Commit-ID: Ch7Saha6zdi
--HG--
extra : rebase_source : 8562faa56d1f31797643ed0f7ae550765d8c86d7
extra : intermediate-source : 05b50517cc40f2adf06facfccea628488dd319da
extra : source : d5af89f5a09e03c8fbb0d6111f88e3221f3a1d57
1. Pause the Exoplayer when navigating to another page and resume playback when navigating back.
2. Fix the OOM issue.
MozReview-Commit-ID: 5UGmBzpObsb
--HG--
extra : rebase_source : f8f268612687669e1b31881465600b02b3531c55
So we can reduce dependency on AbstractMediaDecoder.
See bug 1378295 comment 1 for the detail.
Note it is not ideal to repeat |init.mCrashHelper = ...| several times in
this patch. We will re-visit it to reduce code duplication after bug 1378295
is done.
MozReview-Commit-ID: AEC56ukqtYr
--HG--
extra : rebase_source : 07554566af74b65f391811e55847e58365ac81fe
extra : source : 7f613117f815369f65256408b221131683c0dd82
1. Moving UpdateA/VInfo to HLSTrackDemuxer and related changes.
2. Handle audio format change by changing the stream id.
MozReview-Commit-ID: IJmSvygZLVf
--HG--
extra : rebase_source : fb90c1454f20ff930626b6febf74b7cb0c4d20b9
It would be handy we want to pass more data to the constructor.
MozReview-Commit-ID: 3AUUsTbv534
--HG--
extra : rebase_source : 8d230c85addf1ba296e6a0512f0d18ebd41c0d17
extra : source : e6568e9fa24f52c59baecaa16aa044b492f407fb
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.
MozReview-Commit-ID: 3RM66uTvYSc
--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
Note we remove the call to mChannel->SetContentType() from RecreateChannel().
The hint never works as expected for [1] is the only caller to
nsIChannel::GetContentType() and MediaResource::Create() always happens
before any reads from the resource.
[1] http://searchfox.org/mozilla-central/rev/b425854d9bbd49d5caf9baef3686e49ec91c17ec/dom/media/MediaResource.cpp#1500
MozReview-Commit-ID: 1n4yHEouCjC
--HG--
extra : rebase_source : 9a7345c29b985ddee7a90a94191e9d526e2a0a67
extra : source : 054d9ffaf21eb937a6349df76228269ad2d7dc2c
Also remove CanClone() overrides that are identical to that of the base class.
MozReview-Commit-ID: A0Q5ychQtso
--HG--
extra : rebase_source : 3369558a8e6bc9f86ab6dcdc39fe40f686041001