public final class Ac3Util extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getAc3SyncframeAudioSampleCount()
Returns the number of audio samples in an AC-3 syncframe.
|
static Format |
parseAc3AnnexFFormat(ParsableByteArray data,
String trackId,
String language,
DrmInitData drmInitData)
Returns the AC-3 format given
data containing the AC3SpecificBox according to
ETSI TS 102 366 Annex F. |
static Format |
parseAc3SyncframeFormat(ParsableBitArray data,
String trackId,
String language,
DrmInitData drmInitData)
Returns the AC-3 format given
data containing a syncframe. |
static int |
parseAc3SyncframeSize(byte[] data)
Returns the size in bytes of the given AC-3 syncframe.
|
static Format |
parseEAc3AnnexFFormat(ParsableByteArray data,
String trackId,
String language,
DrmInitData drmInitData)
Returns the E-AC-3 format given
data containing the EC3SpecificBox according to
ETSI TS 102 366 Annex F. |
static int |
parseEAc3SyncframeAudioSampleCount(byte[] data)
Returns the number of audio samples represented by the given E-AC-3 syncframe.
|
static int |
parseEAc3SyncframeAudioSampleCount(ByteBuffer buffer)
Like
parseEAc3SyncframeAudioSampleCount(byte[]) but reads from a ByteBuffer . |
static Format |
parseEac3SyncframeFormat(ParsableBitArray data,
String trackId,
String language,
DrmInitData drmInitData)
Returns the E-AC-3 format given
data containing a syncframe. |
static int |
parseEAc3SyncframeSize(byte[] data)
Returns the size in bytes of the given E-AC-3 syncframe.
|
public static Format parseAc3AnnexFFormat(ParsableByteArray data, String trackId, String language, DrmInitData drmInitData)
data
containing the AC3SpecificBox according to
ETSI TS 102 366 Annex F. The reading position of data
will be modified.data
- The AC3SpecificBox to parse.trackId
- The track identifier to set on the format, or null.language
- The language to set on the format.drmInitData
- DrmInitData
to be included in the format.public static Format parseEAc3AnnexFFormat(ParsableByteArray data, String trackId, String language, DrmInitData drmInitData)
data
containing the EC3SpecificBox according to
ETSI TS 102 366 Annex F. The reading position of data
will be modified.data
- The EC3SpecificBox to parse.trackId
- The track identifier to set on the format, or null.language
- The language to set on the format.drmInitData
- DrmInitData
to be included in the format.public static Format parseAc3SyncframeFormat(ParsableBitArray data, String trackId, String language, DrmInitData drmInitData)
data
containing a syncframe. The reading position of
data
will be modified.data
- The data to parse, positioned at the start of the syncframe.trackId
- The track identifier to set on the format, or null.language
- The language to set on the format.drmInitData
- DrmInitData
to be included in the format.public static Format parseEac3SyncframeFormat(ParsableBitArray data, String trackId, String language, DrmInitData drmInitData)
data
containing a syncframe. The reading position of
data
will be modified.data
- The data to parse, positioned at the start of the syncframe.trackId
- The track identifier to set on the format, or null.language
- The language to set on the format.drmInitData
- DrmInitData
to be included in the format.public static int parseAc3SyncframeSize(byte[] data)
data
- The syncframe to parse.C.LENGTH_UNSET
if the input is invalid.public static int parseEAc3SyncframeSize(byte[] data)
data
- The syncframe to parse.public static int getAc3SyncframeAudioSampleCount()
public static int parseEAc3SyncframeAudioSampleCount(byte[] data)
data
- The syncframe to parse.public static int parseEAc3SyncframeAudioSampleCount(ByteBuffer buffer)
parseEAc3SyncframeAudioSampleCount(byte[])
but reads from a ByteBuffer
.
The buffer's position is not modified.buffer
- The ByteBuffer
from which to read.