mirror of
https://github.com/androidx/media.git
synced 2025-05-04 22:20:47 +08:00
Use Size in MSG_SET_VIDEO_OUTPUT_RESOLUTION.
PiperOrigin-RevId: 495055151
This commit is contained in:
parent
c3ca71fda7
commit
d77ceaacc4
@ -2946,7 +2946,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 com.google.android.exoplayer2;
|
|||||||
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 com.google.android.exoplayer2.audio.AuxEffectInfo;
|
|||||||
import com.google.android.exoplayer2.source.SampleStream;
|
import com.google.android.exoplayer2.source.SampleStream;
|
||||||
import com.google.android.exoplayer2.util.Effect;
|
import com.google.android.exoplayer2.util.Effect;
|
||||||
import com.google.android.exoplayer2.util.MediaClock;
|
import com.google.android.exoplayer2.util.MediaClock;
|
||||||
|
import com.google.android.exoplayer2.util.Size;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import com.google.android.exoplayer2.video.VideoDecoderOutputBufferRenderer;
|
import com.google.android.exoplayer2.video.VideoDecoderOutputBufferRenderer;
|
||||||
import com.google.android.exoplayer2.video.VideoFrameMetadataListener;
|
import com.google.android.exoplayer2.video.VideoFrameMetadataListener;
|
||||||
@ -207,9 +207,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;
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user