Cleanup some deprecated constants
PiperOrigin-RevId: 388893920
This commit is contained in:
parent
d0e426080b
commit
9dcfd90ef7
@ -92,6 +92,11 @@
|
|||||||
* Remove `CastPlayer` specific playlist manipulation methods. Use
|
* Remove `CastPlayer` specific playlist manipulation methods. Use
|
||||||
`setMediaItems`, `addMediaItems`, `removeMediaItem` and `moveMediaItem`
|
`setMediaItems`, `addMediaItems`, `removeMediaItem` and `moveMediaItem`
|
||||||
instead.
|
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:
|
* UI:
|
||||||
* Add `setUseRewindAction` and `setUseFastForwardAction` to
|
* Add `setUseRewindAction` and `setUseFastForwardAction` to
|
||||||
`PlayerNotificationManager`, and `setUseFastForwardActionInCompactView`
|
`PlayerNotificationManager`, and `setUseFastForwardActionInCompactView`
|
||||||
|
@ -708,30 +708,6 @@ public final class C {
|
|||||||
*/
|
*/
|
||||||
public static final UUID PLAYREADY_UUID = new UUID(0x9A04F07998404286L, 0xAB92E65BE0885F95L);
|
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
|
* 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
|
* #STEREO_MODE_MONO}, {@link #STEREO_MODE_TOP_BOTTOM}, {@link #STEREO_MODE_LEFT_RIGHT} or {@link
|
||||||
|
@ -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
|
* <p>If the receiving renderer does not support the payload type as an output, then it will clear
|
||||||
* any existing output that it has.
|
* any existing output that it has.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_VIDEO_OUTPUT = 1;
|
||||||
int MSG_SET_VIDEO_OUTPUT = C.MSG_SET_SURFACE;
|
|
||||||
/**
|
/**
|
||||||
* A type of a message that can be passed to an audio renderer via {@link
|
* 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
|
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link Float} with 0 being
|
||||||
* silence and 1 being unity gain.
|
* silence and 1 being unity gain.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_VOLUME = 2;
|
||||||
int MSG_SET_VOLUME = C.MSG_SET_VOLUME;
|
|
||||||
/**
|
/**
|
||||||
* A type of a message that can be passed to an audio renderer via {@link
|
* 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
|
* 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
|
* {@link Util#getAudioUsageForStreamType(int)} and use the returned {@link C.AudioUsage} to build
|
||||||
* an audio attributes instance.
|
* an audio attributes instance.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_AUDIO_ATTRIBUTES = 3;
|
||||||
int MSG_SET_AUDIO_ATTRIBUTES = C.MSG_SET_AUDIO_ATTRIBUTES;
|
|
||||||
/**
|
/**
|
||||||
* The type of a message that can be passed to a {@link MediaCodec}-based video renderer via
|
* 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
|
* {@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
|
* <p>Note that the scaling mode only applies if the {@link Surface} targeted by the renderer is
|
||||||
* owned by a {@link android.view.SurfaceView}.
|
* owned by a {@link android.view.SurfaceView}.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_SCALING_MODE = 4;
|
||||||
int MSG_SET_SCALING_MODE = C.MSG_SET_SCALING_MODE;
|
|
||||||
/**
|
/**
|
||||||
* A type of a message that can be passed to an audio renderer via {@link
|
* 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}
|
* ExoPlayer#createMessage(Target)}. The message payload should be an {@link AuxEffectInfo}
|
||||||
* instance representing an auxiliary audio effect for the underlying audio track.
|
* instance representing an auxiliary audio effect for the underlying audio track.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_AUX_EFFECT_INFO = 5;
|
||||||
int MSG_SET_AUX_EFFECT_INFO = C.MSG_SET_AUX_EFFECT_INFO;
|
|
||||||
/**
|
/**
|
||||||
* The type of a message that can be passed to a video renderer via {@link
|
* 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
|
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link
|
||||||
* VideoFrameMetadataListener} instance, or null.
|
* VideoFrameMetadataListener} instance, or null.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_VIDEO_FRAME_METADATA_LISTENER = 6;
|
||||||
int MSG_SET_VIDEO_FRAME_METADATA_LISTENER = C.MSG_SET_VIDEO_FRAME_METADATA_LISTENER;
|
|
||||||
/**
|
/**
|
||||||
* The type of a message that can be passed to a camera motion renderer via {@link
|
* 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}
|
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link CameraMotionListener}
|
||||||
* instance, or null.
|
* instance, or null.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_SET_CAMERA_MOTION_LISTENER = 7;
|
||||||
int MSG_SET_CAMERA_MOTION_LISTENER = C.MSG_SET_CAMERA_MOTION_LISTENER;
|
|
||||||
/**
|
/**
|
||||||
* The type of a message that can be passed to an audio renderer via {@link
|
* 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
|
* ExoPlayer#createMessage(Target)}. The message payload should be a {@link Boolean} instance
|
||||||
* telling whether to enable or disable skipping silences in the audio stream.
|
* 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
|
* 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
|
* 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
|
* 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.
|
* 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
|
* 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
|
* 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.
|
* <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
|
* 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.
|
* renderers. These custom constants must be greater than or equal to this value.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
int MSG_CUSTOM_BASE = 10000;
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The renderer states. One of {@link #STATE_DISABLED}, {@link #STATE_ENABLED} or {@link
|
* The renderer states. One of {@link #STATE_DISABLED}, {@link #STATE_ENABLED} or {@link
|
||||||
|
Loading…
x
Reference in New Issue
Block a user