Class DtsUtil
- java.lang.Object
-
- com.google.android.exoplayer2.audio.DtsUtil
-
@Deprecated public final class DtsUtil extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Utility methods for parsing DTS frames.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DTS_HD_MAX_RATE_BYTES_PER_SECOND
Deprecated.Maximum rate for a DTS-HD audio stream, in bytes per second.static int
DTS_MAX_RATE_BYTES_PER_SECOND
Deprecated.Maximum rate for a DTS audio stream, in bytes per second.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static int
getDtsFrameSize(byte[] data)
Deprecated.Returns the size in bytes of the given DTS frame.static boolean
isSyncWord(int word)
Deprecated.Returns whether a given integer matches a DTS sync word.static int
parseDtsAudioSampleCount(byte[] data)
Deprecated.Returns the number of audio samples represented by the given DTS frame.static int
parseDtsAudioSampleCount(ByteBuffer buffer)
Deprecated.LikeparseDtsAudioSampleCount(byte[])
but reads from aByteBuffer
.static Format
parseDtsFormat(byte[] frame, String trackId, String language, DrmInitData drmInitData)
Deprecated.Returns the DTS format givendata
containing the DTS frame according to ETSI TS 102 114 subsections 5.3/5.4.
-
-
-
Field Detail
-
DTS_MAX_RATE_BYTES_PER_SECOND
public static final int DTS_MAX_RATE_BYTES_PER_SECOND
Deprecated.Maximum rate for a DTS audio stream, in bytes per second.DTS allows an 'open' bitrate, but we assume the maximum listed value: 1536 kbit/s.
- See Also:
- Constant Field Values
-
DTS_HD_MAX_RATE_BYTES_PER_SECOND
public static final int DTS_HD_MAX_RATE_BYTES_PER_SECOND
Deprecated.Maximum rate for a DTS-HD audio stream, in bytes per second.- See Also:
- Constant Field Values
-
-
Method Detail
-
isSyncWord
public static boolean isSyncWord(int word)
Deprecated.Returns whether a given integer matches a DTS sync word. Synchronization and storage modes are defined in ETSI TS 102 114 V1.1.1 (2002-08), Section 5.3.- Parameters:
word
- An integer.- Returns:
- Whether a given integer matches a DTS sync word.
-
parseDtsFormat
public static Format parseDtsFormat(byte[] frame, @Nullable String trackId, @Nullable String language, @Nullable DrmInitData drmInitData)
Deprecated.Returns the DTS format givendata
containing the DTS frame according to ETSI TS 102 114 subsections 5.3/5.4.- Parameters:
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.- Returns:
- The DTS format parsed from data in the header.
-
parseDtsAudioSampleCount
public static int parseDtsAudioSampleCount(byte[] data)
Deprecated.Returns the number of audio samples represented by the given DTS frame.- Parameters:
data
- The frame to parse.- Returns:
- The number of audio samples represented by the frame.
-
parseDtsAudioSampleCount
public static int parseDtsAudioSampleCount(ByteBuffer buffer)
Deprecated.LikeparseDtsAudioSampleCount(byte[])
but reads from aByteBuffer
. The buffer's position is not modified.- Parameters:
buffer
- TheByteBuffer
from which to read.- Returns:
- The number of audio samples represented by the syncframe.
-
getDtsFrameSize
public static int getDtsFrameSize(byte[] data)
Deprecated.Returns the size in bytes of the given DTS frame.- Parameters:
data
- The frame to parse.- Returns:
- The frame's size in bytes.
-
-