LiteAVSDK
Tencent Cloud TRTC SDK, is a high availability components serving tens of thousands of enterprise customers, which is committed to helping you to minimize your research and development costs.
V2TXLivePusherObserver

Namespaces

 liteav
 

Data Structures

class  V2TXLivePusherObserver
 

Detailed Description

Live pusher callback notification.
Some V2TXLivePusher callback notifications can be received, including the pusher status, volume callback, statistics, warnings, and error messages.


Data Structure Documentation

◆ liteav::V2TXLivePusherObserver

class liteav::V2TXLivePusherObserver

Public Member Functions

virtual ~V2TXLivePusherObserver ()
 
virtual void onError (int32_t code, const char *msg, void *extraInfo)
 
virtual void onWarning (int32_t code, const char *msg, void *extraInfo)
 
virtual void onCaptureFirstAudioFrame ()
 
virtual void onCaptureFirstVideoFrame ()
 
virtual void onMicrophoneVolumeUpdate (int32_t volume)
 
virtual void onPushStatusUpdate (V2TXLivePushStatus state, const char *msg, void *extraInfo)
 
virtual void onStatisticsUpdate (V2TXLivePusherStatistics statistics)
 
virtual void onSnapshotComplete (const char *image, int length, int width, int height, V2TXLivePixelFormat format)
 
virtual void onRenderVideoFrame (const V2TXLiveVideoFrame *videoFrame)
 
virtual int onProcessVideoFrame (V2TXLiveVideoFrame *srcFrame, V2TXLiveVideoFrame *dstFrame)
 
virtual void onScreenCaptureStarted ()
 
virtual void onScreenCaptureStoped (int reason)
 

Constructor & Destructor Documentation

◆ ~V2TXLivePusherObserver()

virtual ~V2TXLivePusherObserver ( )
inlinevirtual

Member Function Documentation

◆ onCaptureFirstAudioFrame()

virtual void onCaptureFirstAudioFrame ( )
inlinevirtual

Callback notification indicating that collection of the first audio frame is complete.

◆ onCaptureFirstVideoFrame()

virtual void onCaptureFirstVideoFrame ( )
inlinevirtual

Callback notification indicating that collection of the first video frame is complete.

◆ onError()

virtual void onError ( int32_t  code,
const char *  msg,
void *  extraInfo 
)
inlinevirtual

Live pusher error notification, which is called back when the pusher encounters an error.

Parameters
codeError code V2TXLiveCode.
msgError message.
extraInfoExtended information.

◆ onMicrophoneVolumeUpdate()

virtual void onMicrophoneVolumeUpdate ( int32_t  volume)
inlinevirtual

Microphone-collected volume callback.

Attention
This callback notification is received after enableVolumeEvaluation is called.
Parameters
volumeCurrent volume value for collection.

◆ onProcessVideoFrame()

virtual int onProcessVideoFrame ( V2TXLiveVideoFrame srcFrame,
V2TXLiveVideoFrame dstFrame 
)
inlinevirtual

Callback of video data for custom pre-processing

Attention
You can call V2TXLivePusher#enableCustomVideoProcess to enable/disable custom video pre-processing. Only the YUV420 format is supported on Windows currently.
Parameters
srcFrameUsed to carry images captured by SDK via the camera
dstFrameUsed to receive video images processed by third-party beauty filters

◆ onPushStatusUpdate()

virtual void onPushStatusUpdate ( V2TXLivePushStatus  state,
const char *  msg,
void *  extraInfo 
)
inlinevirtual

Callback notification of the pusher connection status.

Parameters
statusPusher connection status V2TXLivePushStatus .
msgConnection status message.
extraInfoExtended information.

◆ onRenderVideoFrame()

virtual void onRenderVideoFrame ( const V2TXLiveVideoFrame videoFrame)
inlinevirtual

Custom video rendering callback

Attention
You will receive this callback after calling enableCustomVideoRender to enable local custom video rendering.
Parameters
videoFrameVideo frames to be renderedV2TXLiveVideoFrame

◆ onScreenCaptureStarted()

virtual void onScreenCaptureStarted ( )
inlinevirtual

The SDK returns this callback when you call startScreenCapture and other APIs to start screen sharing.

◆ onScreenCaptureStoped()

virtual void onScreenCaptureStoped ( int  reason)
inlinevirtual

The SDK returns this callback when you call stopScreenCapture to stop screen sharing.

Parameters
reasonReason. 0: the user stopped screen sharing; 1: screen sharing stopped because the shared window was closed.

◆ onSnapshotComplete()

virtual void onSnapshotComplete ( const char *  image,
int  length,
int  width,
int  height,
V2TXLivePixelFormat  format 
)
inlinevirtual

Screenshot callback

Attention
This callback notification will be received after calling V2TXLivePusher#snapshot() .
Parameters
imageScreenshot data. If it is nullptr, it indicates that the SDK failed to take the screenshot.
lengthScreenshot data length. In BGRA32 format, length = width * height * 4.
widthScreenshot width
heightScreenshot height
formatScreenshot data format. Only TRTCVideoPixelFormat_BGRA32 is supported now.

◆ onStatisticsUpdate()

virtual void onStatisticsUpdate ( V2TXLivePusherStatistics  statistics)
inlinevirtual

Live pusher statistics callback.

Parameters
statisticsPusher statistics V2TXLivePusherStatistics .

◆ onWarning()

virtual void onWarning ( int32_t  code,
const char *  msg,
void *  extraInfo 
)
inlinevirtual

Live pusher warning notification.

Parameters
codeWarning code V2TXLiveCode.
msgWarning message.
extraInfoExtended information.