tencent cloud

User Generated Short Video SDK

Android

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 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();
}



도움말 및 지원

문제 해결에 도움이 되었나요?

피드백