diff options
| author | 2021-04-21 16:15:34 +0000 | |
|---|---|---|
| committer | 2021-04-21 16:15:34 +0000 | |
| commit | e1bfbd683bbc4dab9ae48b89bb204c49d4d6be43 (patch) | |
| tree | c38330c0c273278c0c90d30635fe5065552d30c8 | |
| parent | e838a48fd8d8f6573037731e88309706b93dcec4 (diff) | |
| parent | f286036ab395f9c1cc4d21c9a2a5a7a03a000a88 (diff) | |
Merge "MediaFormat: Update constants for MPEG-H codecs" am: ca57ecee1b am: 3d46fe5294 am: f286036ab3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680925
Change-Id: I68b1d8518691cb7858a29de7675384d3792e1b1a
| -rw-r--r-- | core/api/current.txt | 3 | ||||
| -rw-r--r-- | media/java/android/media/MediaFormat.java | 33 |
2 files changed, 36 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 84ef8542be20..4f28266475a5 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -22487,6 +22487,9 @@ package android.media { field public static final String KEY_MAX_PTS_GAP_TO_ENCODER = "max-pts-gap-to-encoder"; field public static final String KEY_MAX_WIDTH = "max-width"; field public static final String KEY_MIME = "mime"; + field public static final String KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets"; + field public static final String KEY_MPEGH_PROFILE_LEVEL_INDICATION = "mpegh-profile-level-indication"; + field public static final String KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT = "mpegh-reference-channel-layout"; field public static final String KEY_OPERATING_RATE = "operating-rate"; field public static final String KEY_OUTPUT_REORDER_DEPTH = "output-reorder-depth"; field public static final String KEY_PCM_ENCODING = "pcm-encoding"; diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java index 50a326e9a595..9bf0db52f66d 100644 --- a/media/java/android/media/MediaFormat.java +++ b/media/java/android/media/MediaFormat.java @@ -109,6 +109,15 @@ import java.util.stream.Collectors; * <tr><td>{@link #KEY_ENCODER_DELAY}</td><td>Integer</td><td>optional, the number of frames to trim from the start of the decoded audio stream.</td></tr> * <tr><td>{@link #KEY_ENCODER_PADDING}</td><td>Integer</td><td>optional, the number of frames to trim from the end of the decoded audio stream.</td></tr> * <tr><td>{@link #KEY_FLAC_COMPRESSION_LEVEL}</td><td>Integer</td><td><b>encoder-only</b>, optional, if content is FLAC audio, specifies the desired compression level.</td></tr> + * <tr><td>{@link #KEY_MPEGH_PROFILE_LEVEL_INDICATION}</td><td>Integer</td> + * <td><b>decoder-only</b>, optional, if content is MPEG-H audio, + * specifies the profile and level of the stream.</td></tr> + * <tr><td>{@link #KEY_MPEGH_COMPATIBLE_SETS}</td><td>ByteBuffer</td> + * <td><b>decoder-only</b>, optional, if content is MPEG-H audio, + * specifies the compatible sets (profile and level) of the stream.</td></tr> + * <tr><td>{@link #KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT}</td> + * <td>Integer</td><td><b>decoder-only</b>, optional, if content is MPEG-H audio, + * specifies the preferred reference channel layout of the stream.</td></tr> * </table> * * Subtitle formats have the following keys: @@ -867,6 +876,30 @@ public final class MediaFormat { public static final String KEY_FLAC_COMPRESSION_LEVEL = "flac-compression-level"; /** + * A key describing the MPEG-H stream profile-level indication. + * + * See ISO_IEC_23008-3;2019 MHADecoderConfigurationRecord mpegh3daProfileLevelIndication. + */ + public static final String KEY_MPEGH_PROFILE_LEVEL_INDICATION = + "mpegh-profile-level-indication"; + + /** + * A key describing the MPEG-H stream compatible sets. + * + * See FDAmd_2 of ISO_IEC_23008-3;2019 MHAProfileAndLevelCompatibilitySetBox. + */ + public static final String KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets"; + + /** + * A key describing the MPEG-H stream reference channel layout. + * + * See ISO_IEC_23008-3;2019 MHADecoderConfigurationRecord referenceChannelLayout + * and ISO_IEC_23001‐8 ChannelConfiguration value. + */ + public static final String KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT = + "mpegh-reference-channel-layout"; + + /** * A key describing the encoding complexity. * The associated value is an integer. These values are device and codec specific, * but lower values generally result in faster and/or less power-hungry encoding. |