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

@ -425,6 +425,18 @@ sealed interface AppPreference<Pref, T> {
summary = R.string.force_dovi_profile_7_summary,
)
val DecodeAv1 =
AppSwitchPreference<AppPreferences>(
title = R.string.software_decoding_av1,
defaultValue = true,
getter = { it.playbackPreferences.overrides.decodeAv1 },
setter = { prefs, value ->
prefs.updatePlaybackOverrides { decodeAv1 = value }
},
summaryOn = R.string.enabled,
summaryOff = R.string.disabled,
)
val RememberSelectedTab =
AppSwitchPreference<AppPreferences>(
title = R.string.remember_selected_tab,
@ -1004,6 +1016,7 @@ val advancedPreferences =
AppPreference.DirectPlayAss,
AppPreference.DirectPlayPgs,
AppPreference.DirectPlayDoviProfile7,
AppPreference.DecodeAv1,
),
),
ConditionalPreferences(