Closed Bug 2082552 Opened 26 days ago Closed 16 days ago

Wait for the GPU process to recover before recreating decoders/encoders

Categories

(Core :: Audio/Video, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

On Android, we want to recreate a video decoder in the GPU process if we were previously using the GPU process. This is because we might be using AImageReader for our frames, and that only works in the GPU process itself. Additionally SurfaceTexture, which is what we would fallback to when decoding via MediaCodec NDK in the RDD process, would need us to have disabled ANGLE use, which will only happen if we fall back to parent process compositing. As such, we need to wait for the GPU process to come back, and if it is disabled, only then fall back to the RDD, so that playback can resume smoothly.

We assumed the GPU process was always ready, so creation could race with
crash recovery. Now creation in the GPU process waits for the new endpoint,
and is rejected if the GPU process, or decoding in it, was disabled so that
callers may use another process.

Previously, creation during crash recovery would fail and fallback to another
process, such as RDD on Windows. Now it waits for the GPU process to be
recreated. On Android, the GPU process is only relaunched when the app is in
the foreground, so creation waits until then. If the content process is not
given new endpoints when rendering is reinitialized, creation waits until it
is reinitialized again, as tasks deferred until the GPU process is recreated
already did.

Tasks deferred until the GPU process is recreated now also run if we were
not given a new endpoint, instead of never running.

Blocks: 2080180
Depends on: 2082607
Pushed by aosmond@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/42eb30ee5f05 https://hg.mozilla.org/integration/autoland/rev/d19aedb3419d Wait for the GPU process to be recreated before creating remote decoders and encoders in it. r=media-playback-reviewers,padenot
Status: ASSIGNED → RESOLVED
Closed: 16 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: