Commit Graph
1183 Commits
Author SHA1 Message Date
Kaku Kuo 6dba484a40 Bug 1401757 part 1 - set MDSM::mMinimizePreroll to false once seekToNextFrame() is engaged; r=jwwang
MozReview-Commit-ID: KFWbOAw7dig
2017-09-28 17:57:31 +08:00
Alastor Wu aa3bb873a8 Bug 1403832 - part1 : replace Error.Code() with Error.ErrorName(). r=jya
Use ErrorName() as it provides more useful information for the error detail.

MozReview-Commit-ID: BQUPQGcLd8L
2017-09-29 00:37:45 +08:00
Andrea Marchesini 21b3e6b2ff Bug 1388125 - CloneableWithRangeMediaResource for streams implementing nsICloneableInputStreamWithRange, r=jya 2017-09-18 13:34:43 +02:00
Gerald Squelart 78a7275ca0 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
2017-02-09 14:06:36 +11:00
Jean-Yves Avenard 278692ecb6 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc
2017-09-04 11:27:43 +02:00
Kilik Kuo 0721258413 Bug 1393336 - Remove WaitForCDM state from MDSM. r=jwwang,jya
MozReview-Commit-ID: 7XofvBZTerH
2017-08-25 17:11:14 +08:00
JW Wang 28ca47cd53 Bug 1391142. P2 - remove MDSM::mResource and related functions. r=gerald
MozReview-Commit-ID: 4od7b8YNrMh
2017-08-17 11:52:29 +08:00
JW Wang 5f8a9ac4d1 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
2017-08-17 11:48:08 +08:00
JW Wang 124a69f003 Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB
2017-08-16 15:37:29 +08:00
JW Wang 17359e65e5 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
2017-08-16 15:33:58 +08:00
Sebastian Hengst 0e5c19642e 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 233485131e Backed out changeset 05b2bf2e6017 (bug 1390443) 2017-08-21 10:19:39 +02:00
JW Wang bb7b361ad4 Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB
2017-08-16 15:37:29 +08:00
JW Wang 61ff4ad6e1 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
2017-08-16 15:33:58 +08:00
JW Wang 828c4854c1 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
2017-08-09 17:45:12 +08:00
JW Wang 7ec7e46ea0 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
2017-08-09 17:20:53 +08:00
Sebastian Hengst c7240206e3 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
JW Wang 45531cfa00 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
2017-08-09 16:56:41 +08:00
JW Wang 2b96366e73 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
2017-08-09 11:06:29 +08:00
Matthew Gregan 2a28c36ef9 Bug 1388236 - Remove B2G-only AudioChannel code from media playback. r=jwwang 2017-08-10 13:00:07 +12:00
Matthew Gregan 2a92538e77 Bug 1388229 - Remove B2G-only audio stream type handling. r=kamidphish 2017-08-10 13:00:07 +12:00
JW Wang efabf428f3 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
2017-08-04 17:56:28 +08:00
JW Wang e10067c40c 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
2017-08-04 17:38:20 +08:00
Alastor Wu 6d2e437d86 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
2017-08-07 15:48:49 +08:00
Sebastian Hengst a8245ca35f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Bill McCloskey 969eb187fa 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 2981e2d92c 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
2017-08-02 18:00:00 +08:00
JW Wang a021b4659b 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
2017-08-01 13:54:14 +08:00
JW Wang b60788dbdf 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
2017-08-01 11:00:09 +08:00
JW Wang 02b5cba0ef Bug 1385748. P2 - remove MDSM::mNextPlayState. r=kaku
Following P1, mNextPlayState is no longer used.

MozReview-Commit-ID: 5ABEYMQ5G9l
2017-07-31 10:17:36 +08:00
Kaku Kuo 0decfcfccc Bug 1383653 P1 - add debug messages for understanding the status of suspending video decoder; r=jwwang
MozReview-Commit-ID: 2pI6XRQQgbG
2017-07-24 13:21:35 +08:00
JW Wang 5780df5a62 Bug 1384836 - rename MediaDecoderReaderWrapper to ReaderProxy. r=kaku
MozReview-Commit-ID: 7WeNblTnTCG
2017-07-27 14:49:57 +08:00
Kartikaya Gupta 14424677af 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
2017-07-26 16:03:57 -04:00
Carsten "Tomcat" Book 85048d5a27 Backed out changeset 42667c5ba946 (bug 1367983) for causing bug 1383673 2017-07-25 10:33:44 +02:00
Alastor Wu 0c1093e30e 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
2017-07-24 10:07:30 +08:00
JW Wang f1ae66b766 Bug 1316211. P16 - remove MediaDecoderReader completely and fix includes. r=gerald
MozReview-Commit-ID: AGNyyh4kt3e
2017-07-20 09:56:08 +08:00
JW Wang 03567250c1 Bug 1316211. P14 - move members from MDR to MFR. r=gerald
MozReview-Commit-ID: EwdteoEY1uS
2017-07-19 17:34:05 +08:00
JW Wang 364a0ea986 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a
2017-07-19 17:01:32 +08:00
JW Wang ab14688f19 Bug 1316211. P8 - fix MDSM::SizeOf{Audio,Video}Queue which should count its own queues. r=gerald
MozReview-Commit-ID: HMtkZpMSf3L
2017-07-19 15:02:33 +08:00
JW Wang 7e714d7529 Bug 1316211. P5 - remove IsAsync() and its callers. r=gerald
MozReview-Commit-ID: CT2gyEak2Qz
2017-07-19 14:24:35 +08:00
JW Wang 5fb3b49ec2 Bug 1316211. P4 - remove CheckSlowDecoding() and friends since IsAsync() now always returns true. r=gerald
MozReview-Commit-ID: 3dOa0aUQ0kM
2017-07-19 14:19:40 +08:00
Alastor Wu c37ac8f12d 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
2017-07-17 18:38:35 +08:00
Kaku Kuo 55320af78b Bug 1378691 P4 - skip to next key frame if the playback position is very close to it; r=jwwang
MozReview-Commit-ID: Gm0iZAHVLpS
2017-07-12 17:03:45 +08:00
Kaku Kuo 4cf3ad91ec Bug 1378691 P2 - trigger skip-to-next-key-frame if the video decoding is too slow; r=jwwang
MozReview-Commit-ID: B0stJG3eOKU
2017-07-11 09:59:13 +08:00
Kaku Kuo 28c2b42e9d Bug 1378691 P1 - drop video until catch up playbak position for video-only seek; r=jwwang
MozReview-Commit-ID: 86BhQDbM7xV
2017-07-11 09:56:09 +08:00
JW Wang 40da14eabc Bug 1378631. P1 - move the duration mirror from MediaDecoderReader to MediaDecoderReaderWrapper. r=jya
So we can remove AbstractMediaDecoder::CanonicalDurationOrNull() later.

MozReview-Commit-ID: 6zJCFDsCZPC
2017-07-06 11:45:02 +08:00
Kaku Kuo 037b14c434 Bug 1378084 P1 - resume to somewhere forward; r=jwwang
MozReview-Commit-ID: 6PgkNVTljlU
2017-07-03 15:14:53 +08:00
Kaku Kuo 29912c642b Bug 1378085 P8 - always dispatch VideoOnlySeekCompleted at VideoOnlySeekingState::Exit(); r=jwwang
MozReview-Commit-ID: A8PzfUpJjao
2017-07-04 17:49:43 +08:00
Kaku Kuo bc103cda1d Bug 1378085 p7 - override DoSeek(); r=jwwang
MozReview-Commit-ID: 3qSR1wXwVo1
2017-07-06 11:51:09 +08:00
Kaku Kuo 6f3d6ecc91 Bug 1378085 p6 - override HandleAudioWaited(); r=jwwang
MozReview-Commit-ID: GKXQVAYm0lz
2017-07-06 11:48:42 +08:00