MeiCam SDK For Android  3.15.3
Public Member Functions | List of all members
com.meicam.sdk.NvsCustomVideoFx.RenderHelper Interface Reference

Auxiliary method interface for custom video effects. More...

Public Member Functions

int allocateRGBATexture (int texWidth, int texHeight)
 Users of custom video effects call this method to apply for an RGBA texture. More...
 
void reclaimTexture (int texId)
 Users of custom video effects call this method to reclaim a previously allocated texture. More...
 
boolean uploadHostBufferToOpenGLTexture (ByteBuffer buffer, NvsVideoFrameInfo bufferInfo, int texId)
 Users which using custom video effects call this method to upload a Host buffer to the OpenGL texture. More...
 

Detailed Description

Auxiliary method interface for custom video effects.

Member Function Documentation

◆ allocateRGBATexture()

int com.meicam.sdk.NvsCustomVideoFx.RenderHelper.allocateRGBATexture ( int  texWidth,
int  texHeight 
)

Users of custom video effects call this method to apply for an RGBA texture.

Note: The texture requested by this method must be recycled by calling reclaimTexture, otherwise there will be a memory leak!

Parameters
texWidthThe width of the requested texture.
texHeightThe height of the requested texture.
Returns
Returns the texture ID of the application, and returning 0 indicates that the request fails.

◆ reclaimTexture()

void com.meicam.sdk.NvsCustomVideoFx.RenderHelper.reclaimTexture ( int  texId)

Users of custom video effects call this method to reclaim a previously allocated texture.

Parameters
texIdthe texture ID to release.

◆ uploadHostBufferToOpenGLTexture()

boolean com.meicam.sdk.NvsCustomVideoFx.RenderHelper.uploadHostBufferToOpenGLTexture ( ByteBuffer  buffer,
NvsVideoFrameInfo  bufferInfo,
int  texId 
)

Users which using custom video effects call this method to upload a Host buffer to the OpenGL texture.

Parameters
hostBufferHost buffer uploading
texIdThe texture ID of uploading.

The documentation for this interface was generated from the following file: