public final class Ac4Util extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Ac4Util.SyncFrameInfo |
Holds sample format information as presented by a syncframe header.
|
| Modifier and Type | Field | Description |
|---|---|---|
static int |
AC40_SYNCWORD |
|
static int |
AC41_SYNCWORD |
|
static int |
HEADER_SIZE_FOR_PARSER |
The header size for AC-4 parser.
|
static int |
MAX_RATE_BYTES_PER_SECOND |
Maximum rate for an AC-4 audio stream, in bytes per second.
|
static int |
SAMPLE_HEADER_SIZE |
The AC-4 sync frame header size for extractor.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
getAc4SampleHeader(int size,
ParsableByteArray buffer) |
Populates
buffer with an AC-4 sample header for a sample of the specified size. |
static Format |
parseAc4AnnexEFormat(ParsableByteArray data,
String trackId,
String language,
DrmInitData drmInitData) |
Returns the AC-4 format given
data containing the AC4SpecificBox according to ETSI TS
103 190-1 Annex E. |
static int |
parseAc4SyncframeAudioSampleCount(ByteBuffer buffer) |
Reads the number of audio samples represented by the given AC-4 syncframe.
|
static Ac4Util.SyncFrameInfo |
parseAc4SyncframeInfo(ParsableBitArray data) |
Returns AC-4 format information given
data containing a syncframe. |
static int |
parseAc4SyncframeSize(byte[] data,
int syncword) |
Returns the size in bytes of the given AC-4 syncframe.
|
public static final int AC40_SYNCWORD
public static final int AC41_SYNCWORD
public static final int MAX_RATE_BYTES_PER_SECOND
public static final int SAMPLE_HEADER_SIZE
public static final int HEADER_SIZE_FOR_PARSER
public static Format parseAc4AnnexEFormat(ParsableByteArray data, String trackId, String language, @Nullable DrmInitData drmInitData)
data containing the AC4SpecificBox according to ETSI TS
103 190-1 Annex E. The reading position of data will be modified.data - The AC4SpecificBox to parse.trackId - The track identifier to set on the format.language - The language to set on the format.drmInitData - DrmInitData to be included in the format.public static Ac4Util.SyncFrameInfo parseAc4SyncframeInfo(ParsableBitArray data)
data containing a syncframe. The reading position
of data will be modified.data - The data to parse, positioned at the start of the syncframe.public static int parseAc4SyncframeSize(byte[] data,
int syncword)
data - The syncframe to parse.syncword - The syncword value for the syncframe.C.LENGTH_UNSET if the input is invalid.public static int parseAc4SyncframeAudioSampleCount(ByteBuffer buffer)
buffer - The ByteBuffer from which to read the syncframe.public static void getAc4SampleHeader(int size,
ParsableByteArray buffer)
buffer with an AC-4 sample header for a sample of the specified size.