Back to Exoplayer

VpxDecoder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ext/vp9/VpxDecoder.html

latest9.8 KB
Original Source

Package com.google.android.exoplayer2.ext.vp9

Class VpxDecoder


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classVpxDecoderextends[SimpleDecoder](../../decoder/SimpleDecoder.html "class in com.google.android.exoplayer2.decoder")<[DecoderInputBuffer](../../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder"),​[VideoDecoderOutputBuffer](../../decoder/VideoDecoderOutputBuffer.html "class in com.google.android.exoplayer2.decoder"),​[VpxDecoderException](VpxDecoderException.html "class in com.google.android.exoplayer2.ext.vp9")>

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.

Vpx decoder.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | VpxDecoder​(int numInputBuffers, int numOutputBuffers, int initialInputBufferSize, CryptoConfig cryptoConfig, int threads) | Deprecated.

Creates a VP9 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 VideoDecoderOutputBuffer | createOutputBuffer() | Deprecated.

Creates a new output buffer. | | protected VpxDecoderException | createUnexpectedDecodeException​(Throwable error) | Deprecated.

Creates an exception to propagate for an unexpected decode error. | | protected VpxDecoderException | decode​(DecoderInputBuffer inputBuffer, VideoDecoderOutputBuffer outputBuffer, boolean reset) | Deprecated.

Decodes the inputBuffer and stores any decoded output in outputBuffer. | | String | getName() | Deprecated.

Returns the name of the decoder. | | void | release() | Deprecated.

Releases the decoder. | | protected void | releaseOutputBuffer​(VideoDecoderOutputBuffer outputBuffer) | Deprecated.

Releases an output buffer back to the decoder. | | void | renderToSurface​(VideoDecoderOutputBuffer outputBuffer, Surface surface) | Deprecated.

Renders the outputBuffer to the surface. | | void | setOutputMode​(@com.google.android.exoplayer2.C.VideoOutputMode int outputMode) | Deprecated.

Sets the output mode for frames rendered by the decoder. |

- 

Methods inherited from class com.google.android.exoplayer2.decoder.SimpleDecoder

dequeueInputBuffer, dequeueOutputBuffer, flush, queueInputBuffer, setInitialInputBufferSize

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

VpxDecoder

public VpxDecoder​(int numInputBuffers,
                  int numOutputBuffers,
                  int initialInputBufferSize,
                  @Nullable[CryptoConfig](../../decoder/CryptoConfig.html "interface in com.google.android.exoplayer2.decoder")cryptoConfig,
                  int threads)
           throws[VpxDecoderException](VpxDecoderException.html "class in com.google.android.exoplayer2.ext.vp9")

Deprecated.

Creates a VP9 decoder. Parameters:numInputBuffers - The number of input buffers.numOutputBuffers - The number of output buffers.initialInputBufferSize - The initial size of each input buffer.cryptoConfig - The CryptoConfig object required for decoding encrypted content. May be null and can be ignored if decoder does not handle encrypted content.threads - Number of threads libvpx will use to decode.Throws:VpxDecoderException - Thrown if an exception occurs when initializing the decoder.

Method Detail

- 

getName

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.

- 

createInputBuffer

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,​VideoDecoderOutputBuffer,​VpxDecoderException>

- 

createOutputBuffer

protected[VideoDecoderOutputBuffer](../../decoder/VideoDecoderOutputBuffer.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,​VideoDecoderOutputBuffer,​VpxDecoderException>

- 

releaseOutputBuffer

protected void releaseOutputBuffer​([VideoDecoderOutputBuffer](../../decoder/VideoDecoderOutputBuffer.html "class in com.google.android.exoplayer2.decoder")outputBuffer)

Deprecated.

Description copied from class: SimpleDecoder

Releases an output buffer back to the decoder. Overrides:releaseOutputBuffer in class SimpleDecoder<DecoderInputBuffer,​VideoDecoderOutputBuffer,​VpxDecoderException>Parameters:outputBuffer - The output buffer being released.

- 

createUnexpectedDecodeException

protected[VpxDecoderException](VpxDecoderException.html "class in com.google.android.exoplayer2.ext.vp9")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,​VideoDecoderOutputBuffer,​VpxDecoderException>Parameters:error - The unexpected decode error.Returns:The exception to propagate.

- 

decode

@Nullable
protected[VpxDecoderException](VpxDecoderException.html "class in com.google.android.exoplayer2.ext.vp9")decode​([DecoderInputBuffer](../../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")inputBuffer,[VideoDecoderOutputBuffer](../../decoder/VideoDecoderOutputBuffer.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,​VideoDecoderOutputBuffer,​VpxDecoderException>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.

- 

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 interface Decoder<DecoderInputBuffer,​VideoDecoderOutputBuffer,​VpxDecoderException>Overrides:release in class SimpleDecoder<DecoderInputBuffer,​VideoDecoderOutputBuffer,​VpxDecoderException>

- 

setOutputMode

public void setOutputMode​(@com.google.android.exoplayer2.C.VideoOutputMode int outputMode)

Deprecated.

Sets the output mode for frames rendered by the decoder. Parameters:outputMode - The output mode.

- 

renderToSurface

public void renderToSurface​([VideoDecoderOutputBuffer](../../decoder/VideoDecoderOutputBuffer.html "class in com.google.android.exoplayer2.decoder")outputBuffer,[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")surface)
                     throws[VpxDecoderException](VpxDecoderException.html "class in com.google.android.exoplayer2.ext.vp9")

Deprecated.

Renders the outputBuffer to the surface. Used with OUTPUT_MODE_SURFACE_YUV only. Throws:VpxDecoderException