Make MediaCodec decoders work in the GPU process as well as RDD
Categories
(Core :: Audio/Video: Playback, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 5 open bugs)
Details
Attachments
(3 external files)
This blocks AImageReader from just working because we are in the wrong process. We need the RDD in case we fall back to parent process compositing on Android, but we can default to using the GPU process for decoding for AImageReader purposes.
Comment 1•1 month ago
|
||
D279451 of Bug 1649110 pref change enables AImageReader and native MediaCodec in GPU process.
Updated•19 days ago
|
| Assignee | ||
Comment 2•13 days ago
|
||
This allows MediaCodec video decoding to use AImageReader. The CDM must be in
the same process as the decoders using it, so the CDM is created in the GPU
process when decoding there is enabled, and only then may audio be decoded
there. If the GPU process is disabled, we fall back to the RDD process. We also
no longer disable decoding in the GPU process separately on Android after
crashes, so a decoder which repeatedly crashes the GPU process will cause it to
be relaunched until it is disabled entirely after too many restarts. The GPU
process now also probes for MediaCodec encoders, so that encoding is preferred
there in the same way, and the media manager endpoint for the GPU process is
created if either decoding or encoding there is enabled.
| Assignee | ||
Comment 3•13 days ago
|
||
The RDD process no longer creates MediaCodec decoders or encoders while the GPU
process is enabled and decoding or encoding in it is preferred, and the content
process no longer reports hardware decoding support for the RDD process then.
Pure software decoding and encoding with ffvpx may still be performed outside
of the GPU process since it is not permitted there.
Note that if creating a decoder in the GPU process fails for a reason other
than a crash, we no longer retry with MediaCodec in the RDD process, so codecs
without a software decoder, such as H264 and HEVC, will fail to decode.
The test checks that video decoding prefers the GPU process, and that only
hardware decoding is performed in the GPU process, and only software decoding
is performed in the RDD process unless the GPU process is unavailable.
| Assignee | ||
Comment 4•13 days ago
|
||
Comment 6•11 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8cd5e3a984a9
https://hg.mozilla.org/mozilla-central/rev/f7acecbf2a9f
https://hg.mozilla.org/mozilla-central/rev/15f537110a84
Description
•