腾讯云直播推流的回调通知。
V2TXLivePusher 的一些回调事件,包括推流器状态,推流音量,统计信息,警告以及错误信息。
◆ liteav::V2TXLivePusherObserver
class liteav::V2TXLivePusherObserver |
Public 成员函数 |
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) |
|
◆ ~V2TXLivePusherObserver()
◆ onCaptureFirstAudioFrame()
virtual void onCaptureFirstAudioFrame |
( |
| ) |
|
|
inlinevirtual |
◆ onCaptureFirstVideoFrame()
virtual void onCaptureFirstVideoFrame |
( |
| ) |
|
|
inlinevirtual |
◆ onError()
virtual void onError |
( |
int32_t |
code, |
|
|
const char * |
msg, |
|
|
void * |
extraInfo |
|
) |
| |
|
inlinevirtual |
直播推流器错误通知,推流器出现错误时,会回调该通知
- 参数
-
◆ onMicrophoneVolumeUpdate()
virtual void onMicrophoneVolumeUpdate |
( |
int32_t |
volume | ) |
|
|
inlinevirtual |
◆ onProcessVideoFrame()
◆ onPushStatusUpdate()
virtual void onPushStatusUpdate |
( |
V2TXLivePushStatus |
state, |
|
|
const char * |
msg, |
|
|
void * |
extraInfo |
|
) |
| |
|
inlinevirtual |
◆ onRenderVideoFrame()
◆ onScreenCaptureStarted()
virtual void onScreenCaptureStarted |
( |
| ) |
|
|
inlinevirtual |
◆ onScreenCaptureStoped()
virtual void onScreenCaptureStoped |
( |
int |
reason | ) |
|
|
inlinevirtual |
当屏幕分享停止时,SDK 会通过此回调通知
- 参数
-
reason | 停止原因
- 0:表示用户主动停止;
- 1:表示屏幕分享窗口被关闭;
- 2:表示屏幕分享的显示屏状态变更(如接口被拔出、投影模式变更等)
|
◆ onSnapshotComplete()
virtual void onSnapshotComplete |
( |
const char * |
image, |
|
|
int |
length, |
|
|
int |
width, |
|
|
int |
height, |
|
|
V2TXLivePixelFormat |
format |
|
) |
| |
|
inlinevirtual |
截图回调
- 注意
- 调用 snapshot 截图之后,会收到这个回调通知
- 参数
-
image | 已截取的视频画面 |
length | 截图数据长度,对于BGRA32而言,length = width * height * 4 |
width | 截图画面的宽度 |
height | 截图画面的高度 |
format | 截图数据格式,目前只支持 V2TXLivePixelFormatBGRA32 |
◆ onStatisticsUpdate()
◆ onWarning()
virtual void onWarning |
( |
int32_t |
code, |
|
|
const char * |
msg, |
|
|
void * |
extraInfo |
|
) |
| |
|
inlinevirtual |
◆ MODULE_CPP_V2TXLIVEPUSHEROBSERVER_H_
#define MODULE_CPP_V2TXLIVEPUSHEROBSERVER_H_ |