As well as the obvious #ifdefs, this allows DOMHwMediaStream to be
removed, and also the "phone-state-changed" observer.
--HG--
extra : rebase_source : 373280183e228bd4b9bd9d866959409f2444c77e
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
Updates to Chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.
Adds Verified Media Pipeline function definitions.
MozReview-Commit-ID: 2H8mMNacQqR
--HG--
extra : rebase_source : d544d6a0c6854ccc29da6ddcc11b4efc8f621036
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.
Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.
MozReview-Commit-ID: bYH3OBSzuT
--HG--
extra : rebase_source : cfc291b3452c2154ecd1ca16a2ece0a5a42f0b5e
We waited 30s until we changed readyState to HAVE_ENOUGH_DATA this would cause autoplay media element to start rather late. In particular with live stream. 10s is typically enough ahead time to start playback.
MozReview-Commit-ID: LJvY8cQYfwZ
--HG--
extra : rebase_source : 4c75326891ba4e9317c432ea7074eb033a77b300
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
AudioEndTime() returns 0 if the media sink is not started. This is wrong
because the audio/video end time should be at least the current position
to ensure playback won't go backwards.
http://searchfox.org/mozilla-central/rev/bbc1c59e460a27b20929b56489e2e55438de81fa/dom/media/MediaDecoderStateMachine.cpp#2009-2012
This fix the case where we wrongly set playback position to 0 after seeking
to the end of resource.
MozReview-Commit-ID: 2VnTcqyIvoJ
--HG--
extra : rebase_source : 3abb59053952c018b1bff8c442450e98845a4947
extra : source : 3dc1a61d32e5be587f5f6892217fe9fe25ca533b
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
We pretty much rewrite the whole logic of duration calculation of MDSM.
The new logic is much simpler for we have only one duration to manage
which is mDuration. Below is the details of the code changes:
1. remove the mExplicitDuration mirror since it should be handled in MediaDecoder.
2. remove mObservedDuration and mDuration will take its place.
3. mDuration is updated from:
a. metadata
b. playback position as playback progresses.
c. buffer ranges.
4. change mDuration to be finite when playback reaches the end.
MozReview-Commit-ID: 1EmlWvmw1R2
--HG--
extra : rebase_source : 54110160af6e167cdb59b24e1c6be7901bf56269
extra : source : 6325e6ae2319cae62e4c08cfc38706c9ac056842
We will let MediaDecoder do the final adjustment.
MozReview-Commit-ID: NmPD3Cgsta
--HG--
extra : rebase_source : 97f15f7ec330706edb7651c52e2eef128ac427f6
extra : source : 45e94e9edc423de6d53776b70c9c25cc9f40ce30
The implementation will be shared by most of the sub-classes except OggDecoder
which needs to call demuxer->SetChainingEvents().
http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/dom/media/ogg/OggDecoder.cpp#25
This helps reducing code changes whenever we add a field to MediaFormatReaderInit.
MozReview-Commit-ID: 5K8NY1oxol4
--HG--
extra : rebase_source : 7bc2a71ad9bd982ada51fd28d6a5b7c6f1d7395a
extra : source : cccd49795938ce53cd8eee597ec0ea4859543c37
This does two things:
- Stop calling the callback when initializing cubeb prefs callback, see the
comment block for the rationale.
- Change the pref name so that the problem does not continue to be triggered
with users that have the old pref name in their profile.
MozReview-Commit-ID: 9Ty7Mt9WZpP
--HG--
extra : rebase_source : 1ed504be98c279f54a1a6c4168709b3ba78103e5
They are no longer supported and can't work with API >= 16
MozReview-Commit-ID: JkftKxW5OtY
--HG--
extra : rebase_source : 6ed4032141add293d21354640c96fc75adc565d9
Bug 1326294 is fixed and we don't need the debug code anymore.
This help reduce the coupling with HTMLMediaElement and make MediaDecoder
easier to be reused by Servo.
MozReview-Commit-ID: KCwAjoQFPkS
--HG--
extra : rebase_source : 0c98899f63edb5971ddecb812635c9a6f693d448
Only suspend decoding when the pref is on, but resuming could be done when the
pref is off.
MozReview-Commit-ID: JDh1pRXNhc8
--HG--
extra : rebase_source : 1a075c9eff5abe0eae7bd929d9c632d5b49a63be
Updates to Chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.
Adds Verified Media Pipeline function definitions.
MozReview-Commit-ID: 2H8mMNacQqR
--HG--
extra : rebase_source : dc91151c5ffe94f59346b9f4cbab587e6c0701a3
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.
Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.
MozReview-Commit-ID: bYH3OBSzuT
--HG--
extra : rebase_source : d062d233c9a2b59aa5ae5c6e0584ed13b7c83e6e
Note we will move OnDecodeWarning() from MDR to MFR when removing MDR.
MozReview-Commit-ID: 92jpwy6ghH2
--HG--
extra : rebase_source : 72e84f364cdab589efe60e70a071816cb4404955
extra : intermediate-source : fc7ff704e2096935b949ed8b9f6e73945db56a79
extra : source : 6e65a382de5de478948d434fc238a6afe231d2ac
Note we put OnWaitingForKey() in MediaDecoderReader for MediaDecoder references
MDR instead of MFR. The function will be moved into MFR when we remove MDR and
have MediaDecoder reference MFR instead.
MozReview-Commit-ID: LBGfGmc6yFm
--HG--
extra : rebase_source : 473c95cf6eb5e7e4065f9c1251af7dacb78538a5
extra : intermediate-source : 85981e2bafa1047f8321c02de6f0726c32506811
extra : source : 5203bf6895273701ef36a81d2e827e7a7c219fdb
We will use MediaEventSource to plumb the event from MFR to the media element.
MozReview-Commit-ID: 4gaEx7vYybE
--HG--
extra : rebase_source : fd595399e2db4e76ad117636768e160c2f054775
extra : intermediate-source : 1fc86c40dc83e79306c721b1acb0f31803181509
extra : source : d24b62a6041966b2639e5543c9ecccc4f7656a0d
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
We will use MediaEventSource to dispatch the 'encrypted' events.
MozReview-Commit-ID: KY3nS9OrysI
--HG--
extra : rebase_source : 4e1fa125b099567426f5a6ea2c825b77d407b2c4
extra : source : 8413b0625159d85a5814cb3bd748121653735e96
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
This patch is going to loose the criteria of skip-to-next-key-frame.
The original rules are here:
http://searchfox.org/mozilla-central/rev/31311070d9860b24fe4a7a36976c14b328c16208/dom/media/MediaFormatReader.cpp#1559
Skip-to-next-key-frame is triggered if the playback position is LARGER than the next key frame time.
But, from the video-track point of view, when the skip-to-next-key-frame is triggered, it skips to the next-next key frame.
Here is an example, say, we are playing a media file with its playback position at time _a_,
and its video decoding is falling behind at time _v_.
The next key frame is at time _k1_ and next-next key frame is at time _k2_.
a
----|---------|---------|-------------|----------------> time
v k1 k2
When the playback position _a_ passes _k1_ (_a_ > _k1_), the skip-to-next-key-frame is triggered,
and the demuxer jumps to _k2_ directly.
The idea here is to give a chance when (_a_ == _k1_), let demuxer jump to _k1_ and see if the video decoding could catch up.
MozReview-Commit-ID: 6aRSYDOI1ds
--HG--
extra : rebase_source : c448df7af9f83b9127bad9bae28f353b40669b7f
So we can remove AbstractMediaDecoder::CanonicalDurationOrNull() later.
MozReview-Commit-ID: 6zJCFDsCZPC
--HG--
extra : rebase_source : 66af1674651667a2ab9e82b85e5c730f8eb5c227
extra : intermediate-source : 6c5eccd5fc68bf663e1ffa9d5b57c5a2a2721b14
extra : source : 4b30670e2d75260b21fa953f9c7219e3e485c396
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
Retrieve pref from MediaPrefs, which is more efficient than
Preferences::GetInt().
Also refactored computations to avoid unnecessary type conversions.
MozReview-Commit-ID: Ii27lthRRNI
--HG--
extra : rebase_source : d1ea46060cd2c35b7fd07a191184c0318187c080
MP4TrackDemuxer::GetNextSamples set mExtraData and it should be valid. This sample will later be rejected by the H264Converter.
The case would also fail if the video codec was VP9.
MozReview-Commit-ID: 5nXoRFJ6ntx
--HG--
extra : rebase_source : 76bfac15373fdccb3f2286bd3cd0999236509e1e
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.
MozReview-Commit-ID: 3RM66uTvYSc
--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
Note MediaDecoderReader::GetBuffered() accesses mResource which is null
when it is actually a MediaFormatReader. However, it is OK for MediaFormatReader
will override UpdateBuffered() and will never call GetBuffered().
MozReview-Commit-ID: 5qcH4PHDzin
--HG--
extra : rebase_source : acb3ef2d981509a397045110cbb7cbecba8d5bee
extra : source : 5f66ecf33bfaecceaab8d9020175e26c5ca5cd1b
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.
MozReview-Commit-ID: BnOjHzmOSKn
--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.
MozReview-Commit-ID: 94slLTkNk3C