docs/doc/reference/com/google/android/exoplayer2/extractor/FlacFrameReader.html
Package com.google.android.exoplayer2.extractor
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classFlacFrameReaderextends[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.
Reads and peeks FLAC frame elements according to the FLAC format specification.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | FlacFrameReader.SampleNumberHolder |
Deprecated.
Holds a sample number. |
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static boolean | checkAndReadFrameHeader(ParsableByteArray data, FlacStreamMetadata flacStreamMetadata, int frameStartMarker, FlacFrameReader.SampleNumberHolder sampleNumberHolder) |
Deprecated.
Checks whether the given FLAC frame header is valid and, if so, reads it and writes the frame first sample number in sampleNumberHolder.
|
| static boolean | checkFrameHeaderFromPeek(ExtractorInput input, FlacStreamMetadata flacStreamMetadata, int frameStartMarker, FlacFrameReader.SampleNumberHolder sampleNumberHolder) |
Deprecated.
Checks whether the given FLAC frame header is valid and, if so, writes the frame first sample number in sampleNumberHolder.
|
| static long | getFirstSampleNumber(ExtractorInput input, FlacStreamMetadata flacStreamMetadata) |
Deprecated.
Returns the number of the first sample in the given frame.
|
| static int | readFrameBlockSizeSamplesFromKey(ParsableByteArray data, int blockSizeKey) |
Deprecated.
Reads the given block size. |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static boolean checkAndReadFrameHeader([ParsableByteArray](../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")data,[FlacStreamMetadata](FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")flacStreamMetadata,
int frameStartMarker,[FlacFrameReader.SampleNumberHolder](FlacFrameReader.SampleNumberHolder.html "class in com.google.android.exoplayer2.extractor")sampleNumberHolder)
Deprecated.
Checks whether the given FLAC frame header is valid and, if so, reads it and writes the frame first sample number in sampleNumberHolder.
If the header is valid, the position of data is moved to the byte following it. Otherwise, there is no guarantee on the position.
Parameters:data - The array to read the data from, whose position must correspond to the frame header.flacStreamMetadata - The stream metadata.frameStartMarker - The frame start marker of the stream.sampleNumberHolder - The holder used to contain the sample number.Returns:Whether the frame header is valid.
-
public static boolean checkFrameHeaderFromPeek([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,[FlacStreamMetadata](FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")flacStreamMetadata,
int frameStartMarker,[FlacFrameReader.SampleNumberHolder](FlacFrameReader.SampleNumberHolder.html "class in com.google.android.exoplayer2.extractor")sampleNumberHolder)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Checks whether the given FLAC frame header is valid and, if so, writes the frame first sample number in sampleNumberHolder.
The input peek position is left unchanged.
Parameters:input - The input to get the data from, whose peek position must correspond to the frame header.flacStreamMetadata - The stream metadata.frameStartMarker - The frame start marker of the stream.sampleNumberHolder - The holder used to contain the sample number.Returns:Whether the frame header is valid.Throws:IOException
-
public static long getFirstSampleNumber([ExtractorInput](ExtractorInput.html "interface in com.google.android.exoplayer2.extractor")input,[FlacStreamMetadata](FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")flacStreamMetadata)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")
Deprecated.
Returns the number of the first sample in the given frame.
The read position of input is left unchanged.
If no exception is thrown, the peek position is aligned with the read position. Otherwise, there is no guarantee on the peek position.
Parameters:input - Input stream to get the sample number from (starting from the read position).flacStreamMetadata - The FLAC metadata of the stream.Returns:The frame first sample number.Throws:ParserException - If an error occurs parsing the sample number.IOException - If peeking from the input fails.
-
public static int readFrameBlockSizeSamplesFromKey([ParsableByteArray](../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")data,
int blockSizeKey)
Deprecated.
Reads the given block size.
Parameters:data - The array to read the data from, whose position must correspond to the block size bits.blockSizeKey - The key in the block size lookup table.Returns:The block size in samples, or -1 if the blockSizeKey is invalid.