Run MediaStreamGraph from a single thread
Categories
(Core :: Audio/Video: MediaStreamGraph, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: karlt, Assigned: pehrsons)
References
(Depends on 2 open bugs)
Details
Attachments
(1 file)
For the sake of the JS implementation (see bug 1458448) and for simplicity in GraphDriver, we'd like to run the MediaStreamGraph on a single thread. The sensible way to do this would be to modify AudioIPC's API to allow the client to specify the thread. This project is therefore dependent on bug 1362220. Rendering audio with the new AudioIPC API could look something like: while (WaitCode::StartRendering == stream->Wait()) { (buffer_ptr, bytes_to_render) = stream->BeginRender(); graph->Render(buffer_ptr, bytes_to_render); stream->EndRender(); }
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/45c838c4137d Make MediaStreamGraph run on a single thread with AudioWorklets enabled. r=padenot
Comment 3•5 years ago
|
||
Backed out for various dom/worklet/failures
backout: https://hg.mozilla.org/integration/autoland/rev/163bec72cd71867012fe81c6f52aa2b5ef6a0ef3
failure log e.g: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=231281889&repo=autoland&lineNumber=4043
e.g https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=231282457&repo=autoland&lineNumber=5534
Assignee | ||
Comment 4•5 years ago
|
||
Thanks for backing out! I'll take a look.
Assignee | ||
Comment 5•5 years ago
|
||
These hangs happened when the audio callback got started faster than the GraphRunner's dedicated thread.
One case that I debugged with some logging, it took 25ms from MSG ctor to the first audio callback (e10s, cubeb sandbox), and 34ms for the GraphRunner thread to start running.
This made them both wait for each other.
I've made it so the audio callback will wait for the thread to start if it's early. Tests running at https://treeherder.mozilla.org/#/jobs?repo=try&revision=2051ae405f10e2d9863ed822e2e1d6718ec46928
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6070ee57c329 Make MediaStreamGraph run on a single thread with AudioWorklets enabled. r=padenot
Comment 7•5 years ago
|
||
bugherder |
Reporter | ||
Updated•5 years ago
|
Description
•