public final class CodecSpecificDataUtil extends Object
| Modifier and Type | Method | Description |
|---|---|---|
static String |
buildAvcCodecString(int profileIdc,
int constraintsFlagsAndReservedZero2Bits,
int levelIdc) |
Builds an RFC 6381 AVC codec string using the provided parameters.
|
static List<byte[]> |
buildCea708InitializationData(boolean isWideAspectRatio) |
Returns initialization data for formats with MIME type
MimeTypes.APPLICATION_CEA708. |
static String |
buildHevcCodecStringFromSps(ParsableNalUnitBitArray bitArray) |
Returns an RFC 6381 HEVC codec string based on the SPS NAL unit read from the provided bit
array.
|
static byte[] |
buildNalUnit(byte[] data,
int offset,
int length) |
Constructs a NAL unit consisting of the NAL start code followed by the specified data.
|
static Pair<Integer,Integer> |
parseAlacAudioSpecificConfig(byte[] audioSpecificConfig) |
Parses an ALAC AudioSpecificConfig (i.e.
|
static boolean |
parseCea708InitializationData(List<byte[]> initializationData) |
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) |
Splits an array of NAL units.
|
public static Pair<Integer,Integer> parseAlacAudioSpecificConfig(byte[] audioSpecificConfig)
audioSpecificConfig - A byte array containing the AudioSpecificConfig to parse.public static List<byte[]> buildCea708InitializationData(boolean isWideAspectRatio)
MimeTypes.APPLICATION_CEA708.isWideAspectRatio - Whether the CEA-708 closed caption service is formatted for displays
with 16:9 aspect ratio.MimeTypes.APPLICATION_CEA708.public static boolean parseCea708InitializationData(List<byte[]> initializationData)
initializationData - The initialization data to parse.public static String buildAvcCodecString(int profileIdc, int constraintsFlagsAndReservedZero2Bits, int levelIdc)
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.public static String buildHevcCodecStringFromSps(ParsableNalUnitBitArray bitArray)
public static byte[] buildNalUnit(byte[] data,
int offset,
int length)
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 data@Nullable public static byte[][] splitNalUnits(byte[] data)
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.
data - An array of data.