Commit Graph

77 Commits

Author SHA1 Message Date
Birunthan Mohanathas
fd290c6aa3 Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas
0e83cd889c Bug 1185763 - Part 1: Always use mozilla::Move with nsTArray::MoveElementsFrom. r=froydnj 2015-08-11 08:29:46 -07:00
Jean-Yves Avenard
8215af8c5e Bug 1188313: P1. Attempt to seek audio near video. r=cpearce
Do not only rely on the MediaDecoderState machine to keep A/V sync after a seek as should we seeked in fast mode ; it wouldn't
2015-08-11 14:18:49 +10:00
Alfredo Yang
df30a6a272 Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce 2015-08-11 14:09:12 +10:00
Kilik Kuo
edaff42ded Bug 1188812 - Obtain CDM can render capability and store into MediaInfo r=cpearce. 2015-08-06 14:24:00 +08:00
Jean-Yves Avenard
51d7aca4b6 Bug 1188131: Don't rely on MediaResource type to detect media format. r=cpearce
This information is often wrong and non-existent with MSE. Let the PDM decides later based on the metadata.
This prevent hardware acceleration to be turned on leading to extremely high CPU usage on high definition videos.
2015-08-07 12:19:49 +10:00
Bobby Holley
75645bdcf4 Bug 1190496 - Namespace the SharedThreadPool.h include. r=cpearce 2015-08-04 14:00:25 -07:00
Alfredo Yang
271d02e288 Bug 1189173 - Drop frames aggressively during internal seek. r=jya 2015-07-30 00:53:00 +02:00
Jean-Yves Avenard
28f2814d64 Bug 1189138: P2. Add useful debugging information to logs. r=cpearce 2015-07-30 15:20:19 +10:00
Jean-Yves Avenard
b3b4eca437 Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce 2015-07-28 23:28:24 +10:00
Jean-Yves Avenard
fb0da9d0db Revert "Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce"
This reverts commit 9c48bac3e0d3
2015-07-28 16:37:53 +10:00
Jean-Yves Avenard
2322ace9d6 Bug 1188233: Ensure drainComplete flag is set upon failure to create decoder. r=cpearce 2015-07-28 14:23:29 +10:00
Jean-Yves Avenard
d021805eb0 Bug 1188220: Allow disabling HW acceleration even when SharedDecoderManager isn't used. r=cpearce
The SharedDecoderManager is being obsoleted.
2015-07-28 14:11:06 +10:00
Jean-Yves Avenard
389b37b6e4 Bug 1185886: P2. Don't unnecessarily drain decoders when there's no frames pending. r=cpearce 2015-07-27 14:52:11 +10:00
Jean-Yves Avenard
15de6c00ab Bug 1183888: Report empty buffered ranges unless we have a start time. r=bholley 2015-07-24 23:02:20 +10:00
Jean-Yves Avenard
eb636f684f Bug 1185431: Immediately resolve WaitingForDataPromise if we're not waiting for data. r=cpearce 2015-07-22 14:22:46 +10:00
Jean-Yves Avenard
3a8745162e Bug 1181204 - Prevent use of the decoder outside the reader's taskqueue. r=cpearce
This fix a potential race when the decoder could be shutting down on the reader's taskqueue while the MediaDecoderStateMachine thread attempts to read it.
2015-07-20 15:14:37 -04:00
Jan Gerber
9988952a0a Bug 1148102: P7. Hookup WebMDemuxer. r=jya 2015-07-20 17:27:08 +10:00
Bobby Holley
13ff5c37f3 Bug 1184634 - Rename MediaTaskQueue to TaskQueue. r=gerald 2015-07-16 22:23:06 -07:00
Bobby Holley
7365c7cf9a Bug 1184634 - Rename "TaskQueue()" accessor to "OwnerThread()". r=gerald
Otherwise this name will collide with the rename of MediaTaskQueue to TaskQueue.
It's also a better naming convention, because it generalizes to things that are
owned by an AbstractThread that is not a Task Queue.

We rename to Queue() in TestMozPromise, because that's more accurate.
2015-07-16 22:22:07 -07:00
Jean-Yves Avenard
2b61689e5e Bug 1183519: P2. Reject promise if decoder couldn't be created. r=me
Follow-up fix.
2015-07-16 16:05:27 +10:00
Jean-Yves Avenard
0eeadf9bdb Bug 1183653: MediaFormatReader: returns error if no tracks are usable. r=cpearce 2015-07-16 14:31:56 +10:00
Jean-Yves Avenard
fa3c37cb85 Bug 1183482: Fix shutdown hang. r=cpearce
The MediaFormatReader destructor is only called once all media task queues have shutdown.
However, the main thread demuxer always owned a reference to trackbuffer task queue.
2015-07-16 14:31:55 +10:00
Jean-Yves Avenard
a8352b08c9 Bug 1183519: Wait until current drain completes before decoding new data. r=cpearce 2015-07-16 14:31:54 +10:00
Jean-Yves Avenard
ef5489ebf7 Bug 1182985: Drain decoder when changing resolution. r=cpearce 2015-07-16 14:31:53 +10:00
Jean-Yves Avenard
12f18602ce Bug 1173657: Drain decoder when discontinuity encountered. r=cpearce
A discontinuity can be when waiting for data, decoding error or reaching end of stream.
2015-07-16 14:31:53 +10:00
Jean-Yves Avenard
f28c23a44f Bug 1182967: Reject metadata promise on shutdown. r=bholley 2015-07-16 14:31:52 +10:00
Jean-Yves Avenard
b625ffc87b Bug 1181894: Always create a PlatformDecoderModule in CDMWrapper. r=cpearce
Not all tracks may be encrypted, as such we need a default PDM in order to decode non-encrypted data.
2015-07-09 16:18:05 +10:00
Jean-Yves Avenard
dbad274e64 Bug 1180403: P2. Prevent crash when shutting down. r=cpearce 2015-07-09 11:06:07 +10:00
Sotaro Ikeda
6305c525d7 Bug 1171257 - Add force decode ahead to MediaFormatReader r=jya,bholley 2015-07-05 09:39:30 -07:00
Bobby Holley
e43840b8d4 Bug 1179110 - Use a Maybe<> to store start time, rather than using -1 as a sentinel. r=jya
This allows us to properly support videos with a negative start time, which
is happening here.
2015-07-02 12:05:17 -07:00
Jean-Yves Avenard
34dbe1c37c Bug 1179569: Remove use of decoder's monitor in ResetDecode(). r=bholley
Doesn't appear to ever have been required.
2015-07-02 11:55:33 +10:00
Bobby Holley
2a790a5fc8 Bug 1178437 - Do the dormant-enabled tracking on the main thread. r=jww,r=jya
This is purely a question of policy, so there's no reason it needs to live on
the off-main-thread decoding machinery.
2015-07-01 18:47:41 -07:00
Bobby Holley
947f197e8b Bug 1175768 - Use mirroring for buffered ranges. r=jya 2015-06-27 01:19:13 -07:00
Bobby Holley
bae46ed9c3 Bug 1175768 - Dispatch NotifyDataArrived and remove the aBuffer argument. r=jya
It would be nice to remove the argument in a separate patch, but we can't
perform MediaResource reads on the main thread, so the SilentReadAt stuff
needs to happen at the same time as the off-main-thread stuff.
2015-06-27 01:19:10 -07:00
Ryan VanderMeulen
9d5966b120 Backed out 8 changesets (bug 1175768) for frequent media test failures.
Backed out changeset a369cfb95b59 (bug 1175768)
Backed out changeset e02dd312d622 (bug 1175768)
Backed out changeset 6776ce74b9e5 (bug 1175768)
Backed out changeset 6aa5fa1d318e (bug 1175768)
Backed out changeset a8bd7a0d2aea (bug 1175768)
Backed out changeset 41ffc9a9ac48 (bug 1175768)
Backed out changeset 2d2cefa397dc (bug 1175768)
Backed out changeset 4e06368496d2 (bug 1175768)

CLOSED TREE
2015-06-23 16:20:15 -04:00
Bobby Holley
84118906a6 Bug 1175768 - Use mirroring for buffered ranges. r=jya 2015-06-22 22:53:09 -07:00
Bobby Holley
723b4cae9a Bug 1175768 - Dispatch NotifyDataArrived and remove the aBuffer argument. r=jya
It would be nice to remove the argument in a separate patch, but we can't
perform MediaResource reads on the main thread, so the SilentReadAt stuff
needs to happen at the same time as the off-main-thread stuff.
2015-06-22 22:53:07 -07:00
Jean-Yves Avenard
7c01b18d26 Bug 1173792: P2. Always seek audio to original seeking position. r=cpearce
There's no guarantee that the audio stream will have the same buffered ranges as the video track; which could lead to a stall.
It is up to the MediaDecoderStateMachine to ensure proper A/V sync following a sync
2015-06-19 16:45:26 +10:00
Jean-Yves Avenard
ff9eb0e2db Bug 1174582: P2. Do not skip keyframe with negative timestamp. rpending=alfredo 2015-06-19 16:45:17 +10:00
Jean-Yves Avenard
d3ec03a343 Bug 1171314: P3. Detect change of stream content and automatically recreate decoder. r=cpearce 2015-06-19 16:45:15 +10:00
Bobby Holley
59fbbf4329 Bug 1163223 - Remove MediaDecoderStateMachine::mStartTime. r=jww CLOSED TREE 2015-06-16 15:08:45 -07:00
Bobby Holley
72245b4591 Bug 1163223 - Introduce StartTimeRendezvous and route samples through it. r=jww
No sample adjusting is done yet - this just makes the data available.
2015-06-16 15:08:30 -07:00
Bobby Holley
a999ebecd7 Bug 1163223 - Move bailout case in GetBuffered into the readers. r=jww
The problem here is that, because we run mReader->SetStartTime() as a promise
callback, MDSM::HasStartTime() may be true while the reader hasn't been
notified yet. This is obviously broken, but no more broken than the fact that
GetBuffered operates synchronously (and is basically the last piece of
machinery left doing so). Fixing that is next on my list, but let's just hack
around this for now to get this stack landed.
2015-06-16 15:08:29 -07:00
Wes Kocher
0f3cdfeab7 Backed out 8 changesets (bug 1163223) for getting in the way of me backing out f46a712edf7e
Backed out changeset c1b33c43f0c5 (bug 1163223)
Backed out changeset a7ee6eb45f62 (bug 1163223)
Backed out changeset b2e10f194455 (bug 1163223)
Backed out changeset 9e7651567cad (bug 1163223)
Backed out changeset 20e25e93ed5f (bug 1163223)
Backed out changeset 5193508738f8 (bug 1163223)
Backed out changeset aea6b8d15318 (bug 1163223)
Backed out changeset 7b6804398fc3 (bug 1163223)
2015-06-16 14:47:50 -07:00
Bobby Holley
175ff39b21 Bug 1163223 - Remove MediaDecoderStateMachine::mStartTime. r=jww 2015-06-16 13:00:00 -07:00
Bobby Holley
94976e0882 Bug 1163223 - Introduce StartTimeRendezvous and route samples through it. r=jww
No sample adjusting is done yet - this just makes the data available.
2015-06-16 12:59:57 -07:00
Bobby Holley
ed1ce0d8bb Bug 1163223 - Move bailout case in GetBuffered into the readers. r=jww
The problem here is that, because we run mReader->SetStartTime() as a promise
callback, MDSM::HasStartTime() may be true while the reader hasn't been
notified yet. This is obviously broken, but no more broken than the fact that
GetBuffered operates synchronously (and is basically the last piece of
machinery left doing so). Fixing that is next on my list, but let's just hack
around this for now to get this stack landed.
2015-06-16 12:59:56 -07:00
Jean-Yves Avenard
3533b2f179 Bug 1171311: P10. Add MediaDataDemuxer::GetSamplesMayBlock() method. r=cpearce
This is used by the MediaFormatReader to dermine if buffering heuristics should
be used.
2015-06-12 09:26:58 +10:00
Jean-Yves Avenard
6277c46fd9 Bug 1171311: P8. Ensure we will always decode available data. r=cpearce 2015-06-12 09:26:58 +10:00