tencent cloud

Last updated: 2025-04-01 17:14:09
Android
Last updated: 2025-04-01 17:14:09
If you want to use third-party beauty libraries to add video effects during recording and editing, you can implement this in the ​preprocessing callbacks for both recording and editing.

Shoot Preprocessing Callback

public interface VideoCustomProcessListener {
/**
* Call back in the OpenGL thread. You can further process the captured video image in the callback
* @param textureId Texture ID
* @param width Texture width
* @param height Texture height
* @return Texture ID returned to SDK. If no processing is required, simply return the texture ID passed in.
* Note: the texture type called back by the SDK is `GLES20.GL_TEXTURE_2D`, which must also be the texture type returned to the SDK by the API
*/
int onTextureCustomProcess(int textureId, int width, int height);


/**
* Call back in the OpenGL thread. You can release the created OpenGL resources in the callback
*/
void onTextureDestroyed();
}

Editing Preprocessing Callback

public interface TXVideoCustomProcessListener {
/**
* Call back in the OpenGL thread. You can further process the captured video image in the callback
*
* @param textureId Texture ID
* @param width Texture width
* @param height Texture height
* @return Texture ID returned to SDK. If no processing is required, simply return the texture ID passed in.
* <p>
* Note: the texture type called back by the SDK is `GLES20.GL_TEXTURE_2D`, which must also be the texture type returned to the SDK by the API
*/
int onTextureCustomProcess(int textureId, int width, int height, long timestamp);

/**
* Call back in the OpenGL thread. You can release the created OpenGL resources in the callback
*/
void onTextureDestroyed();
}


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback