Back to Exoplayer

DtsUtil (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/audio/DtsUtil.html

latest6.0 KB
Original Source

Package com.google.android.exoplayer2.audio

Class DtsUtil


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDtsUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

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.

Like parseDtsAudioSampleCount(byte[]) but reads from a ByteBuffer. | | static Format | parseDtsFormat​(byte[] frame, String trackId, String language, DrmInitData drmInitData) | Deprecated.

Returns the DTS format given data containing the DTS frame according to ETSI TS 102 114 subsections 5.3/5.4. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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](../Format.html "class in com.google.android.exoplayer2")parseDtsFormat​(byte[] frame,
                                    @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")trackId,
                                    @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")language,
                                    @Nullable[DrmInitData](../drm/DrmInitData.html "class in com.google.android.exoplayer2.drm")drmInitData)

Deprecated.

Returns the DTS format given data 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](https://developer.android.com/reference/java/nio/ByteBuffer.html "class or interface in java.nio")buffer)

Deprecated.

Like parseDtsAudioSampleCount(byte[]) but reads from a ByteBuffer. The buffer's position is not modified. Parameters:buffer - The ByteBuffer 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.