move code to choose the next GraphDriver to CheckDriver() for Linearize AudioContextOperation resolution
Categories
(Core :: Audio/Video: MediaStreamGraph, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: padenot, Assigned: karlt)
References
Details
Attachments
(1 file, 10 obsolete files)
Updated•9 years ago
|
Reporter | ||
Updated•9 years ago
|
Comment hidden (obsolete) |
Comment 3•8 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
I'll have a look at this as part of bug 1638243.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Apparently this pref is already set when the tests are run on CI,
but it is not being set when running a single test or subdir.
Assignee | ||
Comment 8•5 years ago
|
||
Tracks remove themselves from the graph after DestroyImpl() and so should not
be added again after this.
These methods are now invoked only on the MediaTrack removing the possibility
of calling the wrong method.
Depends on D76797
Assignee | ||
Comment 9•5 years ago
|
||
This will permit passing an AudioContextOperationControlMessage* to other
methods.
Depends on D76798
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D76799
Assignee | ||
Comment 11•5 years ago
|
||
This will be helpful when delaying resumption of tracks until there is an AudioCallbackDriver.
The memory for the array is also transferred to the callee to save an allocation.
Depends on D76800
Assignee | ||
Comment 12•5 years ago
|
||
On the graph thread, mLifecycleState is known to be LIFECYCLE_RUNNING.
OpenAudioInputImpl(), CloseAudioInputImpl(), AddAudioOutputImpl() are called
only from ControlMessage::Run(), not RunDuringShutdown().
These conditions were first added in
https://hg.mozilla.org/mozilla-central/rev/dcd375e2750d425af210fee36962219a97a334fd#l3.12
but I don't know why.
Depends on D76801
Assignee | ||
Comment 13•5 years ago
|
||
There is a small logic change here when
!audioTrackPresent && audioCallbackDriver && !IsStarted() &&
graphOutputChannelCount != audioCallbackDriver->OutputChannelCount()
Now, no driver change is scheduled in that situation.
Depends on D76802
Assignee | ||
Comment 14•5 years ago
|
||
Depends on D76803
Assignee | ||
Comment 15•5 years ago
|
||
Depends on D76804
Assignee | ||
Comment 16•5 years ago
|
||
The key change here is that AudioContextOperation promises for the same
AudioContext are resolved in order as long as the graph is running.
There is one remaining case where AudioContextOperation promises can be
resolved out of order, which is when
AudioContextOperationControlMessage::RunDuringShutdown() resolves a Close
operation shortly after Run() has queued its update via mUpdateRunnables.
mUpdateRunnables are run after controlMessagesToRunDuringShutdown.
https://searchfox.org/mozilla-central/rev/ea7f70dac1c5fd18400f6d2a92679777d4b21492/dom/media/MediaTrackGraph.cpp#1793,1803
Pending resume operations are stored on the graph instead of on mNextDriver.
This means there is no need to move operations between drivers when switching
from one mNextDriver to another, the code for which was previously missing.
Suspend operations are performed immediately, because even a callback driver
can render nothing. Tracks are not resumed until either there is an
AudioCallbackDriver to deliver the rendered audio or the Resume operation is
canceled by a subsequent Suspend.
While the graph is running, DispatchToMainThreadStableState() is used
consistently, whereas previously this was mixed with direct Dispatch() to the
main thread, which could have the runnable Run() before main thread state had
been updated.
Depends on D76805
Assignee | ||
Comment 17•5 years ago
|
||
Depends on D76807
Comment 18•5 years ago
|
||
Comment on attachment 9151663 [details]
Bug 1285290 set prefs on two crashtests to allow autoplay r?padenot
Revision D76797 was moved to bug 1641161. Setting attachment 9151663 [details] to obsolete.
Comment 19•5 years ago
|
||
Comment on attachment 9151664 [details]
Bug 1285290 don't add destroyed tracks to graph from Increment/DecrementSuspendCount r?padenot
Revision D76798 was moved to bug 1641161. Setting attachment 9151664 [details] to obsolete.
Comment 20•5 years ago
|
||
Comment on attachment 9151665 [details]
Bug 1285290 move AudioContextOperationControlMessage out of function scope r?padenot
Revision D76799 was moved to bug 1641161. Setting attachment 9151665 [details] to obsolete.
Comment 21•5 years ago
|
||
Comment on attachment 9151666 [details]
Bug 1285290 alias move() to std::move() in MediaTrackGraph.cpp and AudioContext.cpp r?padenot
Revision D76800 was moved to bug 1641161. Setting attachment 9151666 [details] to obsolete.
Comment 22•5 years ago
|
||
Comment on attachment 9151669 [details]
Bug 1285290 move code to choose the next GraphDriver to CheckDriver() r?padenot
Revision D76803 was moved to bug 1641161. Setting attachment 9151669 [details] to obsolete.
Comment 23•5 years ago
|
||
Comment on attachment 9151670 [details]
Bug 1285290 Document suspend/resume accounting wrt ApplyAudioContextOperation() r?padenot
Revision D76804 was moved to bug 1641161. Setting attachment 9151670 [details] to obsolete.
Comment 24•5 years ago
|
||
Comment on attachment 9151668 [details]
Bug 1285290 remove some graph-thread LIFECYCLE_RUNNING conditions r?padenot
Revision D76802 was moved to bug 1641161. Setting attachment 9151668 [details] to obsolete.
Updated•5 years ago
|
Comment 25•5 years ago
|
||
Comment 26•5 years ago
|
||
bugherder |
Assignee | ||
Comment 27•5 years ago
|
||
Bug 1644647 tracks remaining work. https://phabricator.services.mozilla.com/D76803 accidentally landed with the wrong bug number, so I'll use this bug to track that change.
Comment 28•5 years ago
|
||
Comment on attachment 9151667 [details]
Bug 1285290 use strong pointers for tracks in ApplyAudioContextOperation() r?padenot
Revision D76801 was moved to bug 1644647. Setting attachment 9151667 [details] to obsolete.
Comment 29•5 years ago
|
||
Comment on attachment 9151671 [details]
Bug 1285290 introduce PendingResumeOperation r?padenot
Revision D76805 was moved to bug 1644647. Setting attachment 9151671 [details] to obsolete.
Comment 30•5 years ago
|
||
Comment on attachment 9151672 [details]
Bug 1285290 rewrite AudioContextOperation handling using PendingResumeOperation r?padenot
Revision D76806 was moved to bug 1644647. Setting attachment 9151672 [details] to obsolete.
Comment 31•5 years ago
|
||
Comment on attachment 9151674 [details]
Bug 1285290 remove waits for suspend and resume completion added to workaround bug 1198386 r?padenot
Revision D76808 was moved to bug 1644647. Setting attachment 9151674 [details] to obsolete.
Description
•