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 id;
|
||||||
@Nullable private String label;
|
@Nullable private String label;
|
||||||
@Nullable private String language;
|
@Nullable private String language;
|
||||||
@C.SelectionFlags private int selectionFlags;
|
private @C.SelectionFlags int selectionFlags;
|
||||||
@C.RoleFlags private int roleFlags;
|
private @C.RoleFlags int roleFlags;
|
||||||
private int averageBitrate;
|
private int averageBitrate;
|
||||||
private int peakBitrate;
|
private int peakBitrate;
|
||||||
@Nullable private String codecs;
|
@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. */
|
/** The language as an IETF BCP 47 conformant tag, or null if unknown or not applicable. */
|
||||||
@Nullable public final String language;
|
@Nullable public final String language;
|
||||||
/** Track selection flags. */
|
/** Track selection flags. */
|
||||||
@C.SelectionFlags public final int selectionFlags;
|
public final @C.SelectionFlags int selectionFlags;
|
||||||
/** Track role flags. */
|
/** 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
|
* 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
|
* 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;
|
private Uri uri;
|
||||||
@Nullable private String mimeType;
|
@Nullable private String mimeType;
|
||||||
@Nullable private String language;
|
@Nullable private String language;
|
||||||
@C.SelectionFlags private int selectionFlags;
|
private @C.SelectionFlags int selectionFlags;
|
||||||
@C.RoleFlags private int roleFlags;
|
private @C.RoleFlags int roleFlags;
|
||||||
@Nullable private String label;
|
@Nullable private String label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1310,9 +1310,9 @@ public final class MediaItem implements Bundleable {
|
|||||||
/** The language. */
|
/** The language. */
|
||||||
@Nullable public final String language;
|
@Nullable public final String language;
|
||||||
/** The selection flags. */
|
/** The selection flags. */
|
||||||
@C.SelectionFlags public final int selectionFlags;
|
public final @C.SelectionFlags int selectionFlags;
|
||||||
/** The role flags. */
|
/** The role flags. */
|
||||||
@C.RoleFlags public final int roleFlags;
|
public final @C.RoleFlags int roleFlags;
|
||||||
/** The label. */
|
/** The label. */
|
||||||
@Nullable public final String label;
|
@Nullable public final String label;
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ public final class MediaMetadata implements Bundleable {
|
|||||||
/** Optional artwork data as a compressed byte array. */
|
/** Optional artwork data as a compressed byte array. */
|
||||||
@Nullable public final byte[] artworkData;
|
@Nullable public final byte[] artworkData;
|
||||||
/** Optional {@link PictureType} of the artwork data. */
|
/** Optional {@link PictureType} of the artwork data. */
|
||||||
@Nullable @PictureType public final Integer artworkDataType;
|
@Nullable public final @PictureType Integer artworkDataType;
|
||||||
/** Optional artwork {@link Uri}. */
|
/** Optional artwork {@link Uri}. */
|
||||||
@Nullable public final Uri artworkUri;
|
@Nullable public final Uri artworkUri;
|
||||||
/** Optional track number. */
|
/** Optional track number. */
|
||||||
@ -631,7 +631,7 @@ public final class MediaMetadata implements Bundleable {
|
|||||||
/** Optional total number of tracks. */
|
/** Optional total number of tracks. */
|
||||||
@Nullable public final Integer totalTrackCount;
|
@Nullable public final Integer totalTrackCount;
|
||||||
/** Optional {@link FolderType}. */
|
/** Optional {@link FolderType}. */
|
||||||
@Nullable @FolderType public final Integer folderType;
|
@Nullable public final @FolderType Integer folderType;
|
||||||
/** Optional boolean for media playability. */
|
/** Optional boolean for media playability. */
|
||||||
@Nullable public final Boolean isPlayable;
|
@Nullable public final Boolean isPlayable;
|
||||||
/** @deprecated Use {@link #recordingYear} instead. */
|
/** @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. */
|
/** 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. */
|
/** The value of {@link SystemClock#elapsedRealtime()} when this exception was created. */
|
||||||
public final long timestampMs;
|
public final long timestampMs;
|
||||||
|
@ -454,8 +454,7 @@ public interface Player {
|
|||||||
* @return The {@link Event} at the given index.
|
* @return The {@link Event} at the given index.
|
||||||
* @throws IndexOutOfBoundsException If index is outside the allowed range.
|
* @throws IndexOutOfBoundsException If index is outside the allowed range.
|
||||||
*/
|
*/
|
||||||
@Event
|
public @Event int get(int index) {
|
||||||
public int get(int index) {
|
|
||||||
return flags.get(index);
|
return flags.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,8 +869,7 @@ public interface Player {
|
|||||||
* @return The {@link Command} at the given index.
|
* @return The {@link Command} at the given index.
|
||||||
* @throws IndexOutOfBoundsException If index is outside the allowed range.
|
* @throws IndexOutOfBoundsException If index is outside the allowed range.
|
||||||
*/
|
*/
|
||||||
@Command
|
public @Command int get(int index) {
|
||||||
public int get(int index) {
|
|
||||||
return flags.get(index);
|
return flags.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,16 +556,16 @@ public final class Cue implements Bundleable {
|
|||||||
@Nullable private Alignment multiRowAlignment;
|
@Nullable private Alignment multiRowAlignment;
|
||||||
private float line;
|
private float line;
|
||||||
@LineType private int lineType;
|
@LineType private int lineType;
|
||||||
@AnchorType private int lineAnchor;
|
private @AnchorType int lineAnchor;
|
||||||
private float position;
|
private float position;
|
||||||
@AnchorType private int positionAnchor;
|
private @AnchorType int positionAnchor;
|
||||||
@TextSizeType private int textSizeType;
|
private @TextSizeType int textSizeType;
|
||||||
private float textSize;
|
private float textSize;
|
||||||
private float size;
|
private float size;
|
||||||
private float bitmapHeight;
|
private float bitmapHeight;
|
||||||
private boolean windowColorSet;
|
private boolean windowColorSet;
|
||||||
@ColorInt private int windowColor;
|
@ColorInt private int windowColor;
|
||||||
@VerticalType private int verticalType;
|
private @VerticalType int verticalType;
|
||||||
private float shearDegrees;
|
private float shearDegrees;
|
||||||
|
|
||||||
public Builder() {
|
public Builder() {
|
||||||
|
@ -82,13 +82,13 @@ public class TrackSelectionParameters implements Bundleable {
|
|||||||
private ImmutableList<String> preferredVideoMimeTypes;
|
private ImmutableList<String> preferredVideoMimeTypes;
|
||||||
// Audio
|
// Audio
|
||||||
private ImmutableList<String> preferredAudioLanguages;
|
private ImmutableList<String> preferredAudioLanguages;
|
||||||
@C.RoleFlags private int preferredAudioRoleFlags;
|
private @C.RoleFlags int preferredAudioRoleFlags;
|
||||||
private int maxAudioChannelCount;
|
private int maxAudioChannelCount;
|
||||||
private int maxAudioBitrate;
|
private int maxAudioBitrate;
|
||||||
private ImmutableList<String> preferredAudioMimeTypes;
|
private ImmutableList<String> preferredAudioMimeTypes;
|
||||||
// Text
|
// Text
|
||||||
private ImmutableList<String> preferredTextLanguages;
|
private ImmutableList<String> preferredTextLanguages;
|
||||||
@C.RoleFlags private int preferredTextRoleFlags;
|
private @C.RoleFlags int preferredTextRoleFlags;
|
||||||
private boolean selectUndeterminedTextLanguage;
|
private boolean selectUndeterminedTextLanguage;
|
||||||
// General
|
// General
|
||||||
private boolean forceLowestBitrate;
|
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
|
* 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}.
|
* 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
|
* Maximum allowed audio channel count. The default value is {@link Integer#MAX_VALUE} (i.e. no
|
||||||
* constraint).
|
* constraint).
|
||||||
@ -811,7 +811,7 @@ public class TrackSelectionParameters implements Bundleable {
|
|||||||
* | {@link C#ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND} if the accessibility {@link CaptioningManager}
|
* | {@link C#ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND} if the accessibility {@link CaptioningManager}
|
||||||
* is enabled.
|
* 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
|
* 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
|
* #preferredTextLanguages} is available, or if {@link #preferredTextLanguages} is unset. The
|
||||||
|
Loading…
x
Reference in New Issue
Block a user