trav90
9c1bc30965
Suppress DispatchOnAudioSinkComplete()
2018-07-25 07:04:00 +08:00
trav90
65da7c8f73
Fix data race in AudioSink::mWritten
2018-07-25 07:03:58 +08:00
trav90
1a2fea0658
Re-land "Dispatch AudioSink notifications asynchronously"
...
This is needed by some new code that I am working on.
2018-07-25 07:03:56 +08:00
trav90
e11d949dfb
Add missing ;
2018-07-25 07:03:52 +08:00
trav90
b0cb2c597c
Update test
2018-07-25 07:03:50 +08:00
trav90
74f9310acf
Don't spin the event loop by synchronously dispatching when we're already on the main thread
2018-07-25 07:03:46 +08:00
trav90
89abd8c051
Grab the tail dispatch each time in case the runnable spins the event loop
...
If the runnable spins the event loop, we may end up firing the tail dispatcher, which causes the AutoTaskDispatcher to be destroyed, after which point invoking methods on it will crash. We need to grab it each time so that it will be lazily instantiated as-needed.
2018-07-25 07:03:44 +08:00
trav90
df074df1ee
Use state mirroring for NextFrameStatus
2018-07-25 07:03:42 +08:00
trav90
19fc3c759e
Implement state mirroring machinery
2018-07-25 07:03:40 +08:00
trav90
1e249c36f8
Use state watching machinery for mReadyState updates
2018-07-25 07:03:38 +08:00
trav90
001221b5a2
Implement state watching machinery
2018-07-25 07:03:37 +08:00
trav90
1d17b3107d
Implement direct tasks
2018-07-25 07:03:34 +08:00
trav90
04513e7957
Force state machine setting to go through a setter
...
This is needed so that we can hook up the state mirroring in a subsequent commit.
2018-07-25 07:03:32 +08:00
trav90
1c6e58aeb2
Fix SetDormant() handling in MediaOmxCommonDecoder
2018-07-25 07:03:30 +08:00
trav90
422ce43cbb
Invoke SeekCompleted synchronously
...
The current behavior is a holdover from when this some of this stuff was happening on the decode thread. It's problematic because nothing guarantees that we don't call CheckIfSeekComplete twice, and queue up two SeekCompleted events.
2018-07-25 07:03:28 +08:00
trav90
e413aa107a
Switch nsIThread implementation of AbstractThread::IsCurrentThreadIn() to use PRThreads
2018-07-25 07:03:26 +08:00
trav90
9227ffb4c9
Always seek audio to original seeking position
...
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.
2018-07-25 07:03:13 +08:00
trav90
f617b3a495
Seek to original seeking position should video seeked time not found
2018-07-25 07:03:11 +08:00
trav90
d42126a5e1
RemoveDecoder() when initialization is aborted
2018-07-25 07:03:10 +08:00
trav90
9dcbebf1ca
Don't skip audio samples with a negative presentation time
...
This makes WMF have the same decoding behavior as other platforms.
2018-07-25 07:02:59 +08:00
trav90
b90879402e
Reset video frame geometry on each init
2018-07-25 07:02:57 +08:00
trav90
5643bfba66
Ensure mUseHwAccel is set appropriately when WMFVideoMFTManager::Init() is called after Shutdown()
2018-07-25 07:02:56 +08:00
trav90
9366d733b3
Remove a couple member variables from WMFVideoMFTManager
...
These shouldn't be used by anything.
2018-07-25 07:02:53 +08:00
trav90
76b511a3e5
Fix HTMLMediaElement::seekable attribute for Mediasource
...
Interval is to start from 0 when duration is +infinity
2018-07-25 07:02:07 +08:00
trav90
8b8219a3c1
Make it impossible for the MDSM frame calculation to overflow
2018-07-25 07:02:05 +08:00
trav90
9e3655912a
Reduce chance of overflow
2018-07-25 07:00:11 +08:00
trav90
d7c605fb56
[mse] Check for sidx box in ContainerParser
2018-07-25 06:59:53 +08:00
trav90
dc0c3e6be3
Remove a couple more instances of manually passing TaskDispatchers
...
Followup to 8446234.
2018-07-25 06:58:15 +08:00
trav90
c19a78e7c8
Fix racey test_error_in_video_document.html
...
This test assumes that the decoding machinery will have completed its work one event-loop-round-trip after the document loads (see the executeSoon call), which is a bogus assumption.
2018-07-25 06:58:14 +08:00
trav90
4c926cfb2f
Implement tail dispatch on the main thread
2018-07-25 06:58:12 +08:00
trav90
dfc6198675
Tighten up a couple existing assertions
2018-07-25 06:58:04 +08:00
trav90
214afd47eb
Assert against potential deadlocks between synchronous MediaTaskQueue operations and tail dispatchers
2018-07-25 06:58:00 +08:00
trav90
4a837c3711
Remove AbstractThread::InTailDispatch
...
This is unused and unnecessary now that we pass this explicitly during dispatch.
2018-07-25 06:57:58 +08:00
trav90
b11500bddd
Stop manually passing TaskDispatchers everywhere
2018-07-25 06:57:56 +08:00
trav90
dfc7504069
Remove MaybeTailDispatch
...
This is now the default behavior.
2018-07-25 06:57:53 +08:00
trav90
78e189b54a
Do tail dispatch automatically
2018-07-25 06:57:52 +08:00
trav90
a3d351f76a
Adjust tail dispatching assertions
2018-07-25 06:57:50 +08:00
trav90
b6bb9afb37
Move the GetCurrent TLS logic into AbstractThread
2018-07-25 06:57:47 +08:00
trav90
8a3f415c23
Fix Windows build bustage
...
Followup to #954
2018-07-25 06:57:43 +08:00
Steven Schlansker
0fe5d973ae
fmp4 decoder: add missing #include for mac
...
manual cherry-pick of ab938f4e956e4f53c9cec092892e9f308fcafaf9 by @trav90
2018-07-25 06:57:35 +08:00
trav90
afb41fac1c
Fix build bustage
2018-07-25 06:57:33 +08:00
trav90
a2ebb642ae
Mark MediaTaskQueue::SyncDispatch as deprecated
...
Gonk media code should be the only place where this is still used. Marking as deprecated for now, and I will remove it at a future point in time as part of a planned cleanup of unused media code.
2018-07-25 06:57:14 +08:00
trav90
6e5662a539
Add Shutdown checks to prevent potential crashes
2018-07-25 06:57:05 +08:00
trav90
c243a206bc
Align the failure handling of the TemporaryRef Dispatch overload with its companion
2018-07-25 06:57:02 +08:00
trav90
7e6dac538d
Change the canonical internal smart pointer type in MediaTaskQueue to the XPCOM style
2018-07-25 06:57:00 +08:00
trav90
c20e81736f
Remove the concept of forced dispatch
...
This was originally added to make MediaPromise dispatch reliable in the
presence of the Flush() feature of MediaTaskQueue. That feature has
now been restricted to a special subclass (which we should eventually eliminate),
so we can just assert that MediaPromises are never used on those task queues
and simplify the rest of the code.
2018-07-25 06:56:58 +08:00
trav90
834def9678
Move dispatch failure handling into dispatch itself
...
This is nicer than scattering the failure handling to each callsite.
2018-07-25 06:56:56 +08:00
trav90
70322d85c2
Detemplatize nsIThread wrapper and move it into AbstractThread.cpp
2018-07-25 06:56:54 +08:00
trav90
213853ac0f
Do MediaPromise TailDispatch checking outside the scope of the MediaPromise lock
...
This reduces the potential for deadlocks.
2018-07-25 06:56:21 +08:00
trav90
d657c42169
Rescope monitor
...
This is possible now that we're not manually nulling out mRunningThread anymore.
2018-07-25 06:56:19 +08:00