Wake up MediaTrackGraph thread on MessagePort messages
Categories
(Core :: Web Audio, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(6 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
This is necessary for OfflineAudioContext
s that have completed and realtime AudioContext
s that are suspended.
It might involve nsIThreadInternal.observer with nsIThreadObserver.onDispatchedEvent() calling MediaTrackGraphImpl::EnsureNextIteration().
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Since https://hg.mozilla.org/integration/autoland/rev/6b5d3b9abd98, a driver no longer has a GraphImpl()
method but has access to a GraphInterface
. That GraphInterface
is not necessarily a MediaTrackGraphImpl
in general, but is a MediaTrackGraphImpl
for OfflineClockDriver
.
Two options to register the graph as a thread observer from the offline rendering thread are:
-
Make
GraphInterface
annsISupports
for safe dynamic cast tonsIThreadObserver
. -
Use a
GraphRunner
thread fromOfflineClockDriver
.
At this stage I'm going with option 1 to avoid twice as many offline threads as necessary. Option 2 has the advantage of being more consistent with the realtime model. There's not much code required to maintain the differences, but that benefit may become more compelling when "media.audiograph.single_thread.enabled" is removed.
Assignee | ||
Comment 3•5 years ago
|
||
These patches keep the DestinationNode track after offline completion, but seem to interfere with MediaRecorder's detection of completion:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3cac8921c7961c9006ed89711c6395047715d27f
Assignee | ||
Comment 4•5 years ago
|
||
This will allow the class to be used from AudioDestinationNode.
Depends on D65067
Assignee | ||
Comment 5•5 years ago
|
||
This will allow the node to drop its self reference without
AudioContext::Shutdown().
Depends on D65068
Assignee | ||
Comment 6•5 years ago
|
||
This keeps the worklet/graph thread alive for control and MessagePort messages
until there are no references to main thread objects.
In test_getUserMedia_audioCapture, the track of the OscillatorNode being
recorded does not end, and, even if it did, MediaRecorder would not listen for
ended notification on the node's track but its pipe track. Recording via
DestinationNode works around this because the DestinationNode track ends and
MediaRecorder listens to this track directly because it has
EXTERNAL_OUTPUT. Previously MediaRecorder would stop when the MediaTrackGraph
was shutdown, but this is no longer happening.
Depends on D65069
Assignee | ||
Comment 7•5 years ago
|
||
This will allow OfflineClockDriver to obtain an nsIThreadObserver from the
GraphInterface when it is a MediaGraphTrackImpl.
Depends on D65070
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D65071
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D65072
Assignee | ||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/282dc3f24c33
https://hg.mozilla.org/mozilla-central/rev/28b225e74955
https://hg.mozilla.org/mozilla-central/rev/93abf903275b
https://hg.mozilla.org/mozilla-central/rev/e147eeeb5126
https://hg.mozilla.org/mozilla-central/rev/ebbf0af66075
https://hg.mozilla.org/mozilla-central/rev/50e126834071
Assignee | ||
Updated•4 years ago
|
Description
•