docs/doc/reference/com/google/android/exoplayer2/ext/flac/FlacDecoder.html
Package com.google.android.exoplayer2.ext.flac
All Implemented Interfaces:Decoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classFlacDecoderextends[SimpleDecoder](../../decoder/SimpleDecoder.html "class in com.google.android.exoplayer2.decoder")<[DecoderInputBuffer](../../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder"),[SimpleDecoderOutputBuffer](../../decoder/SimpleDecoderOutputBuffer.html "class in com.google.android.exoplayer2.decoder"),[FlacDecoderException](FlacDecoderException.html "class in com.google.android.exoplayer2.ext.flac")>
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.
Flac decoder.
Constructors | Constructor | Description |
| --- | --- |
| FlacDecoder(int numInputBuffers, int numOutputBuffers, int maxInputBufferSize, List<byte[]> initializationData) |
Deprecated.
Creates a Flac decoder. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| protected DecoderInputBuffer | createInputBuffer() |
Deprecated.
Creates a new input buffer.
|
| protected SimpleDecoderOutputBuffer | createOutputBuffer() |
Deprecated.
Creates a new output buffer.
|
| protected FlacDecoderException | createUnexpectedDecodeException(Throwable error) |
Deprecated.
Creates an exception to propagate for an unexpected decode error.
|
| protected FlacDecoderException | decode(DecoderInputBuffer inputBuffer, SimpleDecoderOutputBuffer outputBuffer, boolean reset) |
Deprecated.
Decodes the inputBuffer and stores any decoded output in outputBuffer.
|
| String | getName() |
Deprecated.
Returns the name of the decoder.
|
| FlacStreamMetadata | getStreamMetadata() |
Deprecated.
Returns the FlacStreamMetadata decoded from the initialization data.
|
| void | release() |
Deprecated.
Releases the decoder. |
-
dequeueInputBuffer, dequeueOutputBuffer, flush, queueInputBuffer, releaseOutputBuffer, setInitialInputBufferSize
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public FlacDecoder(int numInputBuffers,
int numOutputBuffers,
int maxInputBufferSize,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<byte[]> initializationData)
throws[FlacDecoderException](FlacDecoderException.html "class in com.google.android.exoplayer2.ext.flac")
Deprecated.
Creates a Flac decoder.
Parameters:numInputBuffers - The number of input buffers.numOutputBuffers - The number of output buffers.maxInputBufferSize - The maximum required input buffer size if known, or Format.NO_VALUE otherwise.initializationData - Codec-specific initialization data. It should contain only one entry which is the flac file header.Throws:FlacDecoderException - Thrown if an exception occurs when initializing the decoder.
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getName()
Deprecated.
Description copied from interface: Decoder
Returns the name of the decoder. Returns:The name of the decoder.
-
protected[DecoderInputBuffer](../../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")createInputBuffer()
Deprecated.
Description copied from class: SimpleDecoder
Creates a new input buffer.
Specified by:createInputBuffer in class SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
protected[SimpleDecoderOutputBuffer](../../decoder/SimpleDecoderOutputBuffer.html "class in com.google.android.exoplayer2.decoder")createOutputBuffer()
Deprecated.
Description copied from class: SimpleDecoder
Creates a new output buffer.
Specified by:createOutputBuffer in class SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
protected[FlacDecoderException](FlacDecoderException.html "class in com.google.android.exoplayer2.ext.flac")createUnexpectedDecodeException([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")error)
Deprecated.
Description copied from class: SimpleDecoder
Creates an exception to propagate for an unexpected decode error.
Specified by:createUnexpectedDecodeException in class SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>Parameters:error - The unexpected decode error.Returns:The exception to propagate.
-
@Nullable
protected[FlacDecoderException](FlacDecoderException.html "class in com.google.android.exoplayer2.ext.flac")decode([DecoderInputBuffer](../../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")inputBuffer,[SimpleDecoderOutputBuffer](../../decoder/SimpleDecoderOutputBuffer.html "class in com.google.android.exoplayer2.decoder")outputBuffer,
boolean reset)
Deprecated.
Description copied from class: SimpleDecoder
Decodes the inputBuffer and stores any decoded output in outputBuffer.
Specified by:decode in class SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>Parameters:inputBuffer - The buffer to decode.outputBuffer - The output buffer to store decoded data. The flag C.BUFFER_FLAG_DECODE_ONLY will be set if the same flag is set on inputBuffer, but may be set/unset as required. If the flag is set when the call returns then the output buffer will not be made available to dequeue. The output buffer may not have been populated in this case.reset - Whether the decoder must be reset before decoding.Returns:A decoder exception if an error occurred, or null if decoding was successful.
-
public void release()
Deprecated.
Description copied from interface: Decoder
Releases the decoder. Must be called when the decoder is no longer needed.
Specified by:release in interface Decoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>Overrides:release in class SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
public[FlacStreamMetadata](../../extractor/FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")getStreamMetadata()
Deprecated.
Returns the FlacStreamMetadata decoded from the initialization data.