Add proguard keep rules for `ExoPlayer.setVideoEffects`

These symbols in `lib-effect` are referenced via reflection from
`CompositingVideoSinkProvider` in `lib-exoplayer` in order to avoid
a hard dependency from `lib-exoplayer` to `lib-effect`. Without this
keep rule, the symbols can get renamed by R8 resulting in the
invocations failing.

#minor-release

PiperOrigin-RevId: 601074636
This commit is contained in:
ibaker 2024-01-24 04:05:34 -08:00 committed by Copybara-Service
parent 9c1aaa7c43
commit e5621cc709
2 changed files with 10 additions and 1 deletions

View File

@ -61,3 +61,13 @@
-keepclasseswithmembers class androidx.media3.exoplayer.rtsp.RtspMediaSource$Factory {
<init>();
}
# Constructors and methods accessed via reflection in CompositingVideoSinkProvider
-dontnote androidx.media3.effect.PreviewingSingleInputVideoGraph$Factory
-keepclasseswithmembers class androidx.media3.effect.PreviewingSingleInputVideoGraph$Factory {
<init>(androidx.media3.common.VideoFrameProcessor$Factory);
}
-dontnote androidx.media3.effect.DefaultVideoFrameProcessor$Factory$Builder
-keepclasseswithmembers class androidx.media3.effect.DefaultVideoFrameProcessor$Factory$Builder {
build();
}

View File

@ -827,7 +827,6 @@ public final class CompositingVideoSinkProvider
Suppliers.memoize(
() -> {
try {
// TODO: b/284964524- Add LINT and proguard checks for media3.effect reflection.
Class<?> defaultVideoFrameProcessorFactoryBuilderClass =
Class.forName(
"androidx.media3.effect.DefaultVideoFrameProcessor$Factory$Builder");