DefaultVideoSink: implement initialize() and isInitialized()

The implementation is straightforward as there is nothing to init.

PiperOrigin-RevId: 683596706
This commit is contained in:
kimvde 2024-10-08 06:23:01 -07:00 committed by Copybara-Service
parent 62864d5475
commit 5f935ef22e
2 changed files with 3 additions and 2 deletions

View File

@ -67,12 +67,12 @@ import java.util.concurrent.Executor;
@Override @Override
public void initialize(Format sourceFormat) { public void initialize(Format sourceFormat) {
throw new UnsupportedOperationException(); // Do nothing as there is no initialization needed.
} }
@Override @Override
public boolean isInitialized() { public boolean isInitialized() {
throw new UnsupportedOperationException(); return true;
} }
@Override @Override

View File

@ -396,6 +396,7 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
} catch (VideoFrameProcessingException e) { } catch (VideoFrameProcessingException e) {
throw new VideoSink.VideoSinkException(e, sourceFormat); throw new VideoSink.VideoSinkException(e, sourceFormat);
} }
defaultVideoSink.initialize(sourceFormat);
state = STATE_INITIALIZED; state = STATE_INITIALIZED;
return videoGraph.getProcessor(/* inputIndex= */ 0); return videoGraph.getProcessor(/* inputIndex= */ 0);
} }