diff --git a/libraries/common/src/main/java/androidx/media3/common/VideoFrameProcessor.java b/libraries/common/src/main/java/androidx/media3/common/VideoFrameProcessor.java index 86fec35cae..a5e67d4022 100644 --- a/libraries/common/src/main/java/androidx/media3/common/VideoFrameProcessor.java +++ b/libraries/common/src/main/java/androidx/media3/common/VideoFrameProcessor.java @@ -208,7 +208,7 @@ public interface VideoFrameProcessor { void registerInputFrame(); /** - * returns the number of input frames that have been made available to the {@code + * Returns the number of input frames that have been made available to the {@code * VideoFrameProcessor} but have not been processed yet. * *

Can be called on any thread. diff --git a/libraries/effect/src/main/java/androidx/media3/effect/BitmapTextureManager.java b/libraries/effect/src/main/java/androidx/media3/effect/BitmapTextureManager.java index 720ade53be..950971b3c2 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/BitmapTextureManager.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/BitmapTextureManager.java @@ -21,10 +21,8 @@ import static java.lang.Math.round; import android.graphics.Bitmap; import android.opengl.GLES20; import android.opengl.GLUtils; -import android.view.Surface; import androidx.annotation.Nullable; import androidx.media3.common.C; -import androidx.media3.common.FrameInfo; import androidx.media3.common.GlTextureInfo; import androidx.media3.common.VideoFrameProcessingException; import androidx.media3.common.util.GlUtil; @@ -79,11 +77,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; }); } - @Override - public void setDefaultBufferSize(int width, int height) { - throw new UnsupportedOperationException(); - } - @Override public void queueInputBitmap( Bitmap inputBitmap, long durationUs, float frameRate, boolean useHdr) { @@ -91,16 +84,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull; () -> setupBitmap(inputBitmap, durationUs, frameRate, useHdr)); } - @Override - public Surface getInputSurface() { - throw new UnsupportedOperationException(); - } - - @Override - public void registerInputFrame(FrameInfo frameInfo) { - // Do nothing. - } - @Override public int getPendingFrameCount() { // Always treat all queued bitmaps as immediately processed. diff --git a/libraries/effect/src/main/java/androidx/media3/effect/ExternalTextureManager.java b/libraries/effect/src/main/java/androidx/media3/effect/ExternalTextureManager.java index bc3702ad53..0750fb7ca2 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/ExternalTextureManager.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/ExternalTextureManager.java @@ -17,7 +17,6 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkStateNotNull; -import android.graphics.Bitmap; import android.graphics.SurfaceTexture; import android.view.Surface; import androidx.annotation.Nullable; @@ -110,12 +109,6 @@ import java.util.concurrent.atomic.AtomicInteger; surfaceTexture.setDefaultBufferSize(width, height); } - @Override - public void queueInputBitmap( - Bitmap inputBitmap, long durationUs, float frameRate, boolean useHdr) { - throw new UnsupportedOperationException(); - } - @Override public Surface getInputSurface() { return surface; diff --git a/libraries/effect/src/main/java/androidx/media3/effect/InputHandler.java b/libraries/effect/src/main/java/androidx/media3/effect/InputHandler.java index ed9a7d4e97..4d3b5f5bd1 100644 --- a/libraries/effect/src/main/java/androidx/media3/effect/InputHandler.java +++ b/libraries/effect/src/main/java/androidx/media3/effect/InputHandler.java @@ -32,24 +32,33 @@ import androidx.media3.common.VideoFrameProcessor; * *

Only works when the input is received on a {@link SurfaceTexture}. */ - void setDefaultBufferSize(int width, int height); + default void setDefaultBufferSize(int width, int height) { + throw new UnsupportedOperationException(); + } /** * Provides an input {@link Bitmap} to put into the video frames. * * @see VideoFrameProcessor#queueInputBitmap */ - void queueInputBitmap(Bitmap inputBitmap, long durationUs, float frameRate, boolean useHdr); + default void queueInputBitmap( + Bitmap inputBitmap, long durationUs, float frameRate, boolean useHdr) { + throw new UnsupportedOperationException(); + } /** * See {@link VideoFrameProcessor#getInputSurface}. * *

Only works when the input is received on a {@link SurfaceTexture}. */ - Surface getInputSurface(); + default Surface getInputSurface() { + throw new UnsupportedOperationException(); + } /** Informs the {@code InputHandler} that a frame will be queued. */ - void registerInputFrame(FrameInfo frameInfo); + default void registerInputFrame(FrameInfo frameInfo) { + throw new UnsupportedOperationException(); + } /** See {@link VideoFrameProcessor#getPendingInputFrameCount}. */ int getPendingFrameCount();