Commit 9e99f93f by claincly Committed by Rohit Singh

Rename INPUT_TYPE_TEXID, and cleanup.

PiperOrigin-RevId: 525761936
parent f92a9a62
...@@ -47,22 +47,22 @@ public interface VideoFrameProcessor { ...@@ -47,22 +47,22 @@ public interface VideoFrameProcessor {
// TODO(b/243036513): Allow effects to be replaced. // TODO(b/243036513): Allow effects to be replaced.
/** /**
* Specifies how the input frames are made available to the {@link VideoFrameProcessor}. One of * Specifies how the input frames are made available to the {@link VideoFrameProcessor}. One of
* {@link #INPUT_TYPE_SURFACE}, {@link #INPUT_TYPE_BITMAP} or {@link #INPUT_TYPE_TEXID}. * {@link #INPUT_TYPE_SURFACE}, {@link #INPUT_TYPE_BITMAP} or {@link #INPUT_TYPE_TEXTURE_ID}.
*/ */
@Documented @Documented
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
@Target(TYPE_USE) @Target(TYPE_USE)
@IntDef({INPUT_TYPE_SURFACE, INPUT_TYPE_BITMAP, INPUT_TYPE_TEXID}) @IntDef({INPUT_TYPE_SURFACE, INPUT_TYPE_BITMAP, INPUT_TYPE_TEXTURE_ID})
public @interface InputType {} @interface InputType {}
/** Input frames come from a {@link #getInputSurface surface}. */ /** Input frames come from a {@link #getInputSurface surface}. */
public static final int INPUT_TYPE_SURFACE = 1; int INPUT_TYPE_SURFACE = 1;
/** Input frames come from a {@link Bitmap}. */ /** Input frames come from a {@link Bitmap}. */
public static final int INPUT_TYPE_BITMAP = 2; int INPUT_TYPE_BITMAP = 2;
/** /**
* Input frames come from a {@linkplain android.opengl.GLES10#GL_TEXTURE_2D traditional GLES * Input frames come from a {@linkplain android.opengl.GLES10#GL_TEXTURE_2D traditional GLES
* texture}. * texture}.
*/ */
public static final int INPUT_TYPE_TEXID = 3; int INPUT_TYPE_TEXTURE_ID = 3;
/** A factory for {@link VideoFrameProcessor} instances. */ /** A factory for {@link VideoFrameProcessor} instances. */
interface Factory { interface Factory {
......
...@@ -286,7 +286,7 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor { ...@@ -286,7 +286,7 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
new BitmapTextureManager(inputShaderProgram, videoFrameProcessingTaskExecutor); new BitmapTextureManager(inputShaderProgram, videoFrameProcessingTaskExecutor);
inputShaderProgram.setInputListener(inputBitmapTextureManager); inputShaderProgram.setInputListener(inputBitmapTextureManager);
break; break;
case VideoFrameProcessor.INPUT_TYPE_TEXID: // fall through case VideoFrameProcessor.INPUT_TYPE_TEXTURE_ID: // fall through
default: default:
throw new VideoFrameProcessingException("Input type not supported yet"); throw new VideoFrameProcessingException("Input type not supported yet");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment