Package 

Class CodecOutputSurface

  • All Implemented Interfaces:
    android.graphics.SurfaceTexture.OnFrameAvailableListener

    
    public final class CodecOutputSurface
     implements SurfaceTexture.OnFrameAvailableListener
                        

    Holds state associated with a Surface used for MediaCodec decoder output.

    The constructor for this class will prepare GL, create a SurfaceTexture, and then create a Surface for that SurfaceTexture. The Surface can be passed to MediaCodec.configure() to receive decoder output. When a frame arrives, we latch the texture with updateTexImage(), then render the texture with GL to a pbuffer.

    By default, the Surface will be using a BufferQueue in asynchronous mode, so we can potentially drop frames.