Data Structures | |
class | V2TXLivePusherObserver |
Live pusher callback notification.
Some V2TXLivePusher callback notifications can be received, including the pusher status, volume callback, statistics, warnings, and error messages.
class com::tencent::live2::V2TXLivePusherObserver |
Public Member Functions | |
void | onError (int code, String msg, Bundle extraInfo) |
void | onWarning (int code, String msg, Bundle extraInfo) |
void | onCaptureFirstAudioFrame () |
void | onCaptureFirstVideoFrame () |
void | onMicrophoneVolumeUpdate (int volume) |
void | onPushStatusUpdate (V2TXLivePushStatus status, String msg, Bundle extraInfo) |
void | onStatisticsUpdate (V2TXLivePusherStatistics statistics) |
void | onSnapshotComplete (Bitmap image) |
void | onGLContextCreated () |
int | onProcessVideoFrame (V2TXLiveVideoFrame srcFrame, V2TXLiveVideoFrame dstFrame) |
void | onGLContextDestroyed () |
void | onSetMixTranscodingConfig (int code, String msg) |
|
inline |
Callback notification indicating that collection of the first audio frame is complete.
|
inline |
Callback notification indicating that collection of the first video frame is complete.
|
inline |
Live pusher error notification, which is called back when the pusher encounters an error.
code | Error code V2TXLiveCode. |
msg | Error message. |
extraInfo | Extended information. |
|
inline |
Callback of created the OpenGL context in the SDK
|
inline |
Callback of destroying the OpenGL context in the SDK
|
inline |
Microphone-collected volume callback.
volume | Current volume value for collection. |
|
inline |
Custom video processing callback
Case 1: The beauty filter component generates new textures. If the beauty filter component you use generates a new texture frame (for the processed image) during image processing, please set dstFrame.textureId
to a new texture ID in the callback API.
@Override public void onGLContextCreated() { mFURenderer.onSurfaceCreated(); mFURenderer.setUseTexAsync(true); }
@Override public int onProcessVideoFrame(V2TXLiveVideoFrame srcFrame, V2TXLiveVideoFrame dstFrame) { dstFrame.texture.textureId = mFURenderer.onDrawFrameSingleInput( srcFrame.texture.textureId, srcFrame.width, srcFrame.height); return 0; }
@Override public void onGLContextDestroyed() { mFURenderer.onSurfaceDestroyed(); }
Case 2: The third-party beauty filter component doesn’t generate new textures. If the third-party beauty filter component you use does not generate new textures and you need to manually set an input texture and an output texture for the component, please consider the following scheme:
int onProcessVideoFrame(V2TXLiveVideoFrame srcFrame, V2TXLiveVideoFrame dstFrame) { thirdparty_process(srcFrame.texture.textureId, srcFrame.width, srcFrame.height, dstFrame.texture.textureId); return 0; }
srcFrame | For images before processing |
dstFrame | For images after processing |
|
inline |
Callback notification of the pusher connection status.
status | Pusher connection status V2TXLivePushStatus . |
msg | Connection status message. |
extraInfo | Extended information. |
|
inline |
Callback of setting On-Cloud MixTranscoding parameters, which corresponds to the V2TXLivePusher#setMixTranscodingConfig(V2TXLiveDef.V2TXLiveTranscodingConfig) API.
code | 0: successful; other values: failed |
msg | Error message |
|
inline |
Screenshot callback
image | Captured video image |
|
inline |
Live pusher statistics callback.
statistics | Pusher statistics V2TXLivePusherStatistics . |
|
inline |
Live pusher warning notification.
code | Warning code V2TXLiveCode. |
msg | Warning message. |
extraInfo | Extended information. |