docs/doc/reference/com/google/android/exoplayer2/ext/av1/Libgav1VideoRenderer.html
Package com.google.android.exoplayer2.ext.av1
All Implemented Interfaces:PlayerMessage.Target, Renderer, RendererCapabilities
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classLibgav1VideoRendererextends[DecoderVideoRenderer](../../video/DecoderVideoRenderer.html "class in com.google.android.exoplayer2.video")
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.
Decodes and renders video using libgav1 decoder.
-
Renderer.MessageType, Renderer.State, Renderer.WakeupListener
-
RendererCapabilities.AdaptiveSupport, RendererCapabilities.Capabilities, RendererCapabilities.DecoderSupport, RendererCapabilities.FormatSupport, RendererCapabilities.HardwareAccelerationSupport, RendererCapabilities.Listener, RendererCapabilities.TunnelingSupport
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | THREAD_COUNT_AUTODETECT |
Deprecated.
Attempts to use as many threads as performance processors available on the device. |
-
decoderCounters
-
MSG_CUSTOM_BASE, MSG_SET_AUDIO_ATTRIBUTES, MSG_SET_AUDIO_SESSION_ID, MSG_SET_AUX_EFFECT_INFO, MSG_SET_CAMERA_MOTION_LISTENER, MSG_SET_CHANGE_FRAME_RATE_STRATEGY, MSG_SET_PREFERRED_AUDIO_DEVICE, MSG_SET_SCALING_MODE, MSG_SET_SKIP_SILENCE_ENABLED, MSG_SET_VIDEO_EFFECTS, MSG_SET_VIDEO_FRAME_METADATA_LISTENER, MSG_SET_VIDEO_OUTPUT, MSG_SET_VIDEO_OUTPUT_RESOLUTION, MSG_SET_VOLUME, MSG_SET_WAKEUP_LISTENER, STATE_DISABLED, STATE_ENABLED, STATE_STARTED
-
ADAPTIVE_NOT_SEAMLESS, ADAPTIVE_NOT_SUPPORTED, ADAPTIVE_SEAMLESS, ADAPTIVE_SUPPORT_MASK, DECODER_SUPPORT_FALLBACK, DECODER_SUPPORT_FALLBACK_MIMETYPE, DECODER_SUPPORT_PRIMARY, FORMAT_EXCEEDS_CAPABILITIES, FORMAT_HANDLED, FORMAT_SUPPORT_MASK, FORMAT_UNSUPPORTED_DRM, FORMAT_UNSUPPORTED_SUBTYPE, FORMAT_UNSUPPORTED_TYPE, HARDWARE_ACCELERATION_NOT_SUPPORTED, HARDWARE_ACCELERATION_SUPPORT_MASK, HARDWARE_ACCELERATION_SUPPORTED, MODE_SUPPORT_MASK, TUNNELING_NOT_SUPPORTED, TUNNELING_SUPPORT_MASK, TUNNELING_SUPPORTED
Constructors | Constructor | Description |
| --- | --- |
| Libgav1VideoRenderer(long allowedJoiningTimeMs, Handler eventHandler, VideoRendererEventListener eventListener, int maxDroppedFramesToNotify) |
Deprecated.
Creates a new instance.
|
| Libgav1VideoRenderer(long allowedJoiningTimeMs, Handler eventHandler, VideoRendererEventListener eventListener, int maxDroppedFramesToNotify, int threads, int numInputBuffers, int numOutputBuffers) |
Deprecated.
Creates a new instance. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| protected DecoderReuseEvaluation | canReuseDecoder(String decoderName, Format oldFormat, Format newFormat) |
Deprecated.
Evaluates whether the existing decoder can be reused for a new Format.
|
| protected Gav1Decoder | createDecoder(Format format, CryptoConfig cryptoConfig) |
Deprecated.
Creates a decoder for the given format.
|
| String | getName() |
Deprecated.
Returns the name of this renderer, for logging and debugging purposes.
|
| protected void | renderOutputBufferToSurface(VideoDecoderOutputBuffer outputBuffer, Surface surface) |
Deprecated.
Renders the specified output buffer to the passed surface.
|
| protected void | setDecoderOutputMode(@com.google.android.exoplayer2.C.VideoOutputMode int outputMode) |
Deprecated.
Sets output mode of the decoder.
|
| @com.google.android.exoplayer2.RendererCapabilities.Capabilities int | supportsFormat(Format format) |
Deprecated.
Returns the extent to which the Renderer supports a given format.
|
-
dropOutputBuffer, flushDecoder, handleMessage, isEnded, isReady, maybeDropBuffersToKeyframe, onDisabled, onEnabled, onInputFormatChanged, onPositionReset, onProcessedOutputBuffer, onQueueInputBuffer, onStarted, onStopped, onStreamChanged, releaseDecoder, render, renderOutputBuffer, setOutput, shouldDropBuffersToKeyframe, shouldDropOutputBuffer, shouldForceRenderOutputBuffer, skipOutputBuffer, updateDroppedBufferCounters
-
clearListener, createRendererException, createRendererException, disable, enable, getCapabilities, getConfiguration, getFormatHolder, getIndex, getLastResetPositionUs, getMediaClock, getPlayerId, getReadingPositionUs, getState, getStream, getStreamFormats, getTrackType, hasReadStreamToEnd, init, isCurrentStreamFinal, isSourceReady, maybeThrowStreamError, onRelease, onRendererCapabilitiesChanged, onReset, readSource, release, replaceStream, reset, resetPosition, setCurrentStreamFinal, setListener, skipSource, start, stop, supportsMixedMimeTypeAdaptation
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
setPlaybackSpeed
-
public static final int THREAD_COUNT_AUTODETECT
Deprecated.
Attempts to use as many threads as performance processors available on the device. If the number of performance processors cannot be detected, the number of available processors is used. See Also:Constant Field Values
-
public Libgav1VideoRenderer(long allowedJoiningTimeMs,
@Nullable[Handler](https://developer.android.com/reference/android/os/Handler.html "class or interface in android.os")eventHandler,
@Nullable[VideoRendererEventListener](../../video/VideoRendererEventListener.html "interface in com.google.android.exoplayer2.video")eventListener,
int maxDroppedFramesToNotify)
Deprecated.
Creates a new instance.
Parameters:allowedJoiningTimeMs - The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.eventHandler - A handler to use when delivering events to eventListener. May be null if delivery of events is not required.eventListener - A listener of events. May be null if delivery of events is not required.maxDroppedFramesToNotify - The maximum number of frames that can be dropped between invocations of VideoRendererEventListener.onDroppedFrames(int, long).
-
public Libgav1VideoRenderer(long allowedJoiningTimeMs,
@Nullable[Handler](https://developer.android.com/reference/android/os/Handler.html "class or interface in android.os")eventHandler,
@Nullable[VideoRendererEventListener](../../video/VideoRendererEventListener.html "interface in com.google.android.exoplayer2.video")eventListener,
int maxDroppedFramesToNotify,
int threads,
int numInputBuffers,
int numOutputBuffers)
Deprecated.
Creates a new instance.
Parameters:allowedJoiningTimeMs - The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.eventHandler - A handler to use when delivering events to eventListener. May be null if delivery of events is not required.eventListener - A listener of events. May be null if delivery of events is not required.maxDroppedFramesToNotify - The maximum number of frames that can be dropped between invocations of VideoRendererEventListener.onDroppedFrames(int, long).threads - Number of threads libgav1 will use to decode. If THREAD_COUNT_AUTODETECT is passed, then the number of threads to use is autodetected based on CPU capabilities.numInputBuffers - Number of input buffers.numOutputBuffers - Number of output buffers.
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getName()
Deprecated.
Description copied from interface: Renderer
Returns the name of this renderer, for logging and debugging purposes. Should typically be the renderer's (un-obfuscated) class name. Returns:The name of this renderer.
-
public final @com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportsFormat([Format](../../Format.html "class in com.google.android.exoplayer2")format)
Deprecated.
Description copied from interface: RendererCapabilities
Returns the extent to which the Renderer supports a given format.
Parameters:format - The format.Returns:The RendererCapabilities.Capabilities for this format.
-
protected final[Gav1Decoder](Gav1Decoder.html "class in com.google.android.exoplayer2.ext.av1")createDecoder([Format](../../Format.html "class in com.google.android.exoplayer2")format,
@Nullable[CryptoConfig](../../decoder/CryptoConfig.html "interface in com.google.android.exoplayer2.decoder")cryptoConfig)
throws[Gav1DecoderException](Gav1DecoderException.html "class in com.google.android.exoplayer2.ext.av1")
Deprecated.
Creates a decoder for the given format.
Specified by:createDecoder in class DecoderVideoRendererParameters:format - The format for which a decoder is required.cryptoConfig - The CryptoConfig object required for decoding encrypted content. May be null and can be ignored if decoder does not handle encrypted content.Returns:The decoder.Throws:Gav1DecoderException
-
protected void renderOutputBufferToSurface([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[Gav1DecoderException](Gav1DecoderException.html "class in com.google.android.exoplayer2.ext.av1")
Deprecated.
Description copied from class: DecoderVideoRenderer
Renders the specified output buffer to the passed surface.
The implementation of this method takes ownership of the output buffer and is responsible for calling VideoDecoderOutputBuffer.release() either immediately or in the future.
Specified by:renderOutputBufferToSurface in class DecoderVideoRendererParameters:outputBuffer - VideoDecoderOutputBuffer to render.surface - Output Surface.Throws:Gav1DecoderException
-
protected void setDecoderOutputMode(@com.google.android.exoplayer2.C.VideoOutputMode int outputMode)
Deprecated.
Description copied from class: DecoderVideoRenderer
Sets output mode of the decoder.
Specified by:setDecoderOutputMode in class DecoderVideoRendererParameters:outputMode - Output mode.
-
protected[DecoderReuseEvaluation](../../decoder/DecoderReuseEvaluation.html "class in com.google.android.exoplayer2.decoder")canReuseDecoder([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")decoderName,[Format](../../Format.html "class in com.google.android.exoplayer2")oldFormat,[Format](../../Format.html "class in com.google.android.exoplayer2")newFormat)
Deprecated.
Description copied from class: DecoderVideoRenderer
Evaluates whether the existing decoder can be reused for a new Format.
The default implementation does not allow decoder reuse.
Overrides:canReuseDecoder in class DecoderVideoRendererParameters:decoderName - The name of the decoder.oldFormat - The previous format.newFormat - The new format.Returns:The result of the evaluation.