Package io.agora.mediaplayer.gl
Class PlayerTextureHelper
java.lang.Object
io.agora.mediaplayer.gl.PlayerTextureHelper
- All Implemented Interfaces:
IPlayerTextureHelper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerTextureHelpercreate()Construct a new SurfaceTextureHelperTest sharing OpenGL resources with |sharedContext|.voiddispose()Call disconnect() to stop receiving frames.VideoFramegetAvailableTextureInfo(int waitTime) wait for most waitTime time;longVideoFrameSurfacevoidonFrameAvailable(SurfaceTexture surfaceTexture) voidreleaseRenderedTextureInfo(VideoFrame info) voidvoidsetTextureSize(int width, int height) VideoFrame.TextureBuffertextureCopy(VideoFrame.TextureBuffer textureBuffer)
-
Field Details
-
IDENTITY_MATRIX
public static final float[] IDENTITY_MATRIX
-
-
Method Details
-
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:
getEglContextHandlerin interfaceIPlayerTextureHelper
-
getRenderGlSurface
public Surface getRenderGlSurface()- Specified by:
getRenderGlSurfacein interfaceIPlayerTextureHelper
-
setTextureSize
public void setTextureSize(int width, int height) - Specified by:
setTextureSizein interfaceIPlayerTextureHelper
-
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:
disposein interfaceIPlayerTextureHelper
-
getAvailableTextureInfo
public VideoFrame getAvailableTextureInfo(int waitTime) wait for most waitTime time;- Specified by:
getAvailableTextureInfoin interfaceIPlayerTextureHelper
-
getFakeTextureInfo
public VideoFrame getFakeTextureInfo()- Specified by:
getFakeTextureInfoin interfaceIPlayerTextureHelper
-
releaseRenderedTextureInfo
public void releaseRenderedTextureInfo(VideoFrame info) - Specified by:
releaseRenderedTextureInfoin interfaceIPlayerTextureHelper
-
resetTextureBufferQueue
public void resetTextureBufferQueue()- Specified by:
resetTextureBufferQueuein interfaceIPlayerTextureHelper
-
textureCopy
public VideoFrame.TextureBuffer textureCopy(VideoFrame.TextureBuffer textureBuffer)
-