public final class DtsUtil extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getDtsFrameSize(byte[] data)
Returns the size in bytes of the given DTS frame.
|
static int |
parseDtsAudioSampleCount(byte[] data)
Returns the number of audio samples represented by the given DTS frame.
|
static int |
parseDtsAudioSampleCount(ByteBuffer data)
Like
parseDtsAudioSampleCount(byte[]) but reads from a byte buffer. |
static MediaFormat |
parseDtsFormat(byte[] frame,
String trackId,
long durationUs,
String language)
Returns the DTS format given
data containing the DTS frame according to ETSI TS 102 114
subsections 5.3/5.4. |
public static MediaFormat parseDtsFormat(byte[] frame, String trackId, long durationUs, String language)
data
containing the DTS frame according to ETSI TS 102 114
subsections 5.3/5.4.
This method may only be called from one thread at a time.
frame
- The DTS frame to parse.trackId
- The track identifier to set on the format, or null.durationUs
- The duration to set on the format, in microseconds.language
- The language to set on the format.public static int parseDtsAudioSampleCount(byte[] data)
data
- The frame to parse.public static int parseDtsAudioSampleCount(ByteBuffer data)
parseDtsAudioSampleCount(byte[])
but reads from a byte buffer. The buffer
position is not modified.public static int getDtsFrameSize(byte[] data)
data
- The frame to parse.