Merge "Add AudioMetadata keys related to active audio presentation"
This commit is contained in:
@@ -19599,6 +19599,10 @@ package android.media {
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.Integer> KEY_BIT_WIDTH;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.Integer> KEY_CHANNEL_MASK;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.String> KEY_MIME;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.Integer> KEY_PRESENTATION_CONTENT_CLASSIFIER;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.Integer> KEY_PRESENTATION_ID;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.String> KEY_PRESENTATION_LANGUAGE;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.Integer> KEY_PROGRAM_ID;
|
||||
field @NonNull public static final android.media.AudioMetadata.Key<java.lang.Integer> KEY_SAMPLE_RATE;
|
||||
}
|
||||
|
||||
@@ -19652,6 +19656,15 @@ package android.media {
|
||||
method public boolean hasAudioDescription();
|
||||
method public boolean hasDialogueEnhancement();
|
||||
method public boolean hasSpokenSubtitles();
|
||||
field public static final int CONTENT_COMMENTARY = 5; // 0x5
|
||||
field public static final int CONTENT_DIALOG = 4; // 0x4
|
||||
field public static final int CONTENT_EMERGENCY = 6; // 0x6
|
||||
field public static final int CONTENT_HEARING_IMPAIRED = 3; // 0x3
|
||||
field public static final int CONTENT_MAIN = 0; // 0x0
|
||||
field public static final int CONTENT_MUSIC_AND_EFFECTS = 1; // 0x1
|
||||
field public static final int CONTENT_UNKNOWN = -1; // 0xffffffff
|
||||
field public static final int CONTENT_VISUALLY_IMPAIRED = 2; // 0x2
|
||||
field public static final int CONTENT_VOICEOVER = 7; // 0x7
|
||||
field public static final int MASTERED_FOR_3D = 3; // 0x3
|
||||
field public static final int MASTERED_FOR_HEADPHONE = 4; // 0x4
|
||||
field public static final int MASTERED_FOR_STEREO = 1; // 0x1
|
||||
|
||||
@@ -195,6 +195,61 @@ public final class AudioMetadata {
|
||||
@NonNull public static final Key<Integer> KEY_AUDIO_ENCODING =
|
||||
createKey("audio-encoding", Integer.class);
|
||||
|
||||
|
||||
/**
|
||||
* A key representing the audio presentation id being decoded by a next generation
|
||||
* audio decoder.
|
||||
*
|
||||
* An Integer value representing presentation id.
|
||||
*
|
||||
* @see AudioPresentation#getPresentationId()
|
||||
*/
|
||||
@NonNull public static final Key<Integer> KEY_PRESENTATION_ID =
|
||||
createKey("presentation-id", Integer.class);
|
||||
|
||||
/**
|
||||
* A key representing the audio program id being decoded by a next generation
|
||||
* audio decoder.
|
||||
*
|
||||
* An Integer value representing program id.
|
||||
*
|
||||
* @see AudioPresentation#getProgramId()
|
||||
*/
|
||||
@NonNull public static final Key<Integer> KEY_PROGRAM_ID =
|
||||
createKey("program-id", Integer.class);
|
||||
|
||||
|
||||
/**
|
||||
* A key representing the audio presentation content classifier being rendered
|
||||
* by a next generation audio decoder.
|
||||
*
|
||||
* An Integer value representing presentation content classifier.
|
||||
*
|
||||
* @see AudioPresentation.ContentClassifier
|
||||
* One of {@link AudioPresentation#CONTENT_UNKNOWN},
|
||||
* {@link AudioPresentation#CONTENT_MAIN},
|
||||
* {@link AudioPresentation#CONTENT_MUSIC_AND_EFFECTS},
|
||||
* {@link AudioPresentation#CONTENT_VISUALLY_IMPAIRED},
|
||||
* {@link AudioPresentation#CONTENT_HEARING_IMPAIRED},
|
||||
* {@link AudioPresentation#CONTENT_DIALOG},
|
||||
* {@link AudioPresentation#CONTENT_COMMENTARY},
|
||||
* {@link AudioPresentation#CONTENT_EMERGENCY},
|
||||
* {@link AudioPresentation#CONTENT_VOICEOVER}.
|
||||
*/
|
||||
@NonNull public static final Key<Integer> KEY_PRESENTATION_CONTENT_CLASSIFIER =
|
||||
createKey("presentation-content-classifier", Integer.class);
|
||||
|
||||
/**
|
||||
* A key representing the audio presentation language being rendered by a next
|
||||
* generation audio decoder.
|
||||
*
|
||||
* A String value representing ISO 639-2 (three letter code).
|
||||
*
|
||||
* @see AudioPresentation#getLocale()
|
||||
*/
|
||||
@NonNull public static final Key<String> KEY_PRESENTATION_LANGUAGE =
|
||||
createKey("presentation-language", String.class);
|
||||
|
||||
private Format() {} // delete constructor
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,64 @@ public final class AudioPresentation {
|
||||
private final int mProgramId;
|
||||
private final ULocale mLanguage;
|
||||
|
||||
/** @hide */
|
||||
@IntDef(
|
||||
value = {
|
||||
CONTENT_UNKNOWN,
|
||||
CONTENT_MAIN,
|
||||
CONTENT_MUSIC_AND_EFFECTS,
|
||||
CONTENT_VISUALLY_IMPAIRED,
|
||||
CONTENT_HEARING_IMPAIRED,
|
||||
CONTENT_DIALOG,
|
||||
CONTENT_COMMENTARY,
|
||||
CONTENT_EMERGENCY,
|
||||
CONTENT_VOICEOVER,
|
||||
})
|
||||
|
||||
/**
|
||||
* The ContentClassifier int definitions represent the AudioPresentation content
|
||||
* classifier (as per TS 103 190-1 v1.2.1 4.3.3.8.1)
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ContentClassifier {}
|
||||
|
||||
/**
|
||||
* Audio presentation classifier: Unknown.
|
||||
*/
|
||||
public static final int CONTENT_UNKNOWN = -1;
|
||||
/**
|
||||
* Audio presentation classifier: Complete main.
|
||||
*/
|
||||
public static final int CONTENT_MAIN = 0;
|
||||
/**
|
||||
* Audio presentation content classifier: Music and effects.
|
||||
*/
|
||||
public static final int CONTENT_MUSIC_AND_EFFECTS = 1;
|
||||
/**
|
||||
* Audio presentation content classifier: Visually impaired.
|
||||
*/
|
||||
public static final int CONTENT_VISUALLY_IMPAIRED = 2;
|
||||
/**
|
||||
* Audio presentation content classifier: Hearing impaired.
|
||||
*/
|
||||
public static final int CONTENT_HEARING_IMPAIRED = 3;
|
||||
/**
|
||||
* Audio presentation content classifier: Dialog.
|
||||
*/
|
||||
public static final int CONTENT_DIALOG = 4;
|
||||
/**
|
||||
* Audio presentation content classifier: Commentary.
|
||||
*/
|
||||
public static final int CONTENT_COMMENTARY = 5;
|
||||
/**
|
||||
* Audio presentation content classifier: Emergency.
|
||||
*/
|
||||
public static final int CONTENT_EMERGENCY = 6;
|
||||
/**
|
||||
* Audio presentation content classifier: Voice over.
|
||||
*/
|
||||
public static final int CONTENT_VOICEOVER = 7;
|
||||
|
||||
/** @hide */
|
||||
@IntDef(
|
||||
value = {
|
||||
|
||||
Reference in New Issue
Block a user