mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove unnecessary method in VideoFrameRenderControl
PiperOrigin-RevId: 685632001
This commit is contained in:
parent
5eeedeacc6
commit
638eae44ab
@ -105,7 +105,7 @@ import java.util.concurrent.Executor;
|
||||
|
||||
@Override
|
||||
public void setPlaybackSpeed(float speed) {
|
||||
videoFrameRenderControl.setPlaybackSpeed(speed);
|
||||
videoFrameReleaseControl.setPlaybackSpeed(speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package androidx.media3.exoplayer.video;
|
||||
|
||||
import static androidx.media3.common.util.Assertions.checkArgument;
|
||||
import static androidx.media3.common.util.Util.msToUs;
|
||||
import static java.lang.Math.min;
|
||||
import static java.lang.annotation.ElementType.TYPE_USE;
|
||||
@ -22,6 +23,7 @@ import static java.lang.annotation.ElementType.TYPE_USE;
|
||||
import android.content.Context;
|
||||
import android.os.SystemClock;
|
||||
import android.view.Surface;
|
||||
import androidx.annotation.FloatRange;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
@ -402,7 +404,8 @@ public final class VideoFrameReleaseControl {
|
||||
}
|
||||
|
||||
/** Sets the playback speed. Called when the renderer playback speed changes. */
|
||||
public void setPlaybackSpeed(float speed) {
|
||||
public void setPlaybackSpeed(@FloatRange(from = 0, fromInclusive = false) float speed) {
|
||||
checkArgument(speed > 0);
|
||||
if (speed == playbackSpeed) {
|
||||
return;
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import static androidx.media3.common.util.Assertions.checkArgument;
|
||||
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||
import static androidx.media3.common.util.Assertions.checkStateNotNull;
|
||||
|
||||
import androidx.annotation.FloatRange;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.VideoFrameProcessor;
|
||||
@ -138,12 +137,6 @@ import androidx.media3.exoplayer.ExoPlaybackException;
|
||||
return lastPresentationTimeUs != C.TIME_UNSET && lastPresentationTimeUs >= presentationTimeUs;
|
||||
}
|
||||
|
||||
/** Sets the playback speed. */
|
||||
public void setPlaybackSpeed(@FloatRange(from = 0, fromInclusive = false) float speed) {
|
||||
checkArgument(speed > 0);
|
||||
videoFrameReleaseControl.setPlaybackSpeed(speed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Incrementally renders available video frames.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user