mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00
PlaybackVideoGraphWrapper: fix inputType discrepancy
PiperOrigin-RevId: 740699944
This commit is contained in:
parent
598ec00c5d
commit
d4ea3ad932
@ -780,9 +780,6 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||
@FirstFrameReleaseInstruction int firstFrameReleaseInstruction,
|
||||
List<Effect> videoEffects) {
|
||||
checkState(isInitialized());
|
||||
if (inputType != INPUT_TYPE_SURFACE && inputType != INPUT_TYPE_BITMAP) {
|
||||
throw new UnsupportedOperationException("Unsupported input type " + inputType);
|
||||
}
|
||||
setPendingVideoEffects(videoEffects);
|
||||
this.inputType = inputType;
|
||||
this.inputFormat = format;
|
||||
@ -1025,9 +1022,18 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||
.buildUpon()
|
||||
.setColorInfo(getAdjustedInputColorInfo(inputFormat.colorInfo))
|
||||
.build();
|
||||
@VideoFrameProcessor.InputType
|
||||
int videoGraphInputType =
|
||||
inputType == INPUT_TYPE_SURFACE
|
||||
? VideoFrameProcessor.INPUT_TYPE_SURFACE
|
||||
: VideoFrameProcessor.INPUT_TYPE_BITMAP;
|
||||
checkNotNull(videoGraph)
|
||||
.registerInputStream(
|
||||
inputIndex, inputType, adjustedInputFormat, videoEffects, /* offsetToAddUs= */ 0);
|
||||
inputIndex,
|
||||
videoGraphInputType,
|
||||
adjustedInputFormat,
|
||||
videoEffects,
|
||||
/* offsetToAddUs= */ 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user