mirror of
https://github.com/androidx/media.git
synced 2025-05-21 23:56:32 +08:00
Remove VideoSink.isFrameDropAllowedOnInput
This is an unnecessary layer PiperOrigin-RevId: 665267029
This commit is contained in:
parent
9b69690856
commit
266f16823f
@ -465,7 +465,7 @@ public final class CompositingVideoSinkProvider implements VideoSinkProvider, Vi
|
||||
|
||||
/** Receives input from an ExoPlayer renderer and forwards it to the video graph. */
|
||||
private final class VideoSinkImpl implements VideoSink, CompositingVideoSinkProvider.Listener {
|
||||
private final Context context;
|
||||
|
||||
private final int videoFrameProcessorMaxPendingFrameCount;
|
||||
private final ArrayList<Effect> videoEffects;
|
||||
private final VideoFrameReleaseControl.FrameReleaseInfo frameReleaseInfo;
|
||||
@ -494,7 +494,6 @@ public final class CompositingVideoSinkProvider implements VideoSinkProvider, Vi
|
||||
|
||||
/** Creates a new instance. */
|
||||
public VideoSinkImpl(Context context) {
|
||||
this.context = context;
|
||||
// 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
|
||||
// reduces decoder timeouts, and consider restoring.
|
||||
@ -607,11 +606,6 @@ public final class CompositingVideoSinkProvider implements VideoSinkProvider, Vi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFrameDropAllowedOnInput() {
|
||||
return Util.isFrameDropAllowedOnSurfaceInput(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Surface getInputSurface() {
|
||||
checkState(isInitialized());
|
||||
|
@ -1039,9 +1039,9 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
||||
codecInfo, mediaFormat, format, codecSurface, crypto);
|
||||
}
|
||||
|
||||
@SuppressWarnings("InlinedApi") // VideoSink will check the API level
|
||||
@SuppressWarnings("InlinedApi") // The API level is checked in the utility method
|
||||
private void maybeSetKeyAllowFrameDrop(MediaFormat mediaFormat) {
|
||||
if (videoSink != null && !videoSink.isFrameDropAllowedOnInput()) {
|
||||
if (videoSink != null && !Util.isFrameDropAllowedOnSurfaceInput(context)) {
|
||||
mediaFormat.setInteger(MediaFormat.KEY_ALLOW_FRAME_DROP, 0);
|
||||
}
|
||||
}
|
||||
|
@ -180,12 +180,6 @@ public interface VideoSink {
|
||||
/** Returns whether all the data has been rendered to the output surface. */
|
||||
boolean isEnded();
|
||||
|
||||
/**
|
||||
* Returns whether frames could be dropped from the sink's {@linkplain #getInputSurface() input
|
||||
* surface}.
|
||||
*/
|
||||
boolean isFrameDropAllowedOnInput();
|
||||
|
||||
/**
|
||||
* Returns the input {@link Surface} where the video sink consumes input frames from.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user