public final class DtsUtil extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static int |
DTS_HD_MAX_RATE_BYTES_PER_SECOND |
Maximum rate for a DTS-HD audio stream, in bytes per second.
|
static int |
DTS_MAX_RATE_BYTES_PER_SECOND |
Maximum rate for a DTS audio stream, in bytes per second.
|
| Modifier and Type | Method | Description |
|---|---|---|
static int |
getDtsFrameSize(byte[] data) |
Returns the size in bytes of the given DTS frame.
|
static boolean |
isSyncWord(int word) |
Returns whether a given integer matches a DTS sync word.
|
static int |
parseDtsAudioSampleCount(byte[] data) |
Returns the number of audio samples represented by the given DTS frame.
|
static int |
parseDtsAudioSampleCount(ByteBuffer buffer) |
Like
parseDtsAudioSampleCount(byte[]) but reads from a ByteBuffer. |
static Format |
parseDtsFormat(byte[] frame,
String trackId,
String language,
DrmInitData drmInitData) |
Returns the DTS format given
data containing the DTS frame according to ETSI TS 102 114
subsections 5.3/5.4. |
public static final int DTS_MAX_RATE_BYTES_PER_SECOND
DTS allows an 'open' bitrate, but we assume the maximum listed value: 1536 kbit/s.
public static final int DTS_HD_MAX_RATE_BYTES_PER_SECOND
public static boolean isSyncWord(int word)
word - An integer.public static Format parseDtsFormat(byte[] frame, @Nullable String trackId, @Nullable String language, @Nullable DrmInitData drmInitData)
data containing the DTS frame according to ETSI TS 102 114
subsections 5.3/5.4.frame - The DTS frame 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 int parseDtsAudioSampleCount(byte[] data)
data - The frame to parse.public static int parseDtsAudioSampleCount(ByteBuffer buffer)
parseDtsAudioSampleCount(byte[]) but reads from a ByteBuffer. The
buffer's position is not modified.buffer - The ByteBuffer from which to read.public static int getDtsFrameSize(byte[] data)
data - The frame to parse.