Skip to content

Commit 97b8f1a

Browse files
icbakerSheenaChhabra
authored andcommitted
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 (cherry picked from commit e5621cc)
1 parent be0d531 commit 97b8f1a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎libraries/exoplayer/proguard-rules.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,13 @@
6161
-keepclasseswithmembers class androidx.media3.exoplayer.rtsp.RtspMediaSource$Factory {
6262
<init>();
6363
}
64+
65+
# Constructors and methods accessed via reflection in CompositingVideoSinkProvider
66+
-dontnote androidx.media3.effect.PreviewingSingleInputVideoGraph$Factory
67+
-keepclasseswithmembers class androidx.media3.effect.PreviewingSingleInputVideoGraph$Factory {
68+
<init>(androidx.media3.common.VideoFrameProcessor$Factory);
69+
}
70+
-dontnote androidx.media3.effect.DefaultVideoFrameProcessor$Factory$Builder
71+
-keepclasseswithmembers class androidx.media3.effect.DefaultVideoFrameProcessor$Factory$Builder {
72+
build();
73+
}

‎libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/CompositingVideoSinkProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ private static final class ReflectiveDefaultVideoFrameProcessorFactory
827827
Suppliers.memoize(
828828
() -> {
829829
try {
830-
// TODO: b/284964524- Add LINT and proguard checks for media3.effect reflection.
831830
Class<?> defaultVideoFrameProcessorFactoryBuilderClass =
832831
Class.forName(
833832
"androidx.media3.effect.DefaultVideoFrameProcessor$Factory$Builder");

0 commit comments

Comments
 (0)