Class TextureOverlay

  • Direct Known Subclasses:
    BitmapOverlay

    @Deprecated
    public abstract class TextureOverlay
    extends Object
    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.
    Creates overlays from OpenGL textures.
    • Constructor Detail

      • TextureOverlay

        public TextureOverlay()
        Deprecated.
    • Method Detail

      • getTextureId

        public abstract int getTextureId​(long presentationTimeUs)
                                  throws VideoFrameProcessingException
        Deprecated.
        Returns the overlay texture identifier displayed at the specified timestamp.
        Parameters:
        presentationTimeUs - The presentation timestamp of the current frame, in microseconds.
        Throws:
        VideoFrameProcessingException - If an error occurs while processing or drawing the frame.
      • getTextureSize

        public abstract Size getTextureSize​(long presentationTimeUs)
        Deprecated.
        Returns the pixel width and height of the overlay texture displayed at the specified timestamp.

        This method must be called after getTextureId(long).

        Parameters:
        presentationTimeUs - The presentation timestamp of the current frame, in microseconds.
      • configure

        public void configure​(Size videoSize)
        Deprecated.
        Set up resources for the overlay given the input video’s dimensions.

        This method will be called before drawing the first frame and before drawing subsequent frames with different input dimensions.

        Parameters:
        videoSize - The width and height of the input video, in pixels.
      • getOverlaySettings

        public OverlaySettings getOverlaySettings​(long presentationTimeUs)
        Deprecated.
        Returns the OverlaySettings controlling how the overlay is displayed at the specified timestamp.
        Parameters:
        presentationTimeUs - The presentation timestamp of the current frame, in microseconds.