mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00
Only join video graph output in playlist mode.
DefaultVideoSink.join() was called when join() was called on the InputVideoSink. This makes sense in playlist mode but we shouldn't join if the VideoGraph output is considered as a single clip. This change is no-op. Indeed, for CompositionPlayer, the allowedJoiningTimeMs is set to 0, so that join doesn't have any effect. PiperOrigin-RevId: 750238085
This commit is contained in:
parent
fe10ca2c9a
commit
4d68243158
@ -668,6 +668,10 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||
checkStateNotNull(handler).post(() -> pendingFlushCount--);
|
||||
}
|
||||
|
||||
private void joinPlayback(boolean renderNextFrameImmediately) {
|
||||
defaultVideoSink.join(renderNextFrameImmediately);
|
||||
}
|
||||
|
||||
private void setVideoFrameMetadataListener(
|
||||
VideoFrameMetadataListener videoFrameMetadataListener) {
|
||||
this.videoFrameMetadataListener = videoFrameMetadataListener;
|
||||
@ -1023,7 +1027,9 @@ public final class PlaybackVideoGraphWrapper implements VideoSinkProvider, Video
|
||||
|
||||
@Override
|
||||
public void join(boolean renderNextFrameImmediately) {
|
||||
defaultVideoSink.join(renderNextFrameImmediately);
|
||||
if (enablePlaylistMode) {
|
||||
PlaybackVideoGraphWrapper.this.joinPlayback(renderNextFrameImmediately);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user