mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Add release method to VideoSink
PiperOrigin-RevId: 630958612
This commit is contained in:
parent
8a8dfbed71
commit
6add3a1dba
3 changed files with 9 additions and 1 deletions
|
|
@ -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…
Reference in a new issue