Interface GlShaderProgram

  • All Known Implementing Classes:
    BaseGlShaderProgram, SingleFrameGlShaderProgram

    public interface GlShaderProgram
    Deprecated. 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.
    Processes frames from one OpenGL 2D texture to another.

    The GlShaderProgram consumes input frames it accepts via queueInputFrame(GlTextureInfo, long) and surrenders each texture back to the caller via its listener once the texture's contents have been processed.

    The GlShaderProgram produces output frames asynchronously and notifies its owner when they are available via its listener. The GlShaderProgram instance's owner must surrender the texture back to the GlShaderProgram via releaseOutputFrame(GlTextureInfo) when it has finished processing it.

    GlShaderProgram implementations can choose to produce output frames before receiving input frames or process several input frames before producing an output frame. However, GlShaderProgram implementations cannot assume that they will receive more than one input frame at a time, so they must process each input frame they accept even if they cannot produce output yet.

    The methods in this interface must be called on the thread that owns the parent OpenGL context. If the implementation uses another OpenGL context, e.g., on another thread, it must configure it to share data with the context of thread the interface methods are called on.