mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00
Re-position IntDefs in media3 stable API
These IntDefs are now annotated with TYPE_USE [1], so they can be moved to directly before the type (int). [1] Since <unknown commit> PiperOrigin-RevId: 406803555
This commit is contained in:
parent
3f4cde1873
commit
56b589c422
@ -128,8 +128,8 @@ public final class Format implements Bundleable {
|
||||
@Nullable private String id;
|
||||
@Nullable private String label;
|
||||
@Nullable private String language;
|
||||
@C.SelectionFlags private int selectionFlags;
|
||||
@C.RoleFlags private int roleFlags;
|
||||
private @C.SelectionFlags int selectionFlags;
|
||||
private @C.RoleFlags int roleFlags;
|
||||
private int averageBitrate;
|
||||
private int peakBitrate;
|
||||
@Nullable private String codecs;
|
||||
@ -620,9 +620,9 @@ public final class Format implements Bundleable {
|
||||
/** The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable. */
|
||||
@Nullable public final String language;
|
||||
/** Track selection flags. */
|
||||
@C.SelectionFlags public final int selectionFlags;
|
||||
public final @C.SelectionFlags int selectionFlags;
|
||||
/** Track role flags. */
|
||||
@C.RoleFlags public final int roleFlags;
|
||||
public final @C.RoleFlags int roleFlags;
|
||||
/**
|
||||
* The average bitrate in bits per second, or {@link #NO_VALUE} if unknown or not applicable. The
|
||||
* way in which this field is populated depends on the type of media to which the format
|
||||
|
@ -1235,8 +1235,8 @@ public final class MediaItem implements Bundleable {
|
||||
private Uri uri;
|
||||
@Nullable private String mimeType;
|
||||
@Nullable private String language;
|
||||
@C.SelectionFlags private int selectionFlags;
|
||||
@C.RoleFlags private int roleFlags;
|
||||
private @C.SelectionFlags int selectionFlags;
|
||||
private @C.RoleFlags int roleFlags;
|
||||
@Nullable private String label;
|
||||
|
||||
/**
|
||||
@ -1310,9 +1310,9 @@ public final class MediaItem implements Bundleable {
|
||||
/** The language. */
|
||||
@Nullable public final String language;
|
||||
/** The selection flags. */
|
||||
@C.SelectionFlags public final int selectionFlags;
|
||||
public final @C.SelectionFlags int selectionFlags;
|
||||
/** The role flags. */
|
||||
@C.RoleFlags public final int roleFlags;
|
||||
public final @C.RoleFlags int roleFlags;
|
||||
/** The label. */
|
||||
@Nullable public final String label;
|
||||
|
||||
|
@ -623,7 +623,7 @@ public final class MediaMetadata implements Bundleable {
|
||||
/** Optional artwork data as a compressed byte array. */
|
||||
@Nullable public final byte[] artworkData;
|
||||
/** Optional {@link PictureType} of the artwork data. */
|
||||
@Nullable @PictureType public final Integer artworkDataType;
|
||||
@Nullable public final @PictureType Integer artworkDataType;
|
||||
/** Optional artwork {@link Uri}. */
|
||||
@Nullable public final Uri artworkUri;
|
||||
/** Optional track number. */
|
||||
@ -631,7 +631,7 @@ public final class MediaMetadata implements Bundleable {
|
||||
/** Optional total number of tracks. */
|
||||
@Nullable public final Integer totalTrackCount;
|
||||
/** Optional {@link FolderType}. */
|
||||
@Nullable @FolderType public final Integer folderType;
|
||||
@Nullable public final @FolderType Integer folderType;
|
||||
/** Optional boolean for media playability. */
|
||||
@Nullable public final Boolean isPlayable;
|
||||
/** @deprecated Use {@link #recordingYear} instead. */
|
||||
|
@ -320,7 +320,7 @@ public class PlaybackException extends Exception implements Bundleable {
|
||||
}
|
||||
|
||||
/** An error code which identifies the cause of the playback failure. */
|
||||
@ErrorCode public final int errorCode;
|
||||
public final @ErrorCode int errorCode;
|
||||
|
||||
/** The value of {@link SystemClock#elapsedRealtime()} when this exception was created. */
|
||||
public final long timestampMs;
|
||||
|
@ -454,8 +454,7 @@ public interface Player {
|
||||
* @return The {@link Event} at the given index.
|
||||
* @throws IndexOutOfBoundsException If index is outside the allowed range.
|
||||
*/
|
||||
@Event
|
||||
public int get(int index) {
|
||||
public @Event int get(int index) {
|
||||
return flags.get(index);
|
||||
}
|
||||
|
||||
@ -870,8 +869,7 @@ public interface Player {
|
||||
* @return The {@link Command} at the given index.
|
||||
* @throws IndexOutOfBoundsException If index is outside the allowed range.
|
||||
*/
|
||||
@Command
|
||||
public int get(int index) {
|
||||
public @Command int get(int index) {
|
||||
return flags.get(index);
|
||||
}
|
||||
|
||||
|
@ -556,16 +556,16 @@ public final class Cue implements Bundleable {
|
||||
@Nullable private Alignment multiRowAlignment;
|
||||
private float line;
|
||||
@LineType private int lineType;
|
||||
@AnchorType private int lineAnchor;
|
||||
private @AnchorType int lineAnchor;
|
||||
private float position;
|
||||
@AnchorType private int positionAnchor;
|
||||
@TextSizeType private int textSizeType;
|
||||
private @AnchorType int positionAnchor;
|
||||
private @TextSizeType int textSizeType;
|
||||
private float textSize;
|
||||
private float size;
|
||||
private float bitmapHeight;
|
||||
private boolean windowColorSet;
|
||||
@ColorInt private int windowColor;
|
||||
@VerticalType private int verticalType;
|
||||
private @VerticalType int verticalType;
|
||||
private float shearDegrees;
|
||||
|
||||
public Builder() {
|
||||
|
@ -82,13 +82,13 @@ public class TrackSelectionParameters implements Bundleable {
|
||||
private ImmutableList<String> preferredVideoMimeTypes;
|
||||
// Audio
|
||||
private ImmutableList<String> preferredAudioLanguages;
|
||||
@C.RoleFlags private int preferredAudioRoleFlags;
|
||||
private @C.RoleFlags int preferredAudioRoleFlags;
|
||||
private int maxAudioChannelCount;
|
||||
private int maxAudioBitrate;
|
||||
private ImmutableList<String> preferredAudioMimeTypes;
|
||||
// Text
|
||||
private ImmutableList<String> preferredTextLanguages;
|
||||
@C.RoleFlags private int preferredTextRoleFlags;
|
||||
private @C.RoleFlags int preferredTextRoleFlags;
|
||||
private boolean selectUndeterminedTextLanguage;
|
||||
// General
|
||||
private boolean forceLowestBitrate;
|
||||
@ -781,7 +781,7 @@ public class TrackSelectionParameters implements Bundleable {
|
||||
* The preferred {@link C.RoleFlags} for audio tracks. {@code 0} selects the default track if
|
||||
* there is one, or the first track if there's no default. The default value is {@code 0}.
|
||||
*/
|
||||
@C.RoleFlags public final int preferredAudioRoleFlags;
|
||||
public final @C.RoleFlags int preferredAudioRoleFlags;
|
||||
/**
|
||||
* Maximum allowed audio channel count. The default value is {@link Integer#MAX_VALUE} (i.e. no
|
||||
* constraint).
|
||||
@ -811,7 +811,7 @@ public class TrackSelectionParameters implements Bundleable {
|
||||
* | {@link C#ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND} if the accessibility {@link CaptioningManager}
|
||||
* is enabled.
|
||||
*/
|
||||
@C.RoleFlags public final int preferredTextRoleFlags;
|
||||
public final @C.RoleFlags int preferredTextRoleFlags;
|
||||
/**
|
||||
* Whether a text track with undetermined language should be selected if no track with {@link
|
||||
* #preferredTextLanguages} is available, or if {@link #preferredTextLanguages} is unset. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user