mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Effect: Move common statement out of switch/case
PiperOrigin-RevId: 570323141
This commit is contained in:
parent
8953f26a5c
commit
fa51f8cd4d
1 changed files with 1 additions and 3 deletions
|
|
@ -111,7 +111,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
textureManager =
|
||||
new ExternalTextureManager(
|
||||
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
||||
break;
|
||||
case INPUT_TYPE_BITMAP:
|
||||
samplingShaderProgram =
|
||||
|
|
@ -128,7 +127,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
textureManager =
|
||||
new BitmapTextureManager(
|
||||
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
||||
break;
|
||||
case INPUT_TYPE_TEXTURE_ID:
|
||||
samplingShaderProgram =
|
||||
|
|
@ -145,11 +143,11 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
textureManager =
|
||||
new TexIdTextureManager(
|
||||
glObjectsProvider, samplingShaderProgram, videoFrameProcessingTaskExecutor);
|
||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
||||
break;
|
||||
default:
|
||||
throw new VideoFrameProcessingException("Unsupported input type " + inputType);
|
||||
}
|
||||
inputs.put(inputType, new Input(textureManager, samplingShaderProgram));
|
||||
}
|
||||
|
||||
/** Sets the {@link GlShaderProgram} that {@code InputSwitcher} outputs to. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue