Back to Exoplayer

BaseRenderer (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/BaseRenderer.html

latest39.2 KB
Original Source

Package com.google.android.exoplayer2

Class BaseRenderer

  • java.lang.Object

    • com.google.android.exoplayer2.BaseRenderer
  • All Implemented Interfaces:PlayerMessage.Target, Renderer, RendererCapabilitiesDirect Known Subclasses:CameraMotionRenderer, DecoderAudioRenderer, DecoderVideoRenderer, FakeRenderer, MediaCodecRenderer, MetadataRenderer, TextRenderer


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classBaseRendererextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Renderer](Renderer.html "interface in com.google.android.exoplayer2"),[RendererCapabilities](RendererCapabilities.html "interface in com.google.android.exoplayer2")

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.

An abstract base class suitable for most Renderer implementations.

Nested Class Summary

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Renderer

Renderer.MessageType, Renderer.State, Renderer.WakeupListener

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.RendererCapabilities

RendererCapabilities.AdaptiveSupport, RendererCapabilities.Capabilities, RendererCapabilities.DecoderSupport, RendererCapabilities.FormatSupport, RendererCapabilities.HardwareAccelerationSupport, RendererCapabilities.Listener, RendererCapabilities.TunnelingSupport

Field Summary

- 

Fields inherited from interface com.google.android.exoplayer2.Renderer

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

- 

Fields inherited from interface com.google.android.exoplayer2.RendererCapabilities

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

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | BaseRenderer​(@com.google.android.exoplayer2.C.TrackType int trackType) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | clearListener() | Deprecated.

Clears the RendererCapabilities.Listener. | | protected ExoPlaybackException | createRendererException​(Throwable cause, Format format, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode) | Deprecated.

Creates an ExoPlaybackException of type ExoPlaybackException.TYPE_RENDERER for this renderer. | | protected ExoPlaybackException | createRendererException​(Throwable cause, Format format, boolean isRecoverable, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode) | Deprecated.

Creates an ExoPlaybackException of type ExoPlaybackException.TYPE_RENDERER for this renderer. | | void | disable() | Deprecated.

Disable the renderer, transitioning it to the Renderer.STATE_DISABLED state. | | void | enable​(RendererConfiguration configuration, Format[] formats, SampleStream stream, long positionUs, boolean joining, boolean mayRenderStartOfStream, long startPositionUs, long offsetUs) | Deprecated.

Enables the renderer to consume from the specified SampleStream. | | RendererCapabilities | getCapabilities() | Deprecated.

Returns the capabilities of the renderer. | | protected RendererConfiguration | getConfiguration() | Deprecated.

Returns the configuration set when the renderer was most recently enabled. | | protected FormatHolder | getFormatHolder() | Deprecated.

Returns a clear FormatHolder. | | protected int | getIndex() | Deprecated.

Returns the index of the renderer within the player. | | protected long | getLastResetPositionUs() | Deprecated.

Returns the position passed to the most recent call to enable(com.google.android.exoplayer2.RendererConfiguration, com.google.android.exoplayer2.Format[], com.google.android.exoplayer2.source.SampleStream, long, boolean, boolean, long, long) or resetPosition(long). | | MediaClock | getMediaClock() | Deprecated.

If the renderer advances its own playback position then this method returns a corresponding MediaClock. | | protected PlayerId | getPlayerId() | Deprecated.

Returns the PlayerId of the player using this renderer. | | long | getReadingPositionUs() | Deprecated.

Returns the renderer time up to which the renderer has read samples, in microseconds, or C.TIME_END_OF_SOURCE if the renderer has read the current SampleStream to the end. | | int | getState() | Deprecated.

Returns the current state of the renderer. | | SampleStream | getStream() | Deprecated.

Returns the SampleStream being consumed, or null if the renderer is disabled. | | protected Format[] | getStreamFormats() | Deprecated.

Returns the formats of the currently enabled stream. | | @com.google.android.exoplayer2.C.TrackType int | getTrackType() | Deprecated.

Returns the track type that the renderer handles. | | void | handleMessage​(@com.google.android.exoplayer2.Renderer.MessageType int messageType, Object message) | Deprecated.

Handles a message delivered to the target. | | boolean | hasReadStreamToEnd() | Deprecated.

Returns whether the renderer has read the current SampleStream to the end. | | void | init​(int index, PlayerId playerId) | Deprecated.

Initializes the renderer for playback with a player. | | boolean | isCurrentStreamFinal() | Deprecated.

Returns whether the current SampleStream will be the final one supplied before the renderer is next disabled or reset. | | protected boolean | isSourceReady() | Deprecated.

Returns whether the upstream source is ready. | | void | maybeThrowStreamError() | Deprecated.

Throws an error that's preventing the renderer from reading from its SampleStream. | | protected void | onDisabled() | Deprecated.

Called when the renderer is disabled. | | protected void | onEnabled​(boolean joining, boolean mayRenderStartOfStream) | Deprecated.

Called when the renderer is enabled. | | protected void | onPositionReset​(long positionUs, boolean joining) | Deprecated.

Called when the position is reset. | | protected void | onRelease() | Deprecated.

Called when the renderer is released. | | protected void | onRendererCapabilitiesChanged() | Deprecated.

Called when the renderer capabilities are changed. | | protected void | onReset() | Deprecated.

Called when the renderer is reset. | | protected void | onStarted() | Deprecated.

Called when the renderer is started. | | protected void | onStopped() | Deprecated.

Called when the renderer is stopped. | | protected void | onStreamChanged​(Format[] formats, long startPositionUs, long offsetUs) | Deprecated.

Called when the renderer's stream has changed. | | protected @com.google.android.exoplayer2.source.SampleStream.ReadDataResult int | readSource​(FormatHolder formatHolder, DecoderInputBuffer buffer, @com.google.android.exoplayer2.source.SampleStream.ReadFlags int readFlags) | Deprecated.

Reads from the enabled upstream source. | | void | release() | Deprecated.

Releases the renderer. | | void | replaceStream​(Format[] formats, SampleStream stream, long startPositionUs, long offsetUs) | Deprecated.

Replaces the SampleStream from which samples will be consumed. | | void | reset() | Deprecated.

Forces the renderer to give up any resources (e.g. | | void | resetPosition​(long positionUs) | Deprecated.

Signals to the renderer that a position discontinuity has occurred. | | void | setCurrentStreamFinal() | Deprecated.

Signals to the renderer that the current SampleStream will be the final one supplied before it is next disabled or reset. | | void | setListener​(RendererCapabilities.Listener listener) | Deprecated.

Sets the RendererCapabilities.Listener. | | protected int | skipSource​(long positionUs) | Deprecated.

Attempts to skip to the keyframe before the specified position, or to the end of the stream if positionUs is beyond it. | | void | start() | Deprecated.

Starts the renderer, meaning that calls to Renderer.render(long, long) will cause media to be rendered. | | void | stop() | Deprecated.

Stops the renderer, transitioning it to the Renderer.STATE_ENABLED state. | | @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int | supportsMixedMimeTypeAdaptation() | Deprecated.

Returns the extent to which the Renderer supports adapting between supported formats that have different MIME types. |

- 

Methods inherited from class java.lang.Object

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

- 

Methods inherited from interface com.google.android.exoplayer2.Renderer

getName, isEnded, isReady, render, setPlaybackSpeed

- 

Methods inherited from interface com.google.android.exoplayer2.RendererCapabilities

getName, supportsFormat

Constructor Detail

- 

BaseRenderer

public BaseRenderer​(@com.google.android.exoplayer2.C.TrackType int trackType)

Deprecated. Parameters:trackType - The track type that the renderer handles. One of the C TRACK_TYPE_* constants.

Method Detail

- 

getTrackType

public final @com.google.android.exoplayer2.C.TrackType int getTrackType()

Deprecated.

Description copied from interface: Renderer

Returns the track type that the renderer handles. Specified by:getTrackType in interface RendererSpecified by:getTrackType in interface RendererCapabilitiesReturns:The track type.See Also:ExoPlayer.getRendererType(int)

- 

getCapabilities

public final[RendererCapabilities](RendererCapabilities.html "interface in com.google.android.exoplayer2")getCapabilities()

Deprecated.

Description copied from interface: Renderer

Returns the capabilities of the renderer. Specified by:getCapabilities in interface RendererReturns:The capabilities of the renderer.

- 

init

public final void init​(int index,[PlayerId](analytics/PlayerId.html "class in com.google.android.exoplayer2.analytics")playerId)

Deprecated.

Description copied from interface: Renderer

Initializes the renderer for playback with a player. Specified by:init in interface RendererParameters:index - The renderer index within the player.playerId - The PlayerId of the player.

- 

getMediaClock

@Nullable
public[MediaClock](util/MediaClock.html "interface in com.google.android.exoplayer2.util")getMediaClock()

Deprecated.

Description copied from interface: Renderer

If the renderer advances its own playback position then this method returns a corresponding MediaClock. If provided, the player will use the returned MediaClock as its source of time during playback. A player may have at most one renderer that returns a MediaClock from this method. Specified by:getMediaClock in interface RendererReturns:The MediaClock tracking the playback position of the renderer, or null.

- 

getState

public final int getState()

Deprecated.

Description copied from interface: Renderer

Returns the current state of the renderer. Specified by:getState in interface RendererReturns:The current state. One of Renderer.STATE_DISABLED, Renderer.STATE_ENABLED and Renderer.STATE_STARTED.

- 

enable

public final void enable​([RendererConfiguration](RendererConfiguration.html "class in com.google.android.exoplayer2")configuration,[Format](Format.html "class in com.google.android.exoplayer2")[] formats,[SampleStream](source/SampleStream.html "interface in com.google.android.exoplayer2.source")stream,
                         long positionUs,
                         boolean joining,
                         boolean mayRenderStartOfStream,
                         long startPositionUs,
                         long offsetUs)
                  throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Description copied from interface: Renderer

Enables the renderer to consume from the specified SampleStream.

This method may be called when the renderer is in the following states: Renderer.STATE_DISABLED.

Specified by:enable in interface RendererParameters:configuration - The renderer configuration.formats - The enabled formats.stream - The SampleStream from which the renderer should consume.positionUs - The player's current position.joining - Whether this renderer is being enabled to join an ongoing playback.mayRenderStartOfStream - Whether this renderer is allowed to render the start of the stream even if the state is not Renderer.STATE_STARTED yet.startPositionUs - The start position of the stream in renderer time (microseconds).offsetUs - The offset to be added to timestamps of buffers read from stream before they are rendered.Throws:ExoPlaybackException - If an error occurs.

- 

start

public final void start()
                 throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Description copied from interface: Renderer

Starts the renderer, meaning that calls to Renderer.render(long, long) will cause media to be rendered.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED.

Specified by:start in interface RendererThrows:ExoPlaybackException - If an error occurs.

- 

replaceStream

public final void replaceStream​([Format](Format.html "class in com.google.android.exoplayer2")[] formats,[SampleStream](source/SampleStream.html "interface in com.google.android.exoplayer2.source")stream,
                                long startPositionUs,
                                long offsetUs)
                         throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Description copied from interface: Renderer

Replaces the SampleStream from which samples will be consumed.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Specified by:replaceStream in interface RendererParameters:formats - The enabled formats.stream - The SampleStream from which the renderer should consume.startPositionUs - The start position of the new stream in renderer time (microseconds).offsetUs - The offset to be added to timestamps of buffers read from stream before they are rendered.Throws:ExoPlaybackException - If an error occurs.

- 

getStream

@Nullable
public final[SampleStream](source/SampleStream.html "interface in com.google.android.exoplayer2.source")getStream()

Deprecated.

Description copied from interface: Renderer

Returns the SampleStream being consumed, or null if the renderer is disabled. Specified by:getStream in interface Renderer

- 

hasReadStreamToEnd

public final boolean hasReadStreamToEnd()

Deprecated.

Description copied from interface: Renderer

Returns whether the renderer has read the current SampleStream to the end.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Specified by:hasReadStreamToEnd in interface Renderer

- 

getReadingPositionUs

public final long getReadingPositionUs()

Deprecated.

Description copied from interface: Renderer

Returns the renderer time up to which the renderer has read samples, in microseconds, or C.TIME_END_OF_SOURCE if the renderer has read the current SampleStream to the end.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Specified by:getReadingPositionUs in interface Renderer

- 

setCurrentStreamFinal

public final void setCurrentStreamFinal()

Deprecated.

Description copied from interface: Renderer

Signals to the renderer that the current SampleStream will be the final one supplied before it is next disabled or reset.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Specified by:setCurrentStreamFinal in interface Renderer

- 

isCurrentStreamFinal

public final boolean isCurrentStreamFinal()

Deprecated.

Description copied from interface: Renderer

Returns whether the current SampleStream will be the final one supplied before the renderer is next disabled or reset. Specified by:isCurrentStreamFinal in interface Renderer

- 

maybeThrowStreamError

public final void maybeThrowStreamError()
                                 throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")

Deprecated.

Description copied from interface: Renderer

Throws an error that's preventing the renderer from reading from its SampleStream. Does nothing if no such error exists.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Specified by:maybeThrowStreamError in interface RendererThrows:IOException - An error that's preventing the renderer from making progress or buffering more data.

- 

resetPosition

public final void resetPosition​(long positionUs)
                         throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Description copied from interface: Renderer

Signals to the renderer that a position discontinuity has occurred.

After a position discontinuity, the renderer's SampleStream is guaranteed to provide samples starting from a key frame.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Specified by:resetPosition in interface RendererParameters:positionUs - The new playback position in microseconds.Throws:ExoPlaybackException - If an error occurs handling the reset.

- 

stop

public final void stop()

Deprecated.

Description copied from interface: Renderer

Stops the renderer, transitioning it to the Renderer.STATE_ENABLED state.

This method may be called when the renderer is in the following states: Renderer.STATE_STARTED.

Specified by:stop in interface Renderer

- 

disable

public final void disable()

Deprecated.

Description copied from interface: Renderer

Disable the renderer, transitioning it to the Renderer.STATE_DISABLED state.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED.

Specified by:disable in interface Renderer

- 

reset

public final void reset()

Deprecated.

Description copied from interface: Renderer

Forces the renderer to give up any resources (e.g. media decoders) that it may be holding. If the renderer is not holding any resources, the call is a no-op.

This method may be called when the renderer is in the following states: Renderer.STATE_DISABLED.

Specified by:reset in interface Renderer

- 

release

public final void release()

Deprecated.

Description copied from interface: Renderer

Releases the renderer.

The renderer must not be used after calling this method.

Specified by:release in interface Renderer

- 

supportsMixedMimeTypeAdaptation

public @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int supportsMixedMimeTypeAdaptation()
                                                                                                        throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Description copied from interface: RendererCapabilities

Returns the extent to which the Renderer supports adapting between supported formats that have different MIME types. Specified by:supportsMixedMimeTypeAdaptation in interface RendererCapabilitiesReturns:The RendererCapabilities.AdaptiveSupport for adapting between supported formats that have different MIME types.Throws:ExoPlaybackException - If an error occurs.

- 

setListener

public final void setListener​([RendererCapabilities.Listener](RendererCapabilities.Listener.html "interface in com.google.android.exoplayer2")listener)

Deprecated.

Description copied from interface: RendererCapabilities

Sets the RendererCapabilities.Listener. Specified by:setListener in interface RendererCapabilitiesParameters:listener - The listener to be set.

- 

clearListener

public final void clearListener()

Deprecated.

Description copied from interface: RendererCapabilities

Clears the RendererCapabilities.Listener. Specified by:clearListener in interface RendererCapabilities

- 

handleMessage

public void handleMessage​(@com.google.android.exoplayer2.Renderer.MessageType int messageType,
                          @Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")message)
                   throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Description copied from interface: PlayerMessage.Target

Handles a message delivered to the target. Specified by:handleMessage in interface PlayerMessage.TargetParameters:messageType - The message type.message - The message payload.Throws:ExoPlaybackException - If an error occurred whilst handling the message. Should only be thrown by targets that handle messages on the playback thread.

- 

onEnabled

protected void onEnabled​(boolean joining,
                         boolean mayRenderStartOfStream)
                  throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Called when the renderer is enabled.

The default implementation is a no-op.

Parameters:joining - Whether this renderer is being enabled to join an ongoing playback.mayRenderStartOfStream - Whether this renderer is allowed to render the start of the stream even if the state is not Renderer.STATE_STARTED yet.Throws:ExoPlaybackException - If an error occurs.

- 

onStreamChanged

protected void onStreamChanged​([Format](Format.html "class in com.google.android.exoplayer2")[] formats,
                               long startPositionUs,
                               long offsetUs)
                        throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Called when the renderer's stream has changed. This occurs when the renderer is enabled after onEnabled(boolean, boolean) has been called, and also when the stream has been replaced whilst the renderer is enabled or started.

The default implementation is a no-op.

Parameters:formats - The enabled formats.startPositionUs - The start position of the new stream in renderer time (microseconds).offsetUs - The offset that will be added to the timestamps of buffers read via readSource(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, @com.google.android.exoplayer2.source.SampleStream.ReadFlags int) so that decoder input buffers have monotonically increasing timestamps.Throws:ExoPlaybackException - If an error occurs.

- 

onPositionReset

protected void onPositionReset​(long positionUs,
                               boolean joining)
                        throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Called when the position is reset. This occurs when the renderer is enabled after onStreamChanged(Format[], long, long) has been called, and also when a position discontinuity is encountered.

After a position reset, the renderer's SampleStream is guaranteed to provide samples starting from a key frame.

The default implementation is a no-op.

Parameters:positionUs - The new playback position in microseconds.joining - Whether this renderer is being enabled to join an ongoing playback.Throws:ExoPlaybackException - If an error occurs.

- 

onStarted

protected void onStarted()
                  throws[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")

Deprecated.

Called when the renderer is started.

The default implementation is a no-op.

Throws:ExoPlaybackException - If an error occurs.

- 

onStopped

protected void onStopped()

Deprecated.

Called when the renderer is stopped.

The default implementation is a no-op.

- 

onDisabled

protected void onDisabled()

Deprecated.

Called when the renderer is disabled.

The default implementation is a no-op.

- 

onReset

protected void onReset()

Deprecated.

Called when the renderer is reset.

The default implementation is a no-op.

- 

onRelease

protected void onRelease()

Deprecated.

Called when the renderer is released.

The default implementation is a no-op.

- 

getLastResetPositionUs

protected final long getLastResetPositionUs()

Deprecated.

Returns the position passed to the most recent call to enable(com.google.android.exoplayer2.RendererConfiguration, com.google.android.exoplayer2.Format[], com.google.android.exoplayer2.source.SampleStream, long, boolean, boolean, long, long) or resetPosition(long).

- 

getFormatHolder

protected final[FormatHolder](FormatHolder.html "class in com.google.android.exoplayer2")getFormatHolder()

Deprecated.

Returns a clear FormatHolder.

- 

getStreamFormats

protected final[Format](Format.html "class in com.google.android.exoplayer2")[] getStreamFormats()

Deprecated.

Returns the formats of the currently enabled stream.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

- 

getConfiguration

protected final[RendererConfiguration](RendererConfiguration.html "class in com.google.android.exoplayer2")getConfiguration()

Deprecated.

Returns the configuration set when the renderer was most recently enabled.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

- 

getIndex

protected final int getIndex()

Deprecated.

Returns the index of the renderer within the player.

Must only be used after the renderer has been initialized by the player.

- 

getPlayerId

protected final[PlayerId](analytics/PlayerId.html "class in com.google.android.exoplayer2.analytics")getPlayerId()

Deprecated.

Returns the PlayerId of the player using this renderer.

Must only be used after the renderer has been initialized by the player.

- 

createRendererException

protected final[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createRendererException​([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,
                                                             @Nullable[Format](Format.html "class in com.google.android.exoplayer2")format,[@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)

Deprecated.

Creates an ExoPlaybackException of type ExoPlaybackException.TYPE_RENDERER for this renderer. Parameters:cause - The cause of the exception.format - The current format used by the renderer. May be null.errorCode - A PlaybackException.ErrorCode to identify the cause of the playback failure.Returns:The created instance, in which ExoPlaybackException.isRecoverable is false.

- 

createRendererException

protected final[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createRendererException​([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,
                                                             @Nullable[Format](Format.html "class in com.google.android.exoplayer2")format,
                                                             boolean isRecoverable,[@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)

Deprecated.

Creates an ExoPlaybackException of type ExoPlaybackException.TYPE_RENDERER for this renderer. Parameters:cause - The cause of the exception.format - The current format used by the renderer. May be null.isRecoverable - If the error is recoverable by disabling and re-enabling the renderer.errorCode - A PlaybackException.ErrorCode to identify the cause of the playback failure.Returns:The created instance.

- 

readSource

protected final @com.google.android.exoplayer2.source.SampleStream.ReadDataResult int readSource​([FormatHolder](FormatHolder.html "class in com.google.android.exoplayer2")formatHolder,[DecoderInputBuffer](decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")buffer,
                                                                                                 @com.google.android.exoplayer2.source.SampleStream.ReadFlags int readFlags)

Deprecated.

Reads from the enabled upstream source. If the upstream source has been read to the end then C.RESULT_BUFFER_READ is only returned if setCurrentStreamFinal() has been called. C.RESULT_NOTHING_READ is returned otherwise.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Parameters:formatHolder - A FormatHolder to populate in the case of reading a format.buffer - A DecoderInputBuffer to populate in the case of reading a sample or the end of the stream. If the end of the stream has been reached, the C.BUFFER_FLAG_END_OF_STREAM flag will be set on the buffer.readFlags - Flags controlling the behavior of this read operation.Returns:The result of the read operation.Throws:DecoderInputBuffer.InsufficientCapacityException - If the buffer has insufficient capacity to hold the data of a sample being read. The buffer timestamp and flags are populated if this exception is thrown, but the read position is not advanced.

- 

skipSource

protected int skipSource​(long positionUs)

Deprecated.

Attempts to skip to the keyframe before the specified position, or to the end of the stream if positionUs is beyond it.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

Parameters:positionUs - The position in microseconds.Returns:The number of samples that were skipped.

- 

isSourceReady

protected final boolean isSourceReady()

Deprecated.

Returns whether the upstream source is ready.

This method may be called when the renderer is in the following states: Renderer.STATE_ENABLED, Renderer.STATE_STARTED.

- 

onRendererCapabilitiesChanged

protected final void onRendererCapabilitiesChanged()

Deprecated.

Called when the renderer capabilities are changed.