美摄SDK For Android  3.15.3
Public 成员函数 | 所有成员列表
com.meicam.sdk.NvsCustomVideoFx.RenderHelper接口 参考

自定义视频特效的辅助方法接口 更多...

Public 成员函数

int allocateRGBATexture (int texWidth, int texHeight)
 自定义视频特效的用户调用此方法来申请一个RGBA纹理 更多...
 
void reclaimTexture (int texId)
 自定义视频特效的用户调用此方法来回收一个之前申请的纹理 更多...
 
boolean uploadHostBufferToOpenGLTexture (ByteBuffer buffer, NvsVideoFrameInfo bufferInfo, int texId)
 自定义视频特效的用户调用此方法来上传一个Host buffer 到 OpenGL的纹理上 更多...
 

详细描述

自定义视频特效的辅助方法接口

成员函数说明

◆ allocateRGBATexture()

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

自定义视频特效的用户调用此方法来申请一个RGBA纹理

注意:使用这个方法申请的纹理一定要调用reclaimTexture进行回收,否则会出现泄漏!

参数
texWidth申请纹理的宽度
texHeight申请纹理的高度
返回
返回申请到的纹理ID,返回0表示申请失败

◆ reclaimTexture()

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

自定义视频特效的用户调用此方法来回收一个之前申请的纹理

参数
texId要释放的纹理ID

◆ uploadHostBufferToOpenGLTexture()

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

自定义视频特效的用户调用此方法来上传一个Host buffer 到 OpenGL的纹理上

参数
buffer要上传的buffer
bufferInfo要上传的buffer info
texId要上传到纹理ID

该接口的文档由以下文件生成: