Class PlayerTextureHelper

java.lang.Object
io.agora.mediaplayer.gl.PlayerTextureHelper
All Implemented Interfaces:
IPlayerTextureHelper

public class PlayerTextureHelper extends Object implements IPlayerTextureHelper
  • Field Details

    • IDENTITY_MATRIX

      public static final float[] IDENTITY_MATRIX
  • Method Details

    • create

      public static PlayerTextureHelper create()
      Construct a new SurfaceTextureHelperTest sharing OpenGL resources with |sharedContext|. A dedicated thread and handler is created for handling the SurfaceTexture. May return null if EGL fails to initialize a pixel buffer surface and make it current.
    • onFrameAvailable

      public void onFrameAvailable(SurfaceTexture surfaceTexture)
    • getEglContextHandler

      public long getEglContextHandler()
      Specified by:
      getEglContextHandler in interface IPlayerTextureHelper
    • getRenderGlSurface

      public Surface getRenderGlSurface()
      Specified by:
      getRenderGlSurface in interface IPlayerTextureHelper
    • setTextureSize

      public void setTextureSize(int width, int height)
      Specified by:
      setTextureSize in interface IPlayerTextureHelper
    • dispose

      public void dispose()
      Call disconnect() to stop receiving frames. OpenGL resources are released and the handler is stopped when the texture frame has been released. You are guaranteed to not receive any more onFrame() after this function returns.
      Specified by:
      dispose in interface IPlayerTextureHelper
    • getAvailableTextureInfo

      public VideoFrame getAvailableTextureInfo(int waitTime)
      wait for most waitTime time;
      Specified by:
      getAvailableTextureInfo in interface IPlayerTextureHelper
    • getFakeTextureInfo

      public VideoFrame getFakeTextureInfo()
      Specified by:
      getFakeTextureInfo in interface IPlayerTextureHelper
    • releaseRenderedTextureInfo

      public void releaseRenderedTextureInfo(VideoFrame info)
      Specified by:
      releaseRenderedTextureInfo in interface IPlayerTextureHelper
    • resetTextureBufferQueue

      public void resetTextureBufferQueue()
      Specified by:
      resetTextureBufferQueue in interface IPlayerTextureHelper
    • textureCopy

      public VideoFrame.TextureBuffer textureCopy(VideoFrame.TextureBuffer textureBuffer)