Cleanup some deprecated constants

PiperOrigin-RevId: 388893920
This commit is contained in:
olly 2021-08-05 11:08:00 +01:00 committed by Christos Tsilopoulos
parent d0e426080b
commit 9dcfd90ef7
3 changed files with 16 additions and 65 deletions

View File

@ -92,6 +92,11 @@
* Remove `CastPlayer` specific playlist manipulation methods. Use
`setMediaItems`, `addMediaItems`, `removeMediaItem` and `moveMediaItem`
instead.
* Remove `Renderer.VIDEO_SCALING_MODE_*` constants. Use identically named
constants in `C` instead.
* Remove `C.MSG_*` constants. Use identically named constants in
`Renderer` instead, except for `C.MSG_SET_SURFACE`, which is replaced
with `Renderer.MSG_SET_VIDEO_OUTPUT`.
* UI:
* Add `setUseRewindAction` and `setUseFastForwardAction` to
`PlayerNotificationManager`, and `setUseFastForwardActionInCompactView`

View File

@ -708,30 +708,6 @@ public final class C {
*/
public static final UUID PLAYREADY_UUID = new UUID(0x9A04F07998404286L, 0xAB92E65BE0885F95L);
/** @deprecated Use {@code Renderer.MSG_SET_VIDEO_OUTPUT}. */
@Deprecated public static final int MSG_SET_SURFACE = 1;
/** @deprecated Use {@code Renderer.MSG_SET_VOLUME}. */
@Deprecated public static final int MSG_SET_VOLUME = 2;
/** @deprecated Use {@code Renderer.MSG_SET_AUDIO_ATTRIBUTES}. */
@Deprecated public static final int MSG_SET_AUDIO_ATTRIBUTES = 3;
/** @deprecated Use {@code Renderer.MSG_SET_SCALING_MODE}. */
@Deprecated public static final int MSG_SET_SCALING_MODE = 4;
/** @deprecated Use {@code Renderer.MSG_SET_AUX_EFFECT_INFO}. */
@Deprecated public static final int MSG_SET_AUX_EFFECT_INFO = 5;
/** @deprecated Use {@code Renderer.MSG_SET_VIDEO_FRAME_METADATA_LISTENER}. */
@Deprecated public static final int MSG_SET_VIDEO_FRAME_METADATA_LISTENER = 6;
/** @deprecated Use {@code Renderer.MSG_SET_CAMERA_MOTION_LISTENER}. */
@Deprecated public static final int MSG_SET_CAMERA_MOTION_LISTENER = 7;
/** @deprecated Use {@code Renderer.MSG_CUSTOM_BASE}. */
@Deprecated public static final int MSG_CUSTOM_BASE = 10000;
/**
* The stereo mode for 360/3D/VR videos. One of {@link Format#NO_VALUE}, {@link
* #STEREO_MODE_MONO}, {@link #STEREO_MODE_TOP_BOTTOM}, {@link #STEREO_MODE_LEFT_RIGHT} or {@link

View File

@ -81,15 +81,13 @@ public interface Renderer extends PlayerMessage.Target {
* <p>If the receiving renderer does not support the payload type as an output, then it will clear
* any existing output that it has.
*/
@SuppressWarnings("deprecation")
int MSG_SET_VIDEO_OUTPUT = C.MSG_SET_SURFACE;
int MSG_SET_VIDEO_OUTPUT = 1;
/**
* A type of a message that can be passed to an audio renderer via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link Float} with 0 being
* silence and 1 being unity gain.
*/
@SuppressWarnings("deprecation")
int MSG_SET_VOLUME = C.MSG_SET_VOLUME;
int MSG_SET_VOLUME = 2;
/**
* A type of a message that can be passed to an audio renderer via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be an {@link
@ -111,8 +109,7 @@ public interface Renderer extends PlayerMessage.Target {
* {@link Util#getAudioUsageForStreamType(int)} and use the returned {@link C.AudioUsage} to build
* an audio attributes instance.
*/
@SuppressWarnings("deprecation")
int MSG_SET_AUDIO_ATTRIBUTES = C.MSG_SET_AUDIO_ATTRIBUTES;
int MSG_SET_AUDIO_ATTRIBUTES = 3;
/**
* The type of a message that can be passed to a {@link MediaCodec}-based video renderer via
* {@link ExoPlayer#createMessage(Target)}. The message payload should be one of the integer
@ -121,42 +118,38 @@ public interface Renderer extends PlayerMessage.Target {
* <p>Note that the scaling mode only applies if the {@link Surface} targeted by the renderer is
* owned by a {@link android.view.SurfaceView}.
*/
@SuppressWarnings("deprecation")
int MSG_SET_SCALING_MODE = C.MSG_SET_SCALING_MODE;
int MSG_SET_SCALING_MODE = 4;
/**
* A type of a message that can be passed to an audio renderer via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be an {@link AuxEffectInfo}
* instance representing an auxiliary audio effect for the underlying audio track.
*/
@SuppressWarnings("deprecation")
int MSG_SET_AUX_EFFECT_INFO = C.MSG_SET_AUX_EFFECT_INFO;
int MSG_SET_AUX_EFFECT_INFO = 5;
/**
* The type of a message that can be passed to a video renderer via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link
* VideoFrameMetadataListener} instance, or null.
*/
@SuppressWarnings("deprecation")
int MSG_SET_VIDEO_FRAME_METADATA_LISTENER = C.MSG_SET_VIDEO_FRAME_METADATA_LISTENER;
int MSG_SET_VIDEO_FRAME_METADATA_LISTENER = 6;
/**
* The type of a message that can be passed to a camera motion renderer via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link CameraMotionListener}
* instance, or null.
*/
@SuppressWarnings("deprecation")
int MSG_SET_CAMERA_MOTION_LISTENER = C.MSG_SET_CAMERA_MOTION_LISTENER;
int MSG_SET_CAMERA_MOTION_LISTENER = 7;
/**
* The type of a message that can be passed to an audio renderer via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link Boolean} instance
* telling whether to enable or disable skipping silences in the audio stream.
*/
int MSG_SET_SKIP_SILENCE_ENABLED = 101;
int MSG_SET_SKIP_SILENCE_ENABLED = 8;
/**
* The type of a message that can be passed to audio and video renderers via {@link
* ExoPlayer#createMessage(Target)}. The message payload should be an {@link Integer} instance
* representing the audio session ID that will be attached to the underlying audio track. Video
* renderers that support tunneling will use the audio session ID when tunneling is enabled.
*/
int MSG_SET_AUDIO_SESSION_ID = 102;
int MSG_SET_AUDIO_SESSION_ID = 9;
/**
* The type of a message that can be passed to a {@link Renderer} via {@link
* ExoPlayer#createMessage(Target)}, to inform the renderer that it can schedule waking up another
@ -164,35 +157,12 @@ public interface Renderer extends PlayerMessage.Target {
*
* <p>The message payload must be a {@link WakeupListener} instance.
*/
int MSG_SET_WAKEUP_LISTENER = 103;
int MSG_SET_WAKEUP_LISTENER = 10;
/**
* Applications or extensions may define custom {@code MSG_*} constants that can be passed to
* renderers. These custom constants must be greater than or equal to this value.
*/
@SuppressWarnings("deprecation")
int MSG_CUSTOM_BASE = C.MSG_CUSTOM_BASE;
/** @deprecated Use {@link C.VideoScalingMode}. */
// VIDEO_SCALING_MODE_DEFAULT is an intentionally duplicated constant.
@SuppressWarnings({"UniqueConstants", "Deprecation"})
@Documented
@Retention(RetentionPolicy.SOURCE)
@IntDef(
value = {
VIDEO_SCALING_MODE_DEFAULT,
VIDEO_SCALING_MODE_SCALE_TO_FIT,
VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
})
@Deprecated
@interface VideoScalingMode {}
/** @deprecated Use {@link C#VIDEO_SCALING_MODE_SCALE_TO_FIT}. */
@Deprecated int VIDEO_SCALING_MODE_SCALE_TO_FIT = C.VIDEO_SCALING_MODE_SCALE_TO_FIT;
/** @deprecated Use {@link C#VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING}. */
@Deprecated
int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING =
C.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING;
/** @deprecated Use {@code C.VIDEO_SCALING_MODE_DEFAULT}. */
@Deprecated int VIDEO_SCALING_MODE_DEFAULT = C.VIDEO_SCALING_MODE_DEFAULT;
int MSG_CUSTOM_BASE = 10000;
/**
* The renderer states. One of {@link #STATE_DISABLED}, {@link #STATE_ENABLED} or {@link