docs/doc/reference/com/google/android/exoplayer2/util/CodecSpecificDataUtil.html
Package com.google.android.exoplayer2.util
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classCodecSpecificDataUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Provides utilities for handling various types of codec-specific data.
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static String | buildAvcCodecString(int profileIdc, int constraintsFlagsAndReservedZero2Bits, int levelIdc) |
Deprecated.
Builds an RFC 6381 AVC codec string using the provided parameters.
|
| static List<byte[]> | buildCea708InitializationData(boolean isWideAspectRatio) |
Deprecated.
Returns initialization data for formats with MIME type MimeTypes.APPLICATION_CEA708.
|
| static String | buildHevcCodecString(int generalProfileSpace, boolean generalTierFlag, int generalProfileIdc, int generalProfileCompatibilityFlags, int[] constraintBytes, int generalLevelIdc) |
Deprecated.
Builds an RFC 6381 HEVC codec string using the provided parameters.
|
| static byte[] | buildNalUnit(byte[] data, int offset, int length) |
Deprecated.
Constructs a NAL unit consisting of the NAL start code followed by the specified data.
|
| static Pair<Integer,Integer> | getVideoResolutionFromMpeg4VideoConfig(byte[] videoSpecificConfig) |
Deprecated.
Parses an MPEG-4 Visual configuration information, as defined in ISO/IEC14496-2.
|
| static Pair<Integer,Integer> | parseAlacAudioSpecificConfig(byte[] audioSpecificConfig) |
Deprecated.
Parses an ALAC AudioSpecificConfig (i.e.
|
| static boolean | parseCea708InitializationData(List<byte[]> initializationData) |
Deprecated.
Returns whether the CEA-708 closed caption service with the given initialization data is formatted for displays with 16:9 aspect ratio.
|
| static byte[][] | splitNalUnits(byte[] data) |
Deprecated.
Splits an array of NAL units. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static[Pair](https://developer.android.com/reference/android/util/Pair.html "class or interface in android.util")<[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang"),[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> parseAlacAudioSpecificConfig(byte[] audioSpecificConfig)
Deprecated.
Parses an ALAC AudioSpecificConfig (i.e. an ALACSpecificConfig).
Parameters:audioSpecificConfig - A byte array containing the AudioSpecificConfig to parse.Returns:A pair consisting of the sample rate in Hz and the channel count.
-
public static[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<byte[]> buildCea708InitializationData(boolean isWideAspectRatio)
Deprecated.
Returns initialization data for formats with MIME type MimeTypes.APPLICATION_CEA708.
Parameters:isWideAspectRatio - Whether the CEA-708 closed caption service is formatted for displays with 16:9 aspect ratio.Returns:Initialization data for formats with MIME type MimeTypes.APPLICATION_CEA708.
-
public static boolean parseCea708InitializationData([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<byte[]> initializationData)
Deprecated.
Returns whether the CEA-708 closed caption service with the given initialization data is formatted for displays with 16:9 aspect ratio.
Parameters:initializationData - The initialization data to parse.Returns:Whether the CEA-708 closed caption service is formatted for displays with 16:9 aspect ratio.
-
public static[Pair](https://developer.android.com/reference/android/util/Pair.html "class or interface in android.util")<[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang"),[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> getVideoResolutionFromMpeg4VideoConfig(byte[] videoSpecificConfig)
Deprecated.
Parses an MPEG-4 Visual configuration information, as defined in ISO/IEC14496-2.
Parameters:videoSpecificConfig - A byte array containing the MPEG-4 Visual configuration information to parse.Returns:A pair of the video's width and height.
-
public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")buildAvcCodecString(int profileIdc,
int constraintsFlagsAndReservedZero2Bits,
int levelIdc)
Deprecated.
Builds an RFC 6381 AVC codec string using the provided parameters.
Parameters:profileIdc - The encoding profile.constraintsFlagsAndReservedZero2Bits - The constraint flags followed by the reserved zero 2 bits, all contained in the least significant byte of the integer.levelIdc - The encoding level.Returns:An RFC 6381 AVC codec string built using the provided parameters.
-
public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")buildHevcCodecString(int generalProfileSpace,
boolean generalTierFlag,
int generalProfileIdc,
int generalProfileCompatibilityFlags,
int[] constraintBytes,
int generalLevelIdc)
Deprecated.
Builds an RFC 6381 HEVC codec string using the provided parameters.
-
public static byte[] buildNalUnit(byte[] data,
int offset,
int length)
Deprecated.
Constructs a NAL unit consisting of the NAL start code followed by the specified data.
Parameters:data - An array containing the data that should follow the NAL start code.offset - The start offset into data.length - The number of bytes to copy from dataReturns:The constructed NAL unit.
-
@Nullable
public static byte[][] splitNalUnits(byte[] data)
Deprecated.
Splits an array of NAL units.
If the input consists of NAL start code delimited units, then the returned array consists of the split NAL units, each of which is still prefixed with the NAL start code. For any other input, null is returned.
Parameters:data - An array of data.Returns:The individual NAL units, or null if the input did not consist of NAL start code delimited units.