Commit 62b3a39b by claincly Committed by Ian Baker

Use Size in MSG_SET_VIDEO_OUTPUT_RESOLUTION.

PiperOrigin-RevId: 495055151
parent 610e431c
...@@ -2957,7 +2957,7 @@ import java.util.concurrent.TimeoutException; ...@@ -2957,7 +2957,7 @@ import java.util.concurrent.TimeoutException;
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
maybeNotifySurfaceSizeChanged(width, height); maybeNotifySurfaceSizeChanged(width, height);
sendRendererMessage( sendRendererMessage(
TRACK_TYPE_VIDEO, MSG_SET_VIDEO_OUTPUT_RESOLUTION, Pair.create(width, height)); TRACK_TYPE_VIDEO, MSG_SET_VIDEO_OUTPUT_RESOLUTION, new Size(width, height));
} }
@Override @Override
......
...@@ -18,7 +18,6 @@ package androidx.media3.exoplayer; ...@@ -18,7 +18,6 @@ package androidx.media3.exoplayer;
import static java.lang.annotation.ElementType.TYPE_USE; import static java.lang.annotation.ElementType.TYPE_USE;
import android.media.MediaCodec; import android.media.MediaCodec;
import android.util.Pair;
import android.view.Surface; import android.view.Surface;
import androidx.annotation.IntDef; import androidx.annotation.IntDef;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
...@@ -28,6 +27,7 @@ import androidx.media3.common.C; ...@@ -28,6 +27,7 @@ import androidx.media3.common.C;
import androidx.media3.common.Effect; import androidx.media3.common.Effect;
import androidx.media3.common.Format; import androidx.media3.common.Format;
import androidx.media3.common.Player; import androidx.media3.common.Player;
import androidx.media3.common.util.Size;
import androidx.media3.common.util.UnstableApi; import androidx.media3.common.util.UnstableApi;
import androidx.media3.common.util.Util; import androidx.media3.common.util.Util;
import androidx.media3.exoplayer.analytics.PlayerId; import androidx.media3.exoplayer.analytics.PlayerId;
...@@ -211,9 +211,8 @@ public interface Renderer extends PlayerMessage.Target { ...@@ -211,9 +211,8 @@ public interface Renderer extends PlayerMessage.Target {
int MSG_SET_PREFERRED_AUDIO_DEVICE = 12; int MSG_SET_PREFERRED_AUDIO_DEVICE = 12;
/** /**
* The type of a message that can be passed to a video renderer to set the desired output * The type of a message that can be passed to a video renderer to set the desired output
* resolution. The message payload should be a {@link Pair} containing the desired output width * resolution. The message payload should be a {@link Size} of the desired output width and
* and height, in {@link Integer} instances. Use this method only when playing with video {@link * height. Use this method only when playing with video {@link Effect}.
* Effect}.
*/ */
int MSG_SET_VIDEO_OUTPUT_RESOLUTION = 13; int MSG_SET_VIDEO_OUTPUT_RESOLUTION = 13;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment