Add optional AV1 software decoding via dav1d for ExoPlayer (#721)

## Description
Adds the [`dav1d` decoder
module](https://github.com/androidx/media/tree/release/libraries/decoder_av1)
for ExoPlayer as an option. It can be enabled in advanced settings.

Performance will vary between devices.

### Related issues
Closes #103

### Dev notes

As with the ffmpeg module, this one is not required to build the entire
app so it's easier for developers to get started.

This also introduces a customized `DefaultRenderersFactory` for
ExoPlayer, but its largely copied from the super class's implementation.
This commit is contained in:
Ray 2026-01-18 18:35:41 -05:00 committed by GitHub
parent a0329b2c1d
commit 4dd44b935c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 170 additions and 36 deletions

View file

@ -21,6 +21,7 @@ plugins {
val isCI = if (System.getenv("CI") != null) System.getenv("CI").toBoolean() else false
val shouldSign = isCI && System.getenv("KEY_ALIAS") != null
val ffmpegModuleExists = project.file("libs/lib-decoder-ffmpeg-release.aar").exists()
val av1ModuleExists = project.file("libs/lib-decoder-av1-release.aar").exists()
val gitTags =
providers
@ -291,6 +292,9 @@ dependencies {
if (ffmpegModuleExists || isCI) {
implementation(files("libs/lib-decoder-ffmpeg-release.aar"))
}
if (av1ModuleExists || isCI) {
implementation(files("libs/lib-decoder-av1-release.aar"))
}
testImplementation(libs.mockk.android)
testImplementation(libs.mockk.agent)