mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
PlaybackVideoGraphWrapper: rename VideoSinkImpl to InputVideoSink
PlaybackVideoGraphWrapper will soon contain an input and an output video sink, as the rendering of the VideoGraph output frames will be handled by a DefaultVideoSink instance. PiperOrigin-RevId: 683167795
This commit is contained in:
parent
af922fbcb0
commit
8d0b82dfc3
1 changed files with 6 additions and 8 deletions
|
|
@ -227,7 +227,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
private static final Executor NO_OP_EXECUTOR = runnable -> {};
|
private static final Executor NO_OP_EXECUTOR = runnable -> {};
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final VideoSinkImpl videoSinkImpl;
|
private final InputVideoSink inputVideoSink;
|
||||||
private final VideoFrameReleaseControl videoFrameReleaseControl;
|
private final VideoFrameReleaseControl videoFrameReleaseControl;
|
||||||
private final VideoFrameRenderControl videoFrameRenderControl;
|
private final VideoFrameRenderControl videoFrameRenderControl;
|
||||||
private final PreviewingVideoGraph.Factory previewingVideoGraphFactory;
|
private final PreviewingVideoGraph.Factory previewingVideoGraphFactory;
|
||||||
|
|
@ -253,7 +253,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
|
|
||||||
private PlaybackVideoGraphWrapper(Builder builder) {
|
private PlaybackVideoGraphWrapper(Builder builder) {
|
||||||
context = builder.context;
|
context = builder.context;
|
||||||
videoSinkImpl = new VideoSinkImpl(context);
|
inputVideoSink = new InputVideoSink(context);
|
||||||
clock = builder.clock;
|
clock = builder.clock;
|
||||||
videoFrameReleaseControl = builder.videoFrameReleaseControl;
|
videoFrameReleaseControl = builder.videoFrameReleaseControl;
|
||||||
videoFrameReleaseControl.setClock(clock);
|
videoFrameReleaseControl.setClock(clock);
|
||||||
|
|
@ -263,7 +263,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
compositionEffects = builder.compositionEffects;
|
compositionEffects = builder.compositionEffects;
|
||||||
listeners = new CopyOnWriteArraySet<>();
|
listeners = new CopyOnWriteArraySet<>();
|
||||||
state = STATE_CREATED;
|
state = STATE_CREATED;
|
||||||
addListener(videoSinkImpl);
|
addListener(inputVideoSink);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -288,7 +288,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VideoSink getSink() {
|
public VideoSink getSink() {
|
||||||
return videoSinkImpl;
|
return inputVideoSink;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -483,7 +483,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Receives input from an ExoPlayer renderer and forwards it to the video graph. */
|
/** Receives input from an ExoPlayer renderer and forwards it to the video graph. */
|
||||||
private final class VideoSinkImpl implements VideoSink, PlaybackVideoGraphWrapper.Listener {
|
private final class InputVideoSink implements VideoSink, PlaybackVideoGraphWrapper.Listener {
|
||||||
|
|
||||||
private final int videoFrameProcessorMaxPendingFrameCount;
|
private final int videoFrameProcessorMaxPendingFrameCount;
|
||||||
private final ArrayList<Effect> videoEffects;
|
private final ArrayList<Effect> videoEffects;
|
||||||
|
|
@ -513,7 +513,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
private Executor listenerExecutor;
|
private Executor listenerExecutor;
|
||||||
|
|
||||||
/** Creates a new instance. */
|
/** Creates a new instance. */
|
||||||
public VideoSinkImpl(Context context) {
|
public InputVideoSink(Context context) {
|
||||||
// TODO b/226330223 - Investigate increasing frame count when frame dropping is allowed.
|
// TODO b/226330223 - Investigate increasing frame count when frame dropping is allowed.
|
||||||
// TODO b/278234847 - Evaluate whether limiting frame count when frame dropping is not allowed
|
// TODO b/278234847 - Evaluate whether limiting frame count when frame dropping is not allowed
|
||||||
// reduces decoder timeouts, and consider restoring.
|
// reduces decoder timeouts, and consider restoring.
|
||||||
|
|
@ -527,8 +527,6 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||||
listenerExecutor = NO_OP_EXECUTOR;
|
listenerExecutor = NO_OP_EXECUTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// VideoSink impl
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRendererEnabled(boolean mayRenderStartOfStream) {
|
public void onRendererEnabled(boolean mayRenderStartOfStream) {
|
||||||
videoFrameReleaseControl.onEnabled(mayRenderStartOfStream);
|
videoFrameReleaseControl.onEnabled(mayRenderStartOfStream);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue