Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28327,6 +28327,7 @@ package android.media.tv { method public int getVideoHeight(); method public float getVideoPixelAspectRatio(); method public int getVideoWidth(); method public boolean isAudioDescription(); method public boolean isEncrypted(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TvTrackInfo> CREATOR; Loading @@ -28339,6 +28340,7 @@ package android.media.tv { ctor public TvTrackInfo.Builder(int, @NonNull String); method public android.media.tv.TvTrackInfo build(); method public android.media.tv.TvTrackInfo.Builder setAudioChannelCount(int); method @NonNull public android.media.tv.TvTrackInfo.Builder setAudioDescription(boolean); method public android.media.tv.TvTrackInfo.Builder setAudioSampleRate(int); method public android.media.tv.TvTrackInfo.Builder setDescription(CharSequence); method @NonNull public android.media.tv.TvTrackInfo.Builder setEncrypted(boolean); media/java/android/media/tv/TvTrackInfo.java +50 −5 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public final class TvTrackInfo implements Parcelable { private final boolean mEncrypted; private final int mAudioChannelCount; private final int mAudioSampleRate; private final boolean mAudioDescription; private final int mVideoWidth; private final int mVideoHeight; private final float mVideoFrameRate; Loading @@ -70,8 +71,8 @@ public final class TvTrackInfo implements Parcelable { private final Bundle mExtra; private TvTrackInfo(int type, String id, String language, CharSequence description, boolean encrypted, int audioChannelCount, int audioSampleRate, int videoWidth, int videoHeight, float videoFrameRate, float videoPixelAspectRatio, boolean encrypted, int audioChannelCount, int audioSampleRate, boolean audioDescription, int videoWidth, int videoHeight, float videoFrameRate, float videoPixelAspectRatio, byte videoActiveFormatDescription, Bundle extra) { mType = type; mId = id; Loading @@ -80,6 +81,7 @@ public final class TvTrackInfo implements Parcelable { mEncrypted = encrypted; mAudioChannelCount = audioChannelCount; mAudioSampleRate = audioSampleRate; mAudioDescription = audioDescription; mVideoWidth = videoWidth; mVideoHeight = videoHeight; mVideoFrameRate = videoFrameRate; Loading @@ -96,6 +98,7 @@ public final class TvTrackInfo implements Parcelable { mEncrypted = in.readInt() != 0; mAudioChannelCount = in.readInt(); mAudioSampleRate = in.readInt(); mAudioDescription = in.readInt() != 0; mVideoWidth = in.readInt(); mVideoHeight = in.readInt(); mVideoFrameRate = in.readFloat(); Loading Loading @@ -171,6 +174,23 @@ public final class TvTrackInfo implements Parcelable { return mAudioSampleRate; } /** * Returns {@code true} if the track is an audio description intended for people with visual * impairment, {@code false} otherwise. Valid only for {@link #TYPE_AUDIO} tracks. * * <p>For example of broadcast, audio description information may be referred to broadcast * standard (e.g. ISO 639 Language Descriptor of ISO/IEC 13818-1, Supplementary Audio Language * Descriptor, AC-3 Descriptor, Enhanced AC-3 Descriptor, AAC Descriptor of ETSI EN 300 468). * * @throws IllegalStateException if not called on an audio track */ public boolean isAudioDescription() { if (mType != TYPE_AUDIO) { throw new IllegalStateException("Not an audio track"); } return mAudioDescription; } /** * Returns the width of the video, in the unit of pixels. Valid only for {@link #TYPE_VIDEO} * tracks. Loading Loading @@ -266,6 +286,7 @@ public final class TvTrackInfo implements Parcelable { dest.writeInt(mEncrypted ? 1 : 0); dest.writeInt(mAudioChannelCount); dest.writeInt(mAudioSampleRate); dest.writeInt(mAudioDescription ? 1 : 0); dest.writeInt(mVideoWidth); dest.writeInt(mVideoHeight); dest.writeFloat(mVideoFrameRate); Loading Loading @@ -296,7 +317,8 @@ public final class TvTrackInfo implements Parcelable { switch (mType) { case TYPE_AUDIO: return mAudioChannelCount == obj.mAudioChannelCount && mAudioSampleRate == obj.mAudioSampleRate; && mAudioSampleRate == obj.mAudioSampleRate && mAudioDescription == obj.mAudioDescription; case TYPE_VIDEO: return mVideoWidth == obj.mVideoWidth Loading Loading @@ -338,6 +360,7 @@ public final class TvTrackInfo implements Parcelable { private boolean mEncrypted; private int mAudioChannelCount; private int mAudioSampleRate; private boolean mAudioDescription; private int mVideoWidth; private int mVideoHeight; private float mVideoFrameRate; Loading Loading @@ -429,6 +452,27 @@ public final class TvTrackInfo implements Parcelable { return this; } /** * Sets the audio description attribute of the audio. Valid only for {@link #TYPE_AUDIO} * tracks. * * <p>For example of broadcast, audio description information may be referred to broadcast * standard (e.g. ISO 639 Language Descriptor of ISO/IEC 13818-1, Supplementary Audio * Language Descriptor, AC-3 Descriptor, Enhanced AC-3 Descriptor, AAC Descriptor of ETSI EN * 300 468). * * @param audioDescription The audio description attribute of the audio. * @throws IllegalStateException if not called on an audio track */ @NonNull public Builder setAudioDescription(boolean audioDescription) { if (mType != TYPE_AUDIO) { throw new IllegalStateException("Not an audio track"); } mAudioDescription = audioDescription; return this; } /** * Sets the width of the video, in the unit of pixels. Valid only for {@link #TYPE_VIDEO} * tracks. Loading Loading @@ -531,8 +575,9 @@ public final class TvTrackInfo implements Parcelable { */ public TvTrackInfo build() { return new TvTrackInfo(mType, mId, mLanguage, mDescription, mEncrypted, mAudioChannelCount, mAudioSampleRate, mVideoWidth, mVideoHeight, mVideoFrameRate, mVideoPixelAspectRatio, mVideoActiveFormatDescription, mExtra); mAudioChannelCount, mAudioSampleRate, mAudioDescription, mVideoWidth, mVideoHeight, mVideoFrameRate, mVideoPixelAspectRatio, mVideoActiveFormatDescription, mExtra); } } } Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28327,6 +28327,7 @@ package android.media.tv { method public int getVideoHeight(); method public float getVideoPixelAspectRatio(); method public int getVideoWidth(); method public boolean isAudioDescription(); method public boolean isEncrypted(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TvTrackInfo> CREATOR; Loading @@ -28339,6 +28340,7 @@ package android.media.tv { ctor public TvTrackInfo.Builder(int, @NonNull String); method public android.media.tv.TvTrackInfo build(); method public android.media.tv.TvTrackInfo.Builder setAudioChannelCount(int); method @NonNull public android.media.tv.TvTrackInfo.Builder setAudioDescription(boolean); method public android.media.tv.TvTrackInfo.Builder setAudioSampleRate(int); method public android.media.tv.TvTrackInfo.Builder setDescription(CharSequence); method @NonNull public android.media.tv.TvTrackInfo.Builder setEncrypted(boolean);
media/java/android/media/tv/TvTrackInfo.java +50 −5 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public final class TvTrackInfo implements Parcelable { private final boolean mEncrypted; private final int mAudioChannelCount; private final int mAudioSampleRate; private final boolean mAudioDescription; private final int mVideoWidth; private final int mVideoHeight; private final float mVideoFrameRate; Loading @@ -70,8 +71,8 @@ public final class TvTrackInfo implements Parcelable { private final Bundle mExtra; private TvTrackInfo(int type, String id, String language, CharSequence description, boolean encrypted, int audioChannelCount, int audioSampleRate, int videoWidth, int videoHeight, float videoFrameRate, float videoPixelAspectRatio, boolean encrypted, int audioChannelCount, int audioSampleRate, boolean audioDescription, int videoWidth, int videoHeight, float videoFrameRate, float videoPixelAspectRatio, byte videoActiveFormatDescription, Bundle extra) { mType = type; mId = id; Loading @@ -80,6 +81,7 @@ public final class TvTrackInfo implements Parcelable { mEncrypted = encrypted; mAudioChannelCount = audioChannelCount; mAudioSampleRate = audioSampleRate; mAudioDescription = audioDescription; mVideoWidth = videoWidth; mVideoHeight = videoHeight; mVideoFrameRate = videoFrameRate; Loading @@ -96,6 +98,7 @@ public final class TvTrackInfo implements Parcelable { mEncrypted = in.readInt() != 0; mAudioChannelCount = in.readInt(); mAudioSampleRate = in.readInt(); mAudioDescription = in.readInt() != 0; mVideoWidth = in.readInt(); mVideoHeight = in.readInt(); mVideoFrameRate = in.readFloat(); Loading Loading @@ -171,6 +174,23 @@ public final class TvTrackInfo implements Parcelable { return mAudioSampleRate; } /** * Returns {@code true} if the track is an audio description intended for people with visual * impairment, {@code false} otherwise. Valid only for {@link #TYPE_AUDIO} tracks. * * <p>For example of broadcast, audio description information may be referred to broadcast * standard (e.g. ISO 639 Language Descriptor of ISO/IEC 13818-1, Supplementary Audio Language * Descriptor, AC-3 Descriptor, Enhanced AC-3 Descriptor, AAC Descriptor of ETSI EN 300 468). * * @throws IllegalStateException if not called on an audio track */ public boolean isAudioDescription() { if (mType != TYPE_AUDIO) { throw new IllegalStateException("Not an audio track"); } return mAudioDescription; } /** * Returns the width of the video, in the unit of pixels. Valid only for {@link #TYPE_VIDEO} * tracks. Loading Loading @@ -266,6 +286,7 @@ public final class TvTrackInfo implements Parcelable { dest.writeInt(mEncrypted ? 1 : 0); dest.writeInt(mAudioChannelCount); dest.writeInt(mAudioSampleRate); dest.writeInt(mAudioDescription ? 1 : 0); dest.writeInt(mVideoWidth); dest.writeInt(mVideoHeight); dest.writeFloat(mVideoFrameRate); Loading Loading @@ -296,7 +317,8 @@ public final class TvTrackInfo implements Parcelable { switch (mType) { case TYPE_AUDIO: return mAudioChannelCount == obj.mAudioChannelCount && mAudioSampleRate == obj.mAudioSampleRate; && mAudioSampleRate == obj.mAudioSampleRate && mAudioDescription == obj.mAudioDescription; case TYPE_VIDEO: return mVideoWidth == obj.mVideoWidth Loading Loading @@ -338,6 +360,7 @@ public final class TvTrackInfo implements Parcelable { private boolean mEncrypted; private int mAudioChannelCount; private int mAudioSampleRate; private boolean mAudioDescription; private int mVideoWidth; private int mVideoHeight; private float mVideoFrameRate; Loading Loading @@ -429,6 +452,27 @@ public final class TvTrackInfo implements Parcelable { return this; } /** * Sets the audio description attribute of the audio. Valid only for {@link #TYPE_AUDIO} * tracks. * * <p>For example of broadcast, audio description information may be referred to broadcast * standard (e.g. ISO 639 Language Descriptor of ISO/IEC 13818-1, Supplementary Audio * Language Descriptor, AC-3 Descriptor, Enhanced AC-3 Descriptor, AAC Descriptor of ETSI EN * 300 468). * * @param audioDescription The audio description attribute of the audio. * @throws IllegalStateException if not called on an audio track */ @NonNull public Builder setAudioDescription(boolean audioDescription) { if (mType != TYPE_AUDIO) { throw new IllegalStateException("Not an audio track"); } mAudioDescription = audioDescription; return this; } /** * Sets the width of the video, in the unit of pixels. Valid only for {@link #TYPE_VIDEO} * tracks. Loading Loading @@ -531,8 +575,9 @@ public final class TvTrackInfo implements Parcelable { */ public TvTrackInfo build() { return new TvTrackInfo(mType, mId, mLanguage, mDescription, mEncrypted, mAudioChannelCount, mAudioSampleRate, mVideoWidth, mVideoHeight, mVideoFrameRate, mVideoPixelAspectRatio, mVideoActiveFormatDescription, mExtra); mAudioChannelCount, mAudioSampleRate, mAudioDescription, mVideoWidth, mVideoHeight, mVideoFrameRate, mVideoPixelAspectRatio, mVideoActiveFormatDescription, mExtra); } } }