Class CodecInputSurface

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

    @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1) 
    public class CodecInputSurface
     implements SurfaceTexture.OnFrameAvailableListener
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      CodecInputSurface(Surface surface) Creates a CodecInputSurface from a Surface.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • CodecInputSurface

        CodecInputSurface(Surface surface)
        Creates a CodecInputSurface from a Surface.
    • Method Detail

      • release

         void release()

        Discards all resources held by this class, notably the EGL context. Also releases the Surface that was passed to our constructor.

      • makeCurrent

         void makeCurrent()

        Makes our EGL context and surface current.

      • swapBuffers

         boolean swapBuffers()

        Calls eglSwapBuffers. Use this to "publish" the current frame.

      • setPresentationTime

        @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2) void setPresentationTime(long nsecs)

        Sends the presentation time stamp to EGL. Time is expressed in nanoseconds.