EME test failures with native MediaCodec and with AImageReader on Android
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
People
(Reporter: sotaro, Unassigned)
References
(Depends on 1 open bug, Blocks 6 open bugs)
Details
Attachments
(1 external file)
When native MediaCodec was used, some EME test failed.
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Comment 1•1 month ago
•
|
||
Comment 2•1 month ago
|
||
I have them passing:
https://treeherder.mozilla.org/jobs?repo=try&searchStr=android%2Ceme&revision=213b3a47be30be86ff819a513dacfbeae21fe4d5
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Comment 3•1 month ago
|
||
| Reporter | ||
Comment 4•1 month ago
|
||
When AImageReader is used, AImageReader and FFmpegVideoDecoder are allocated in GPU process. But with EME, audio decoder and video decoder needs to be in same process. Current gecko does not expect to allocate audio decoder in GPU process.
To be efficient video rendering, AImageReader and FFmpegVideoDecoder needs to be in GPU process.
Updated•1 month ago
|
Comment 5•25 days ago
|
||
| gecko-triage | ||
Analysis
The source tree agrees with comment 4. On Android, the native MediaCodec path creates the CDM in the RDD process. A decoder with a CDM can only run in the RDD process. But AImageReader runs only in the GPU process, and the GPU process decodes video only, not audio.
Affected code:
- MediaKeys.cpp: the CDM is created with
RemoteMediaIn::RddProcess. - RemoteDecoderModule.cpp: on Android, a decoder with a CDM gets no support outside the RDD process.
- RemoteMediaManagerChild.cpp: the GPU process gets
TrackSupport::DecodeVideoonly. - FFmpegVideoDecoder.cpp: AImageReader is used only when
XRE_IsGPUProcess()is true.
Next steps
The fix direction is to create the CDM in the GPU process when AImageReader is on. Then the GPU process must also accept the audio decoder and the video decoder with a CDM. The WIP patch D331496 follows this direction. This bug now blocks meta bug 1980764 (Android Media Codec NDK).
To give feedback on this comment, add a thumbs-up or thumbs-down reaction.
| Reporter | ||
Comment 6•4 days ago
|
||
The failure does not happen with latest m-c.
Description
•