Add release method to VideoSink
PiperOrigin-RevId: 630958612
This commit is contained in:
parent
8a8dfbed71
commit
6add3a1dba
@ -764,6 +764,11 @@ public final class CompositingVideoSinkProvider
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
CompositingVideoSinkProvider.this.release();
|
||||
}
|
||||
|
||||
// Other methods
|
||||
|
||||
/** Sets the {@linkplain Effect video effects}. */
|
||||
|
@ -734,7 +734,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
||||
protected void onRelease() {
|
||||
super.onRelease();
|
||||
if (ownsVideoSinkProvider) {
|
||||
videoSinkProvider.release();
|
||||
videoSink.release();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,4 +212,7 @@ public interface VideoSink {
|
||||
* @throws VideoSinkException If an error occurs during rendering.
|
||||
*/
|
||||
void render(long positionUs, long elapsedRealtimeUs) throws VideoSinkException;
|
||||
|
||||
/** Releases the sink. */
|
||||
void release();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user