docs/doc/reference/com/google/android/exoplayer2/audio/Ac4Util.html
Package com.google.android.exoplayer2.audio
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classAc4Utilextends[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 AC-4 frames, which are access units in AC-4 bitstreams.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | Ac4Util.SyncFrameInfo |
Deprecated.
Holds sample format information as presented by a syncframe header. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | AC40_SYNCWORD |
Deprecated.
|
| static int | AC41_SYNCWORD |
Deprecated.
|
| static int | HEADER_SIZE_FOR_PARSER |
Deprecated.
The header size for AC-4 parser.
|
| static int | MAX_RATE_BYTES_PER_SECOND |
Deprecated.
Maximum rate for an AC-4 audio stream, in bytes per second.
|
| static int | SAMPLE_HEADER_SIZE |
Deprecated.
The AC-4 sync frame header size for extractor. |
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static void | getAc4SampleHeader(int size, ParsableByteArray buffer) |
Deprecated.
Populates buffer with an AC-4 sample header for a sample of the specified size.
|
| static Format | parseAc4AnnexEFormat(ParsableByteArray data, String trackId, String language, DrmInitData drmInitData) |
Deprecated.
Returns the AC-4 format given data containing the AC4SpecificBox according to ETSI TS 103 190-1 Annex E.
|
| static int | parseAc4SyncframeAudioSampleCount(ByteBuffer buffer) |
Deprecated.
Reads the number of audio samples represented by the given AC-4 syncframe.
|
| static Ac4Util.SyncFrameInfo | parseAc4SyncframeInfo(ParsableBitArray data) |
Deprecated.
Returns AC-4 format information given data containing a syncframe.
|
| static int | parseAc4SyncframeSize(byte[] data, int syncword) |
Deprecated.
Returns the size in bytes of the given AC-4 syncframe. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int AC40_SYNCWORD
Deprecated. See Also:Constant Field Values
-
public static final int AC41_SYNCWORD
Deprecated. See Also:Constant Field Values
-
public static final int MAX_RATE_BYTES_PER_SECOND
Deprecated.
Maximum rate for an AC-4 audio stream, in bytes per second. See Also:Constant Field Values
-
public static final int SAMPLE_HEADER_SIZE
Deprecated.
The AC-4 sync frame header size for extractor. The seven bytes are 0xAC, 0x40, 0xFF, 0xFF, sizeByte1, sizeByte2, sizeByte3. See ETSI TS 103 190-1 V1.3.1, Annex G See Also:Constant Field Values
-
public static final int HEADER_SIZE_FOR_PARSER
Deprecated.
The header size for AC-4 parser. Only needs to be as big as we need to read, not the full header size. See Also:Constant Field Values
-
public static[Format](../Format.html "class in com.google.android.exoplayer2")parseAc4AnnexEFormat([ParsableByteArray](../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")data,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")trackId,[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 AC-4 format given data containing the AC4SpecificBox according to ETSI TS 103 190-1 Annex E. The reading position of data will be modified.
Parameters:data - The AC4SpecificBox 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 AC-4 format parsed from data in the header.
-
public static[Ac4Util.SyncFrameInfo](Ac4Util.SyncFrameInfo.html "class in com.google.android.exoplayer2.audio")parseAc4SyncframeInfo([ParsableBitArray](../util/ParsableBitArray.html "class in com.google.android.exoplayer2.util")data)
Deprecated.
Returns AC-4 format information given data containing a syncframe. The reading position of data will be modified.
Parameters:data - The data to parse, positioned at the start of the syncframe.Returns:The AC-4 format data parsed from the header.
-
public static int parseAc4SyncframeSize(byte[] data,
int syncword)
Deprecated.
Returns the size in bytes of the given AC-4 syncframe.
Parameters:data - The syncframe to parse.syncword - The syncword value for the syncframe.Returns:The syncframe size in bytes, or C.LENGTH_UNSET if the input is invalid.
-
public static int parseAc4SyncframeAudioSampleCount([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html "class or interface in java.nio")buffer)
Deprecated.
Reads the number of audio samples represented by the given AC-4 syncframe. The buffer's position is not modified.
Parameters:buffer - The ByteBuffer from which to read the syncframe.Returns:The number of audio samples represented by the syncframe.
-
public static void getAc4SampleHeader(int size,[ParsableByteArray](../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")buffer)
Deprecated.
Populates buffer with an AC-4 sample header for a sample of the specified size.