Граф коммитов

1181 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini b0b73ddd29 Bug 1388125 - CloneableWithRangeMediaResource for streams implementing nsICloneableInputStreamWithRange, r=jya 2017-09-18 13:34:43 +02:00
Gerald Squelart 7dbe315e25 Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Its return value is never used, and most implementations return nullptr anyway.

MozReview-Commit-ID: 8rxC053mmE8

--HG--
extra : rebase_source : 61a0b8b1373396182efd27d3c01b96e5e5541364
2017-02-09 14:06:36 +11:00
Jean-Yves Avenard 9349efba14 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc

--HG--
extra : rebase_source : 918cf87b2ce82c8de245dcb23cc359289ac5f21f
2017-09-04 11:27:43 +02:00
Kilik Kuo 216e7acf63 Bug 1393336 - Remove WaitForCDM state from MDSM. r=jwwang,jya
MozReview-Commit-ID: 7XofvBZTerH

--HG--
extra : rebase_source : 99a7c9459bf1c3f0fe8a27e57595d8bebf8ac9c3
2017-08-25 17:11:14 +08:00
JW Wang b8ff3673d9 Bug 1391142. P2 - remove MDSM::mResource and related functions. r=gerald
MozReview-Commit-ID: 4od7b8YNrMh

--HG--
extra : rebase_source : 2a471cc2e8049f98e65b96af626a00de4e4919f4
extra : source : a8dd8625a688555448cdc4c5429a23278e3e21c4
2017-08-17 11:52:29 +08:00
JW Wang b5f3c097c3 Bug 1391142. P1 - dispatch IsLiveStream changes from MediaDecoder to MDSM. r=gerald
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
2017-08-17 11:48:08 +08:00
JW Wang 9bfb2b1c06 Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB

--HG--
extra : rebase_source : 8c1fc9b4da08290f7a177ef60793c831b0cc7a25
extra : intermediate-source : a86b94e4bdc04bae34f6e8966dfe9b5e11f98677
extra : source : 498e2844d2d0d1cee087552f5aaf5aac7e34c3bf
2017-08-16 15:37:29 +08:00
JW Wang 6ce3e3224c Bug 1390443. P1 - don't change nextFrameStatus when MDSM reaches the end of playback. r=cpearce
Instead, MediaDecoder::NextFrameStatus() checks IsEnded() and returns
NEXT_FRAME_UNAVAILABLE to ensure we have HAVE_CURRENT_DATA when playback
is ended on the main thread.

This will fix the timing issue (comment 0) which causes 'waiting' to fire.

MozReview-Commit-ID: 7O21x2q0lb8

--HG--
extra : rebase_source : bbd898edfb5f4a47a5062dd2bc916c911caf0c8e
extra : intermediate-source : 2b3e413db02a7aad00d13fdf274b346bccafc414
extra : source : 6f60fad11b65e75b456e128f8414fe2ea545455f
2017-08-16 15:33:58 +08:00
Sebastian Hengst b3764d9e0a Backed out changeset 4f8ac9b281da (bug 1390443) for failing web-platform-tests, e.g. /encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState.html. r=backout 2017-08-21 10:20:24 +02:00
Sebastian Hengst 9d63faba53 Backed out changeset 05b2bf2e6017 (bug 1390443) 2017-08-21 10:19:39 +02:00
JW Wang a7f1c5d69b Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB

--HG--
extra : rebase_source : 3cad2f2df2f75d6b052cbc6e6f5623ba9c587987
extra : intermediate-source : a86b94e4bdc04bae34f6e8966dfe9b5e11f98677
extra : source : 498e2844d2d0d1cee087552f5aaf5aac7e34c3bf
2017-08-16 15:37:29 +08:00
JW Wang a69873c9a9 Bug 1390443. P1 - don't change nextFrameStatus when MDSM reaches the end of playback. r=cpearce
Instead, MediaDecoder::NextFrameStatus() checks IsEnded() and returns
NEXT_FRAME_UNAVAILABLE to ensure we have HAVE_CURRENT_DATA when playback
is ended on the main thread.

This will fix the timing issue (comment 0) which causes 'waiting' to fire.

MozReview-Commit-ID: 7O21x2q0lb8

--HG--
extra : rebase_source : 0a676ef7278214a707c97687311a73da8bcd983e
extra : intermediate-source : 2b3e413db02a7aad00d13fdf274b346bccafc414
extra : source : 6f60fad11b65e75b456e128f8414fe2ea545455f
2017-08-16 15:33:58 +08:00
JW Wang f8ee5803f8 Bug 1388669. P2 - also rewrite the entry condition of buffering state. r=gerald
For the same reason as P1, we check mCanPlayThrough instead of IsExpectingMoreData().

MozReview-Commit-ID: FZAcWyJmaK6

--HG--
extra : rebase_source : 41e0918fea8d0fad8d3709701f5d39199a42db47
extra : intermediate-source : 89042ba53de0ca4694ef5b201d50ffb643ab6d1a
extra : source : c747849a17e84e9c9fcf01604633e85364aa824a
2017-08-09 17:45:12 +08:00
JW Wang 26c5347e05 Bug 1388669. P1 - rewrite the exit condition of BufferingState::Step(). r=gerald
Note we don't check MediaResource::IsLiveStream/IsExpectingMoreData()
for they should be included in the CanPlayThrough condition. This allows
us to remove some methods from MediaResource.

MozReview-Commit-ID: JtmRg9VeqGv

--HG--
extra : rebase_source : 5bd77047e6413af1b88776fea74eca6bc6f1c3cf
extra : intermediate-source : 9557cc7e094367075bd262e4eac8454e610c8f8b
extra : source : 514014bfc85a79590bbc2bd5a8101162637708cc
2017-08-09 17:20:53 +08:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
JW Wang c1f09cc606 Bug 1388665 - remove BufferingState::DispatchDecodeTasksIfNeeded(). r=kaku
We will dispatch decoding tasks in Handle{Audio,Video}Decoded() instead.
See comment 0 for the rationale.

MozReview-Commit-ID: 9trJYoMfzJH

--HG--
extra : rebase_source : 0fae6eda31571d34268f2dba58a8e5f6cf0dadc9
extra : source : 275964a63b741e4ac0258e714f54f43d5cc6ae0b
2017-08-09 16:56:41 +08:00
JW Wang 32951f4824 Bug 1388604 - move SetReadMode() from MediaResource to BaseMediaResource. r=gerald
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
2017-08-09 11:06:29 +08:00
Matthew Gregan 89fde0ce0f Bug 1388236 - Remove B2G-only AudioChannel code from media playback. r=jwwang 2017-08-10 13:00:07 +12:00
Matthew Gregan f4d992a821 Bug 1388229 - Remove B2G-only audio stream type handling. r=kamidphish 2017-08-10 13:00:07 +12:00
JW Wang 303f74001a Bug 1388228. P3 - following P2, we can now remove unused code and canonicals. r=gerald
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
2017-08-04 17:56:28 +08:00
JW Wang b4e54281c9 Bug 1388228. P2 - cache the result of CanPlayThrough() and mirror it to MDSM. r=gerald
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
2017-08-04 17:38:20 +08:00
Alastor Wu c3e56a33cd Bug 1367983 - correct comment. r=jwwang
We still need to keep the resource on Android, otherwise the frame we render would be wrong.

MozReview-Commit-ID: 2d6sfIuhfWY

--HG--
extra : rebase_source : f509027bd8d225de2d65c59510650a178038a2ff
2017-08-07 15:48:49 +08:00
Sebastian Hengst 765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Bill McCloskey 2273c53b75 Bug 1364821 - Introduce AbstractThread::AutoEnter and remove main thread's AbstractThread::GetCurrent() (r=jwwang)
MozReview-Commit-ID: FSLVn7xe3sq
2017-08-03 14:19:02 -07:00
JW Wang c7c29fe527 Bug 1385699. P5 - fix AudioEndTime() and VideoEndTime(). r=cpearce
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
2017-08-02 18:00:00 +08:00
JW Wang 42dab72def Bug 1385699. P2 - rewrite the code of calculating duration in MDSM. r=cpearce
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
2017-08-01 13:54:14 +08:00
JW Wang b2911ee198 Bug 1385699. P1 - don't adjust playback position to the duration in MDSM at the end of playback. r=cpearce
We will let MediaDecoder do the final adjustment.

MozReview-Commit-ID: NmPD3Cgsta

--HG--
extra : rebase_source : 97f15f7ec330706edb7651c52e2eef128ac427f6
extra : source : 45e94e9edc423de6d53776b70c9c25cc9f40ce30
2017-08-01 11:00:09 +08:00
JW Wang 2bd8e28bd6 Bug 1385748. P2 - remove MDSM::mNextPlayState. r=kaku
Following P1, mNextPlayState is no longer used.

MozReview-Commit-ID: 5ABEYMQ5G9l

--HG--
extra : rebase_source : f4cfb050ae19625bc8f6e54f33bb4f0f4e53d059
2017-07-31 10:17:36 +08:00
Kaku Kuo 2c2253d77b Bug 1383653 P1 - add debug messages for understanding the status of suspending video decoder; r=jwwang
MozReview-Commit-ID: 2pI6XRQQgbG

--HG--
extra : rebase_source : 68a11362750227812602c07dbcfb7685eb7eb438
2017-07-24 13:21:35 +08:00
JW Wang b9cda6f285 Bug 1384836 - rename MediaDecoderReaderWrapper to ReaderProxy. r=kaku
MozReview-Commit-ID: 7WeNblTnTCG

--HG--
rename : dom/media/MediaDecoderReaderWrapper.cpp => dom/media/ReaderProxy.cpp
rename : dom/media/MediaDecoderReaderWrapper.h => dom/media/ReaderProxy.h
extra : rebase_source : a03573610a8d375fa30b89d90cdf4dc9a4ea3441
2017-07-27 14:49:57 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Carsten "Tomcat" Book aed9eeee06 Backed out changeset 42667c5ba946 (bug 1367983) for causing bug 1383673 2017-07-25 10:33:44 +02:00
Alastor Wu fbe625863b Bug 1367983 - revert the change of bug1367980. r=jwwang
In bug1371202, it has already implemented what I want to do, so remove the
change in bug1367980.

MozReview-Commit-ID: LoH51bBDTqr

--HG--
extra : rebase_source : 9fd77acae81f94e45f0f840775c81509e85c4ad0
2017-07-24 10:07:30 +08:00
JW Wang 87a7705558 Bug 1316211. P16 - remove MediaDecoderReader completely and fix includes. r=gerald
MozReview-Commit-ID: AGNyyh4kt3e

--HG--
extra : rebase_source : 48bfd7c681693a965848078c19ac81707ac19540
extra : source : 093ff5fe2ab6dd7551453b10b480fa3553ec135d
2017-07-20 09:56:08 +08:00
JW Wang 2e40eb607f Bug 1316211. P14 - move members from MDR to MFR. r=gerald
MozReview-Commit-ID: EwdteoEY1uS

--HG--
extra : rebase_source : 2cc250720539ba6c1682efac69d3724164338137
extra : source : d4cc3de1ae224bdca414cd02f4d3473c44fe4d20
2017-07-19 17:34:05 +08:00
JW Wang 5370eb3105 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a

--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
2017-07-19 17:01:32 +08:00
JW Wang afcae477f6 Bug 1316211. P8 - fix MDSM::SizeOf{Audio,Video}Queue which should count its own queues. r=gerald
MozReview-Commit-ID: HMtkZpMSf3L

--HG--
extra : rebase_source : d533689da3e0678488638a84f1747f80586900b2
extra : source : a6e1edb69b3c88abd8cd4428ab227dbb9bbaf5a3
2017-07-19 15:02:33 +08:00
JW Wang 39d88e8d8b Bug 1316211. P5 - remove IsAsync() and its callers. r=gerald
MozReview-Commit-ID: CT2gyEak2Qz

--HG--
extra : rebase_source : 205bf82c8abe7da9026bff6daab7562a5981ea39
extra : source : a6a543c1d90133036caada487799cac064e2f3f3
2017-07-19 14:24:35 +08:00
JW Wang 2f7cce7073 Bug 1316211. P4 - remove CheckSlowDecoding() and friends since IsAsync() now always returns true. r=gerald
MozReview-Commit-ID: 3dOa0aUQ0kM

--HG--
extra : rebase_source : 3091fc002b28bd9d2b45c330a45c437032c4cf18
extra : source : b6fe47f3e125097d8d5c6dd322c948b6c483980a
2017-07-19 14:19:40 +08:00
Alastor Wu 80f58a3d1e Bug 1381376 - only suspend decoding when the pref is on. r=jwwang
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
2017-07-17 18:38:35 +08:00
Kaku Kuo 5547aba3cd Bug 1378691 P4 - skip to next key frame if the playback position is very close to it; r=jwwang
MozReview-Commit-ID: Gm0iZAHVLpS

--HG--
extra : rebase_source : e1bc9da5b809cba474983b804085dca21473b3ac
2017-07-12 17:03:45 +08:00
Kaku Kuo 04ba592fac Bug 1378691 P2 - trigger skip-to-next-key-frame if the video decoding is too slow; r=jwwang
MozReview-Commit-ID: B0stJG3eOKU

--HG--
extra : rebase_source : 16cecd28bd6a5422135aa7700f3664bb9b5fd1c6
2017-07-11 09:59:13 +08:00
Kaku Kuo a1b039d4a5 Bug 1378691 P1 - drop video until catch up playbak position for video-only seek; r=jwwang
MozReview-Commit-ID: 86BhQDbM7xV

--HG--
extra : rebase_source : 105ad54c3ab5c659ebcbda539beb480a93a66aa5
2017-07-11 09:56:09 +08:00
JW Wang 031b3932fc Bug 1378631. P1 - move the duration mirror from MediaDecoderReader to MediaDecoderReaderWrapper. r=jya
So we can remove AbstractMediaDecoder::CanonicalDurationOrNull() later.

MozReview-Commit-ID: 6zJCFDsCZPC

--HG--
extra : rebase_source : 66af1674651667a2ab9e82b85e5c730f8eb5c227
extra : intermediate-source : 6c5eccd5fc68bf663e1ffa9d5b57c5a2a2721b14
extra : source : 4b30670e2d75260b21fa953f9c7219e3e485c396
2017-07-06 11:45:02 +08:00
Kaku Kuo e7f547e34c Bug 1378084 P1 - resume to somewhere forward; r=jwwang
MozReview-Commit-ID: 6PgkNVTljlU

--HG--
extra : rebase_source : 4a898c2127fe3d1be6ce70c8a975b3b0353439d7
extra : intermediate-source : bf7f887361bf7d3f931c0d19f35c551d570d81ad
extra : source : fa7a3fd17f9374f0c66d54921b9024062ddc1bdd
2017-07-03 15:14:53 +08:00
Kaku Kuo ac1c695e0d Bug 1378085 P8 - always dispatch VideoOnlySeekCompleted at VideoOnlySeekingState::Exit(); r=jwwang
MozReview-Commit-ID: A8PzfUpJjao

--HG--
extra : rebase_source : 69a81449c3d345ebb022924ef1a5741b2f41889c
extra : intermediate-source : cd7ee0a15b0077c1b2e5665f21537716c5baec2b
extra : source : f9e00a020cafe96579bf8d9d3d1bd73fd75c91bc
2017-07-04 17:49:43 +08:00
Kaku Kuo af0fec1b1b Bug 1378085 p7 - override DoSeek(); r=jwwang
MozReview-Commit-ID: 3qSR1wXwVo1

--HG--
extra : rebase_source : 87398b8516a76e4f8edbe1f6f43609c38115cd10
2017-07-06 11:51:09 +08:00
Kaku Kuo dfa24e7c1a Bug 1378085 p6 - override HandleAudioWaited(); r=jwwang
MozReview-Commit-ID: GKXQVAYm0lz

--HG--
extra : rebase_source : 33691eea1d491c595259f021011b5dc590fd9a40
2017-07-06 11:48:42 +08:00
Kaku Kuo 68e0ba647b Bug 1378085 p5 - override HandleWaitingForAudio(), HandleAudioCanceled(), and HandleEndOfAudio(); r=jwwang
MozReview-Commit-ID: Jyw3yyutGjn

--HG--
extra : rebase_source : cb1d6b7dae6c913de906574c15f5387a42cea9c5
2017-07-06 11:47:21 +08:00
Kaku Kuo d3cf895857 Bug 1378085 p4 - override HandleAudioDecoded(); r=jwwang
MozReview-Commit-ID: BmxePYCesTF

--HG--
extra : rebase_source : c0be25b11a415e5b463841b72594bbd2de0be59b
2017-07-06 11:45:07 +08:00