Class FlacDecoder
- java.lang.Object
-
- com.google.android.exoplayer2.decoder.SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
- com.google.android.exoplayer2.ext.flac.FlacDecoder
-
- All Implemented Interfaces:
Decoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
@Deprecated public final class FlacDecoder extends SimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
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.
-
-
Constructor Summary
Constructors Constructor Description FlacDecoder(int numInputBuffers, int numOutputBuffers, int maxInputBufferSize, List<byte[]> initializationData)
Deprecated.Creates a Flac decoder.
-
Method Summary
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 theinputBuffer
and stores any decoded output inoutputBuffer
.String
getName()
Deprecated.Returns the name of the decoder.FlacStreamMetadata
getStreamMetadata()
Deprecated.Returns theFlacStreamMetadata
decoded from the initialization data.void
release()
Deprecated.Releases the decoder.-
Methods inherited from class com.google.android.exoplayer2.decoder.SimpleDecoder
dequeueInputBuffer, dequeueOutputBuffer, flush, queueInputBuffer, releaseOutputBuffer, setInitialInputBufferSize
-
-
-
-
Constructor Detail
-
FlacDecoder
public FlacDecoder(int numInputBuffers, int numOutputBuffers, int maxInputBufferSize, List<byte[]> initializationData) throws FlacDecoderException
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, orFormat.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.
-
-
Method Detail
-
getName
public String getName()
Deprecated.Description copied from interface:Decoder
Returns the name of the decoder.- Returns:
- The name of the decoder.
-
createInputBuffer
protected DecoderInputBuffer createInputBuffer()
Deprecated.Description copied from class:SimpleDecoder
Creates a new input buffer.- Specified by:
createInputBuffer
in classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
createOutputBuffer
protected SimpleDecoderOutputBuffer createOutputBuffer()
Deprecated.Description copied from class:SimpleDecoder
Creates a new output buffer.- Specified by:
createOutputBuffer
in classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
createUnexpectedDecodeException
protected FlacDecoderException createUnexpectedDecodeException(Throwable error)
Deprecated.Description copied from class:SimpleDecoder
Creates an exception to propagate for an unexpected decode error.- Specified by:
createUnexpectedDecodeException
in classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
- Parameters:
error
- The unexpected decode error.- Returns:
- The exception to propagate.
-
decode
@Nullable protected FlacDecoderException decode(DecoderInputBuffer inputBuffer, SimpleDecoderOutputBuffer outputBuffer, boolean reset)
Deprecated.Description copied from class:SimpleDecoder
Decodes theinputBuffer
and stores any decoded output inoutputBuffer
.- Specified by:
decode
in classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
- Parameters:
inputBuffer
- The buffer to decode.outputBuffer
- The output buffer to store decoded data. The flagC.BUFFER_FLAG_DECODE_ONLY
will be set if the same flag is set oninputBuffer
, 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.
-
release
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 interfaceDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
- Overrides:
release
in classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
getStreamMetadata
public FlacStreamMetadata getStreamMetadata()
Deprecated.Returns theFlacStreamMetadata
decoded from the initialization data.
-
-