Class VideoTrackListener

  • All Implemented Interfaces:
    MediaTrackEventListener, com.google.android.exoplayer2.video.VideoRendererEventListener

    public class VideoTrackListener
    extends Object
    implements com.google.android.exoplayer2.video.VideoRendererEventListener, MediaTrackEventListener
    This is an implementation of the VideoRendererEventListener that is used to delegate events from the track renderer to the PlayerListener instances that are registered with the current PlayerController.
    Since:
    3.0.0
    • Constructor Detail

      • VideoTrackListener

        public VideoTrackListener​(@NonNull
                                  PlayerListeners playerListeners)
    • Method Detail

      • onVideoEnabled

        public void onVideoEnabled​(com.google.android.exoplayer2.decoder.DecoderCounters counters)
        Specified by:
        onVideoEnabled in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onVideoDecoderInitialized

        public void onVideoDecoderInitialized​(String decoderName,
                                              long initializedTimestampMs,
                                              long initializationDurationMs)
        Specified by:
        onVideoDecoderInitialized in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onDroppedFrames

        public void onDroppedFrames​(int count,
                                    long elapsed)
        Specified by:
        onDroppedFrames in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onVideoSizeChanged

        public void onVideoSizeChanged​(int width,
                                       int height,
                                       int unappliedRotationDegrees,
                                       float pixelWidthHeightRatio)
        Specified by:
        onVideoSizeChanged in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onRenderedFirstFrame

        public void onRenderedFirstFrame​(Surface surface)
        Specified by:
        onRenderedFirstFrame in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onVideoInputFormatChanged

        public void onVideoInputFormatChanged​(com.google.android.exoplayer2.Format format)
        Specified by:
        onVideoInputFormatChanged in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onVideoDisabled

        public void onVideoDisabled​(com.google.android.exoplayer2.decoder.DecoderCounters counters)
        Specified by:
        onVideoDisabled in interface com.google.android.exoplayer2.video.VideoRendererEventListener
      • onDecoderInitializationError

        public void onDecoderInitializationError​(@NonNull
                                                 com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException e)
        Description copied from interface: MediaTrackEventListener
        Invoked when a decoder fails to initialize.
        Specified by:
        onDecoderInitializationError in interface MediaTrackEventListener
        Parameters:
        e - The corresponding exception.