Create a PVideoBridge connection from the RDD process to the GPU process
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
People
(Reporter: mattwoodrow, Assigned: u480271)
References
(Regression)
Details
(Keywords: regression)
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 |
Once we have the infrastructure for creating a video bridge from RDD to parent process (bug 1561178), we should also do it for the GPU process.
The setup for this will likely be the same (except that we have to also send the Endpoint across PGPU to the GPU process) and then we'll have two available in the RDD process.
We send across a TextureFactoryIdentifier when setting up a decoder, and that includes the GeckoProcessType of the compositor that will use the decoded frames, so we can use that to pick which video bridge to use.
The hard bit here is that both the RDD process and GPU process can crash at any time, and we want to recreate this connection whenever the crashed process re-initializes.
We need to think through what the desired behaviour is in each case.
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
A patch for this will likely look quite similar to 'Create a VideoBridge connection from the RDD process to the parent process' from bug 1561178.
Instead of posting the parent endpoint to the compositor thread, it'll need to be sent across PGPU to the GPU process, and then posted to the compositor thread.
We'll need to wait until both process are created, rather than doing it from the RDD process creation, and do it again if either process crashes.
There's probably some work to be done to make sure we gracefully handle the other process going away at any time (or decide that we always want to intentionally take them both down and restart both).
There's also some weird race conditions, like handing content asking for a video to be decoded and sent to the GPU before we've managed to setup the RDD<->GPU link. Having the RDD process crash, then the GPU process crash in the middle of RDD startup would also be fun. There's probably more things to explore and test here.
VideoBridgeParent also expects there to be only one bridge terminating in a given process, but this patch can make there be two (one from the gpu process decoder to gpu process compositor, one from RDD process decoder to gpu process compositor). We need to fix VideoBridgeParent::GetSingleton to handle this (by just duplicating it?), and fix the caller to know which one to look or (or to just look at both serially).
Reporter | ||
Comment 2•5 years ago
|
||
Michael, is this something you'd be interested in looking at? I'm going to be fairly busy with fission for the near future, so my progress on this will be slow.
Comment 3•5 years ago
|
||
Sorry for the slow response. I have a couple things I need to do first, but then I can take a look.
LaunchRDDProcess() and CreateContentBridge() create a sync creation. Merge the
functions into one function. Keep the IPDL messaging async to avoid adding a
exception for the message being sync.
Combine sVideoBridgeToParentProcess and sVideoBridgeToGPUProcess into one
sVideoBridge. Each producing process, GPU or RDD, is only ever started with one
VideoBridgeChild endpoint. This is enough to get RemoteVideoDecoders in RDD
process to start using GPU memory to send video to compositor over PVideoBridge.
Add an observer to restart the PVideoBridge connection when GPU process
restarts.
Assignee | ||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Pushed by dglastonbury@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4037cce56491 P1: Enable the creation of multiple VideoBridgeParent actors. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/55340b999a4e P2: Rename VideoBridge methods and members. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/4678da971197 P3: Merge LaunchRDDProcess and CreateContentBridge. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/e90af73ef3c4 P4: Create PVideoBridge between RDDProcess and GPUProcess. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/90c207dd2cc2 P5: Remove separate VideoBridgeChild Singletons. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/5d8059472045 P6: Handle shutdown of the GPU process and reconnect PVideoBridge. r=mattwoodrow
Comment 12•5 years ago
|
||
Backed out for perma fails on browser_timeout_throttling_with_audio_playback.
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=273816566&repo=autoland&lineNumber=12694
Backout: https://hg.mozilla.org/integration/autoland/rev/70a8eba83b144c51b405c521bfa15b37a9be4812
Comment 13•5 years ago
•
|
||
Assignee | ||
Comment 14•5 years ago
|
||
Which is strange because this change should only affect AV1 playback on Windows and these tests fail on Linux and my try runs were green. Will investigate.
Updated•5 years ago
|
Comment 15•5 years ago
|
||
Pushed by dglastonbury@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9942990fbff5 P1: Enable the creation of multiple VideoBridgeParent actors. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/8b9accb33804 P2: Rename VideoBridge methods and members. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/dc3f655d626e P3: Merge EnsureRDDReady into LaunchRDDProcess. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/e4d3547739db P4: Create PVideoBridge between RDDProcess and GPUProcess. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/fa6bf31d950b P5: Remove separate VideoBridgeChild Singletons. r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/7a1c07e301a9 P6: Handle shutdown of the GPU process and reconnect PVideoBridge. r=mattwoodrow
Comment 16•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9942990fbff5
https://hg.mozilla.org/mozilla-central/rev/8b9accb33804
https://hg.mozilla.org/mozilla-central/rev/dc3f655d626e
https://hg.mozilla.org/mozilla-central/rev/e4d3547739db
https://hg.mozilla.org/mozilla-central/rev/fa6bf31d950b
https://hg.mozilla.org/mozilla-central/rev/7a1c07e301a9
Updated•5 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Description
•