Closed Bug 2067689 Opened 2 months ago Closed 1 month ago

Teach MCSInfo about decrypt/decrypt+decode support on Android

Categories

(Core :: Audio/Video, task)

All
Android
task

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 3 open bugs)

Details

Attachments

(5 external files)

KeySystemConfig::CreateWivineL3KeySystemConfigs is a mess right now where it advertises decrypt only support on Android, whereas we only support decrypt and decode:
https://searchfox.org/firefox-main/rev/bde88e0509310cea9d16d473d94d7d0f48632df2/dom/media/eme/KeySystemConfig.cpp#122

It works because the AndroidDecoderModule accepts the input anyways. It would be nice to consolidate this so that we are consistent between AndroidDecoderModule and FFmpegDecoderModule via ffvpx. Linking in the blocklist would be a nice bonus.

Also, moving this into the parent process at startup / near startup and caching it would solve crashes with isolated processes.

Depends on: 2075696

This will prove useful in a later patch in this series.

AndroidDecoderModule only needs the decoder info right now, but
when we refactor this into a set of gfxVars, we want to be able to
pull the encoders as well in one Java call.

This patch makes it so that we advertise what the platform supports
inside a gfxVar. This is not to be confused with that the decoder
and encoder modules on Android will advertise. For example, while
the platform may support Opus/Vorbis/FLAC, we won't generally use
those implementations as we prefer ffvpx. But we do need to know
for the purposes of EME decrypt and decode support, because we will
use what the MediaCodec NDK provides in that specific case.

This will reduce the amount of caching we need to do in the content,
utility and/or RDD processes.

This mirrors the work done in AndroidDecoderModule, but removes the
dependencies on Java for EME. This allows EME to work with isolated
processes, as well as makes the reporting accurate. We used to
advertise support for decrypt only, for FLAC/AV1/etc regardless of
what the platform supported. Now it accurately only supports
decrypt and decode for codecs supplied by the MediaCodec NDK.

Blocks: 1988531
Blocks: 2066002
Blocks: 2078311
See Also: → 2078311
Pushed by aosmond@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/89d19e3585d6 https://hg.mozilla.org/integration/autoland/rev/9a2965da5906 Part 1. Add decode/encode masking for MediaCodecsSupported to MCSInfo. r=media-playback-reviewers,alwu https://github.com/mozilla-firefox/firefox/commit/483481759fc5 https://hg.mozilla.org/integration/autoland/rev/9e3c44539fbb Part 2. Teach HardwareCodecCapabilityUtils to return both decoder and encoder info. r=geckoview-reviewers,media-playback-reviewers,owlish,azebrowski https://github.com/mozilla-firefox/firefox/commit/1f0f1a842b9b https://hg.mozilla.org/integration/autoland/rev/6696ce640257 Part 3. Add gfxVars containing summary of what Android platform supports. r=media-playback-reviewers,azebrowski https://github.com/mozilla-firefox/firefox/commit/8b665026f16a https://hg.mozilla.org/integration/autoland/rev/a947c039841e Part 4. Make AndroidDecoder/EncoderModule use the new gfxVars. r=ipc-reviewers,media-playback-reviewers,azebrowski https://github.com/mozilla-firefox/firefox/commit/4bd4a6112307 https://hg.mozilla.org/integration/autoland/rev/b2eec49cebe0 Part 5. Make KeySystemConfig/MediaKeySystemAccess use the new gfxVars. r=media-playback-reviewers,azebrowski
QA Whiteboard: [qa-triage-done-c160/b159]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: