Commit Graph
401 Commits
Author SHA1 Message Date
JW Wang 5f4ffc9dd2 Bug 1362910. P2 - fix callers. r=gerald
Since RefPtr<T>&& can't be converted to T* implicitly, we need to change
T* to RefPtr<T> in resolve/reject callbacks to make it compile again.

We should review the changes later to look for the opportunity to
optimize away unnecessary AddRef/Release pairs.

MozReview-Commit-ID: 22rHQ8dhxJv
2017-05-11 08:30:39 +08:00
JW Wang edbaa87b04 Bug 1362912. P2 - fix the callers. r=gerald
MozReview-Commit-ID: LdYcIWAFDUn
2017-05-09 23:31:32 +08:00
Jean-Yves Avenard ee7abde594 Bug 1357040: P1. Abort if demuxer initialisation isn't complete. r=jwwang
MozReview-Commit-ID: 9SSgQq272My
2017-04-25 15:28:31 +02:00
JW Wang 90a0fb1db0 Bug 1359309. P1 - give mozilla::TaskQueue a name which will be useful in debugging Dispatch() failures. r=jya
MozReview-Commit-ID: 5FAVNo32fl7
2017-04-25 14:57:55 +08:00
Sebastian Hengst 5094068d43 Backed out changeset a5cb0de6bdb2 (bug 1357040) for failing various media-related wpt tests, e.g. mediasource-activesourcebuffers.html. r=backout 2017-04-26 11:17:12 +02:00
Jean-Yves Avenard 1854fc3770 Bug 1357040: Abort if demuxer initialisation isn't complete. r=jwwang
MozReview-Commit-ID: 9SSgQq272My
2017-04-25 15:28:31 +02:00
JW Wang 68670a77ff Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i
2017-04-17 16:35:04 +08:00
JW Wang b447b29002 Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O
2017-04-14 17:13:36 +08:00
JW Wang e98c80cb28 Bug 1356506 - change the type of MediaData::mTimecode to TimeUnit since int64_t is ambiguous. r=gerald
MozReview-Commit-ID: 7dO5OOUuORz
2017-04-14 14:52:14 +08:00
JW Wang 3d95d557fb Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: DBQELBs32Ad
2017-04-14 14:14:08 +08:00
JW Wang 91b9052b82 Bug 1355756. P1 - change the type of MediaData::mDuration to TimeUnit. r=gerald
MozReview-Commit-ID: 3d4bUYtSuMI
2017-04-12 17:27:34 +08:00
JW Wang 37314354e8 Bug 1351053. P2 - fix data race in accessing mAudioDemuxer/mVideoDemuxer. r=jya
1. http://searchfox.org/mozilla-central/rev/944f87c575e8a0bcefc1ed8efff10b34cf7a5169/dom/media/MediaFormatReader.cpp#755
   mAudioDemuxer is modified on the task queue thread of MFR in Shutdown() called by MFR::Shutdown().
2. http://searchfox.org/mozilla-central/rev/944f87c575e8a0bcefc1ed8efff10b34cf7a5169/dom/media/MediaFormatReader.cpp#1082
   mAudioDemuxer is read on the task queue thread of DemuxerProxy in DemuxerProxy::NotifyDataArrived().

MozReview-Commit-ID: 8qLAzNKjuzb
2017-04-13 15:42:52 +08:00
JW Wang 057c988048 Bug 1351053. P1 - Backed out changeset da84999fd0b2. r=jya
MozReview-Commit-ID: rV4W2EXwN9
2017-04-13 15:16:08 +08:00
JW Wang 5b7786cbd2 Bug 1355740 - Change the type of TrackInfo::mDuration to TimeUnit. r=jya
MozReview-Commit-ID: P7aqw4d5Vk
2017-04-12 16:41:36 +08:00
Gerald Squelart 51f76264cf Bug 1343437 - 'media.playback.warnings-as-errors' pref - r=jya
If 'media.playback.warnings-as-errors' is true, demuxing and decoding warnings
(i.e., non-fatal errors) will be treated as errors, causing playback to fail.

Currently set to false by default.

This could be later changed to catch and diagnose more issues.

MozReview-Commit-ID: BTaZ6TbIbNG
2017-03-03 16:10:48 +11:00
Gerald Squelart 189653ac60 Bug 1343437 - MFR::OnDemuxerInitDone forwards non-NS_OK MediaResult to HTMLMediaElement::DecodeWarning - r=jya
The MediaFormatReader now takes the MediaResult from the Demuxer::Init promise
resolution, and if there are no other errors but the MediaResult is not NS_OK
it will forward that warning to the decoder owner (i.e., the associated
HTMLMediaElement).

MozReview-Commit-ID: 5rTmzqqPLI0
2017-03-06 15:22:17 +11:00
JW Wang 5501dcae56 Bug 1351574. P1 - let MediaDecoderReader::RequestVideoData() take TimeUnit instead of int64_t. r=jya
MozReview-Commit-ID: DOsYkcJ77Em
2017-03-29 16:52:57 +08:00
JW Wang 781b088ce2 Bug 1351053. P1 - add some assertions to debug who is holding the lock. r=jya
MozReview-Commit-ID: 6twXYbLm8Da
2017-04-05 16:25:56 +08:00
JW Wang 02df8c7686 Bug 1349145. P1 - revert the changes in bug 1203047 for MediaDecoderReader and its friends. r=jya
MozReview-Commit-ID: IghzDRwvd9S
2017-03-22 11:28:33 +08:00
John Lin ffab3ddbca Bug 1345599 - part 3: for recyclable decoder, don't drain/flush when stream ID/SPS change. r=jya
MozReview-Commit-ID: 4qtlbMWgfPo
2017-03-14 15:04:52 +08:00
Jean-Yves Avenard c4f18f325f Bug 1342913: P2. Terminate draining operations when possible. r=gerald
An interesting intermittent condition not previously handled.
We were incorrectly assuming that we always had a decode promise pending when a drain was requested.
If a change of content occurred when resuming from a waiting for data condition: we would have stalled forever as the waiting promise would never have been resolved even after new data was appended.

MozReview-Commit-ID: BQSRSHYqTSe
2017-03-07 20:13:39 +11:00
JW Wang 21e95d4bd9 Bug 1344772 - set a dirty flag so we can process the notification later. r=jya
https://hg.mozilla.org/mozilla-central/file/34c6c2f302e7b48e3ad2cec575cbd34d423a9d32/dom/media/MediaFormatReader.cpp#l2835
NotifyDataArrived() is dispatched again if |mNotifyDataArrivedPromise.Exists()| which will then be dispatched again
recursively until mNotifyDataArrivedPromise is completed. This is a waste of CPU cycles.

We can use a dirty flag to note we should update buffer ranges again when the current update is done.

MozReview-Commit-ID: 6hInhGKnXJE
2017-03-15 15:20:45 +08:00
John Lin b99d806195 Bug 1344649 - part 5: deprecate ConfigurationChanged() once again. r=jya
MozReview-Commit-ID: D9b8rljlNzP
2017-03-14 12:58:27 +08:00
Kaku Kuo 5a5c6483b4 Bug 1346120 part 3 - Use NullDecoderModule while suspending a video element's decoder; r=jwwang
MozReview-Commit-ID: L1CsDV5TW5R
2017-03-09 17:12:02 +08:00
Iris Hsiao 03d30d3cc2 Backed out 6 changesets (bug 1346120) for autophone Mdm tests failure in test_background_video_drawimage_with_suspended_video.html
Backed out changeset a30c73fc8d69 (bug 1346120)
Backed out changeset f16556658fd9 (bug 1346120)
Backed out changeset 98d212462786 (bug 1346120)
Backed out changeset ba579adbed21 (bug 1346120)
Backed out changeset c0758b9bf7b5 (bug 1346120)
Backed out changeset 94a483ef784e (bug 1346120)
2017-03-13 16:53:14 +08:00
Kaku Kuo 258218c07c Bug 1346120 part 3 - Use NullDecoderModule while suspending a video element's decoder; r=jwwang
MozReview-Commit-ID: L1CsDV5TW5R
2017-03-09 17:12:02 +08:00
Wes Kocher 72d2aca307 Backed out 2 changesets (bug 1342913) for failures in test_ChangeWhileWaitingOnMissingData_mp4.html a=backout
Backed out changeset f770cf70a30e (bug 1342913)
Backed out changeset 7fc8016ace00 (bug 1342913)

MozReview-Commit-ID: GfZmkx9mvoZ
2017-03-09 11:07:18 -08:00
Jean-Yves Avenard 03e8782f64 Bug 1342913: P2. Terminate draining operations when possible. r=gerald
An interesting intermittent condition not previously handled.
We were incorrectly assuming that we always had a decode promise pending when a drain was requested.
If a change of content occurred when resuming from a waiting for data condition: we would have stalled forever as the waiting promise would never have been resolved even after new data was appended.

MozReview-Commit-ID: BQSRSHYqTSe
2017-03-07 20:13:39 +11:00
karo 9dfa510df6 Bug 1344073 - Adding consistent formatting to HTMLMediaElement::MozRequestDebugInfo debugInfo dump string. r=cpearce
MozReview-Commit-ID: GfRrLQcebbt
2017-03-01 16:03:01 +13:00
JW Wang c3382ba0d4 Bug 1341200. Part 10 - streamline DecoderData::ShutdownDecoder() so it feels like a sync function and MFR doesn't need to explicitly wait for flush/shutdown to complete before creating new decoders. r=jya
MozReview-Commit-ID: F4tf1f7O89U
2017-02-27 09:56:36 +08:00
JW Wang e4a9f92248 Bug 1341200. Part 9 - remove unused mShuttingDown. r=jya
MozReview-Commit-ID: 8OWgOB07rEP
2017-02-27 00:17:16 +08:00
JW Wang 1ca62ffd59 Bug 1341200. Part 8 - let DecoderData::ShutdownDecoder() handle shutdown in the middle of flush. r=jya
MozReview-Commit-ID: FW23TFQLStR
2017-02-26 22:51:22 +08:00
JW Wang 34442c6e0d Bug 1341200. Part 7 - merge ShutdownDecoderWithPromise() and ShutdownDecoder(). r=jya
MozReview-Commit-ID: 9YRwPJGqrhq
2017-02-25 07:59:53 +08:00
JW Wang 3171315773 Bug 1341200. Part 6 - let ShutdownDecoderWithPromise() return void by tracking the shutdown promise. r=jya
MozReview-Commit-ID: GIYdLXZYEyk
2017-02-25 07:49:29 +08:00
JW Wang 149165d8f2 Bug 1341200. Part 5 - move the definition to .cpp as they will access ShutdownPromisePool in next patches. r=jya
MozReview-Commit-ID: 5Tvh1t4KyoV
2017-02-24 17:27:42 +08:00
JW Wang ce4f72e63a Bug 1341200. Part 3 - replace mShutdownRequest with a bool as P2. r=jya
MozReview-Commit-ID: ERERt0ZyvkC
2017-02-24 17:19:12 +08:00
JW Wang 66eeff41ad Bug 1341200. Part 2 - replace mFlushRequest with a bool for mFlushRequest.Disconnect() is never used and a bool is sufficient to do the job. r=jya
MozReview-Commit-ID: GFnSvunqtGq
2017-02-24 17:04:32 +08:00
JW Wang bdc8a0af65 Bug 1343433 - Label runnables in dom/media/MediaFormatReader.cpp. r=jya
MozReview-Commit-ID: 6BWmq4m18va
2017-03-01 11:58:39 +08:00
JW Wang 81632f701e Bug 1343732 - use SystemGroup::Dispatch() in ~AutoTaskQueue(). r=jya
MozReview-Commit-ID: IWFs5e8U7VQ
2017-03-01 13:02:29 +08:00
Jean-Yves Avenard 142e54472f Bug 1313548: P3. Return early of we're not longer waiting for a key. r=gerald
The next run of Update would have cleared the mWaitingForKey flag, may as well do it early.

MozReview-Commit-ID: DXiqSDAxnnz
2017-02-24 15:00:39 +01:00
Jean-Yves Avenard 3e4b7921ef Bug 1313548: P2. Add additional information in dump data. r=gerald
MozReview-Commit-ID: 1OndEp1ZQ9u
2017-02-23 14:43:01 +01:00
Jean-Yves Avenard 3f392a3a84 Bug 1313548: P1. Always resolve waiting promise, when clearing waitforkey. r=gerald
MozReview-Commit-ID: 6xu8Rcn9WMO
2017-02-23 14:10:12 +01:00
Gerald Squelart dd85a2ba47 Bug 1343152 - Move TrackTypeToStr(TrackInfo::TrackType) to MediaInfo.h/cpp - r=jya
MozReview-Commit-ID: 57U5ySHsIn1
2017-02-27 17:15:36 +11:00
JW Wang 3010c4796f Bug 1340969. Part 2 - remove MFR::mShutdownPromise by using promise chaining. r=jya
MozReview-Commit-ID: 6Oa1yar80aH
2017-02-17 19:34:03 +08:00
JW Wang e97abcca54 Bug 1340969. Part 1 - add ShutdownPromisePool to manage ShutdownPromises. r=jya
MozReview-Commit-ID: KAr3Fe8Aeqi
2017-02-17 19:29:43 +08:00
JW Wang d503becb6c Bug 1340943. Part 2 - add LocalAllocPolicy which enforces the order of decoder creation and shutdown. r=jya
MozReview-Commit-ID: 4zSG6DswYO5
2017-02-17 18:30:39 +08:00
JW Wang cb2028c9b2 Bug 1340943. Part 1 - rename DecoderAllocPolicy to GlobalAllocPolicy. r=jya
MozReview-Commit-ID: DJJwa56TXlC
2017-02-17 16:06:45 +08:00
JW Wang dcaca6e9fe Bug 1340942. Part 4 - pass Data& to DoInitDecoder(). r=gerald
MozReview-Commit-ID: IwlpxR2MuRE
2017-02-17 15:21:46 +08:00
JW Wang 0927c8f6ec Bug 1340942. Part 3 - pass Data& to DoCreateDecoder. r=gerald
MozReview-Commit-ID: ABHu0tp57AM
2017-02-17 15:17:22 +08:00
JW Wang 589837bec2 Bug 1340942. Part 2 - pass Data& to RunStage(). r=gerald
MozReview-Commit-ID: DAALmMBhoep
2017-02-17 15:14:53 +08:00