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 DecoderInputBuffercreateInputBuffer()Deprecated.Creates a new input buffer.protected SimpleDecoderOutputBuffercreateOutputBuffer()Deprecated.Creates a new output buffer.protected FlacDecoderExceptioncreateUnexpectedDecodeException(Throwable error)Deprecated.Creates an exception to propagate for an unexpected decode error.protected FlacDecoderExceptiondecode(DecoderInputBuffer inputBuffer, SimpleDecoderOutputBuffer outputBuffer, boolean reset)Deprecated.Decodes theinputBufferand stores any decoded output inoutputBuffer.StringgetName()Deprecated.Returns the name of the decoder.FlacStreamMetadatagetStreamMetadata()Deprecated.Returns theFlacStreamMetadatadecoded from the initialization data.voidrelease()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 FlacDecoderExceptionDeprecated.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_VALUEotherwise.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:DecoderReturns the name of the decoder.- Returns:
- The name of the decoder.
-
createInputBuffer
protected DecoderInputBuffer createInputBuffer()
Deprecated.Description copied from class:SimpleDecoderCreates a new input buffer.- Specified by:
createInputBufferin classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
createOutputBuffer
protected SimpleDecoderOutputBuffer createOutputBuffer()
Deprecated.Description copied from class:SimpleDecoderCreates a new output buffer.- Specified by:
createOutputBufferin classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
createUnexpectedDecodeException
protected FlacDecoderException createUnexpectedDecodeException(Throwable error)
Deprecated.Description copied from class:SimpleDecoderCreates an exception to propagate for an unexpected decode error.- Specified by:
createUnexpectedDecodeExceptionin 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:SimpleDecoderDecodes theinputBufferand stores any decoded output inoutputBuffer.- Specified by:
decodein classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>- Parameters:
inputBuffer- The buffer to decode.outputBuffer- The output buffer to store decoded data. The flagC.BUFFER_FLAG_DECODE_ONLYwill 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:DecoderReleases the decoder. Must be called when the decoder is no longer needed.- Specified by:
releasein interfaceDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>- Overrides:
releasein classSimpleDecoder<DecoderInputBuffer,SimpleDecoderOutputBuffer,FlacDecoderException>
-
getStreamMetadata
public FlacStreamMetadata getStreamMetadata()
Deprecated.Returns theFlacStreamMetadatadecoded from the initialization data.
-
-