Package com.castlabs.android.player
Class AbstractVideoRendererListener
- java.lang.Object
-
- com.castlabs.android.player.AbstractVideoRendererListener
-
- All Implemented Interfaces:
VideoRendererListener
public abstract class AbstractVideoRendererListener extends Object implements VideoRendererListener
Abstract implementation of theVideoRendererListener- Since:
- 4.2.4
-
-
Constructor Summary
Constructors Constructor Description AbstractVideoRendererListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonDroppedFrames(int count, long elapsedMs)Called to report the number of frames dropped by the renderer.voidonRenderedFirstFrame(Surface surface)Called when a frame is rendered for the first time since setting the surface, and when a frame is rendered for the first time since the renderer was reset.voidonVideoDecoderInitialized(String decoderName, long initializedTimestampMs, long initializationDurationMs)Called when a decoder is created.voidonVideoDisabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)Called when the renderer is disabled.voidonVideoEnabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)Called when the renderer is enabled.voidonVideoInputFormatChanged(com.google.android.exoplayer2.Format format)Called when the format of the media being consumed by the renderer changes.
-
-
-
Method Detail
-
onVideoEnabled
public void onVideoEnabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)
Description copied from interface:VideoRendererListenerCalled when the renderer is enabled.- Specified by:
onVideoEnabledin interfaceVideoRendererListener- Parameters:
counters-DecoderCountersthat will be updated by the renderer for as long as it remains enabled.
-
onVideoDecoderInitialized
public void onVideoDecoderInitialized(String decoderName, long initializedTimestampMs, long initializationDurationMs)
Description copied from interface:VideoRendererListenerCalled when a decoder is created.- Specified by:
onVideoDecoderInitializedin interfaceVideoRendererListener- Parameters:
decoderName- The decoder that was created.initializedTimestampMs-SystemClock.elapsedRealtime()when initialization finished.initializationDurationMs- The time taken to initialize the decoder in milliseconds.
-
onVideoInputFormatChanged
public void onVideoInputFormatChanged(com.google.android.exoplayer2.Format format)
Description copied from interface:VideoRendererListenerCalled when the format of the media being consumed by the renderer changes.- Specified by:
onVideoInputFormatChangedin interfaceVideoRendererListener- Parameters:
format- The new format.
-
onDroppedFrames
public void onDroppedFrames(int count, long elapsedMs)Description copied from interface:VideoRendererListenerCalled to report the number of frames dropped by the renderer. Dropped frames are reported whenever the renderer is stopped having dropped frames, and optionally, whenever the count reaches a specified threshold whilst the renderer is started.- Specified by:
onDroppedFramesin interfaceVideoRendererListener- Parameters:
count- The number of dropped frames.elapsedMs- The duration in milliseconds over which the frames were dropped. This duration is timed from when the renderer was started or from when dropped frames were last reported (whichever was more recent), and not from when the first of the reported drops occurred.
-
onRenderedFirstFrame
public void onRenderedFirstFrame(Surface surface)
Description copied from interface:VideoRendererListenerCalled when a frame is rendered for the first time since setting the surface, and when a frame is rendered for the first time since the renderer was reset.- Specified by:
onRenderedFirstFramein interfaceVideoRendererListener- Parameters:
surface- TheSurfaceto which a first frame has been rendered, ornullif the renderer renders to something that isn't aSurface.
-
onVideoDisabled
public void onVideoDisabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)
Description copied from interface:VideoRendererListenerCalled when the renderer is disabled.- Specified by:
onVideoDisabledin interfaceVideoRendererListener- Parameters:
counters-DecoderCountersthat were updated by the renderer.
-
-