Use MediaEventSource instead of state-mirroring to notify nextFrameStatus
changes so we have more control over the order of events.
MozReview-Commit-ID: 3DGtMbghEQm
--HG--
extra : rebase_source : 774fc3da290c033769871a1bd7230177ff24d5bf
extra : intermediate-source : 6583b9281492be1a3bb0771b600cd80efd487af8
extra : source : 00570c319bfbd94970d4c637c7bf81b52d79ca02
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
This allows us to remove the dependency on MediaResource from MDSM in P2.
MozReview-Commit-ID: I46fWXfnGQK
--HG--
extra : rebase_source : 4808c7218d8c48c7425da16fadf4fd748cb2932f
extra : source : 10ac012e4c252438db1f64bb57dff181aff42a65
We have three implementations, in the MP4, WebM and MediaSource decoders. The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.
MozReview-Commit-ID: AXxn2Xhn0Jn
--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
We have three implementations, in the MP4, WebM and MediaSource decoders. The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.
MozReview-Commit-ID: AXxn2Xhn0Jn
--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
We have three implementations, in the MP4, WebM and MediaSource decoders. The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.
MozReview-Commit-ID: AXxn2Xhn0Jn
--HG--
extra : rebase_source : 63513ce3b01546142357182f21fce56932b32f7f
Following P1, cache suspend status changes will be notified when necessary.
If not, it would be a bug that should be fixed. We shouldn't wallpaper the
issue by calling NotifySuspendedStatusChanged() manually.
MozReview-Commit-ID: 9EbybTiOOIO
--HG--
extra : rebase_source : 299e22c6813f4eeb152c4d8140dc295ff856dc1e
extra : source : 2b18fe0368c6332d0b5c1e044218a26c75314124
This is a workaround to fix bug 687972. It should be OK now to remove
it since we have fix bug 1108960 where MediaCache failed to run the
update loop to update the suspend status of the stream.
MozReview-Commit-ID: MbInehhScs
--HG--
extra : rebase_source : 94345a00af31834db8b9858cdf5a9e889044156a
extra : source : 70f626894c3a15c8077f70425a97004478caa9e1
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.
MozReview-Commit-ID: EAmUEv9WQk8
--HG--
extra : rebase_source : deed5fd089e8c42a5a6ab0546e0781d0061591e5
Those members only make sense for ChannelMediaResource.
MozReview-Commit-ID: 2z6WPQeJnIT
--HG--
extra : rebase_source : 7f43635ee91c8fad1d6ad6f56788e880d54beab2
Because GetStatistics() only makes sense for ChannelMediaResource.
MozReview-Commit-ID: HkEpb4frUx1
--HG--
extra : rebase_source : 7086721f47b381b692a165302ff3bdc13caa8b41
Note we remove the log in BufferingState::Enter() which prevents us from
removing ChannelMediaResource related code from MDSM. We can add it back
in the future after the refactoring.
MozReview-Commit-ID: B94iOI0bTXC
--HG--
extra : rebase_source : 857b7420ab9b52c07dc8a917c1f9344096ed20e6
extra : source : 2c350a4f3cbdf6f446b5e1cc8d6e0892722866d0
So we don't duplicate the code of calculating CanPlayThrough from
download rate and playback rate in MediaDecoder.
MozReview-Commit-ID: 7M5JAuUxFFc
--HG--
extra : rebase_source : cb216a1af59b9d8207e3056a5d3ae05e93d85e74
extra : source : a183c089760e329508fac44239fee42c1f047b80
These members are used only by ChannelMediaDecoder.
MozReview-Commit-ID: 10CHV1sjY9k
--HG--
extra : rebase_source : 2a9817a433cd098d818399e718a5c08d6b88df4c
extra : source : 5d606d67b79543adde8580d96f5aa7055fe0286c
It is bad to call a virtual function (UnpinForSeek() -> GetResource()) in the destructor.
MozReview-Commit-ID: Db5pOHjhmQZ
--HG--
extra : rebase_source : 4e998bce930dbb18ad9b84ef33c1cb06167f2402
extra : source : e8e7ed2cdf0bf0f8f0e2d42dd045dfe1f05da28a
Since inf can be encoded in MDSM::mDuration, we don't need an additional flag
in MediaDecoder to indicate 'infinite' anymore. Note duration change from infinite
to finite is handled by MDSM, so we can remove the explicit calls to SetInfinite(false).
MozReview-Commit-ID: EoxwZJzPAJl
--HG--
extra : rebase_source : 669d7ed5b99a89b1827f60f89e0a21f08a18dedd
extra : source : a30b614784afe8772b2212728c1e4a2eac67f94b
This fixes the case where ChannelMediaResource::OnStartRequest() calls
mCallback->SetInfinite(true) to report an infinite duration, yet later
we get another duratoin from the metadata.
http://searchfox.org/mozilla-central/rev/8a61c71153a79cda2e1ae7d477564347c607cc5f/dom/media/MediaDecoder.cpp#1179-1185
Note IsInfinite() is checked before other duration sources. We need to call
SetInfinite(false) on the MediaDecoder so we can get the correct duration.
MozReview-Commit-ID: 3BlFNJzlgXo
--HG--
extra : rebase_source : 073b65cbc21f280638054b80f0cc9913a9128a18
Only send the msg "Browser:UnselectedTabHover" when someone requests for the
msg, it can reduce non-necessary communication.
MozReview-Commit-ID: 2mBUMB4AMVo
--HG--
extra : rebase_source : d7a5103e2713735fdd0f65c7de381b219f4cce26
Create the new class "BackgroundVideoDecodingPermissionObserver" to handle the
suspended request sent from the front end side.
We would do registration on startup and deregistration on shutdown of MediaDecoder.
MozReview-Commit-ID: 1UwHA7YuVN3
--HG--
extra : rebase_source : a0bc22999fbf799cd25da8ec423d9f03acc9e8e2
We will remove MediaDecoderReader in the future.
MozReview-Commit-ID: BaCRXleKK5a
--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
They are no longer supported and can't work with API >= 16
MozReview-Commit-ID: JkftKxW5OtY
--HG--
extra : rebase_source : 6ed4032141add293d21354640c96fc75adc565d9