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.
V2TXLivePlayerObserver

Namespaces

 liteav
 

Data Structures

class  V2TXLivePlayerObserver
 

Detailed Description

Tencent Cloud live player callback notification
Some V2TXLivePlayer callback notifications can be received, including the player status, playback volume callback, audio/video first-frame callback, statistics, warning, and error messages.


Data Structure Documentation

◆ liteav::V2TXLivePlayerObserver

class liteav::V2TXLivePlayerObserver

Public Member Functions

virtual ~V2TXLivePlayerObserver ()
 
virtual void onError (V2TXLivePlayer *player, int32_t code, const char *msg, void *extraInfo)
 
virtual void onWarning (V2TXLivePlayer *player, int32_t code, const char *msg, void *extraInfo)
 
virtual void onConnected (V2TXLivePlayer *player, void *extraInfo)
 
virtual void onVideoPlaying (V2TXLivePlayer *player, bool firstPlay, void *extraInfo)
 
virtual void onAudioPlaying (V2TXLivePlayer *player, bool firstPlay, void *extraInfo)
 
virtual void onVideoLoading (V2TXLivePlayer *player, void *extraInfo)
 
virtual void onAudioLoading (V2TXLivePlayer *player, void *extraInfo)
 
virtual void onPlayoutVolumeUpdate (V2TXLivePlayer *player, int32_t volume)
 
virtual void onStatisticsUpdate (V2TXLivePlayer *player, V2TXLivePlayerStatistics statistics)
 
virtual void onSnapshotComplete (V2TXLivePlayer *player, const char *image, int length, int width, int height, V2TXLivePixelFormat format)
 
virtual void onRenderVideoFrame (V2TXLivePlayer *player, const V2TXLiveVideoFrame *videoFrame)
 
virtual void onReceiveSeiMessage (V2TXLivePlayer *player, int payloadType, const uint8_t *data, uint32_t dataSize)
 

Constructor & Destructor Documentation

◆ ~V2TXLivePlayerObserver()

virtual ~V2TXLivePlayerObserver ( )
inlinevirtual

Member Function Documentation

◆ onAudioLoading()

virtual void onAudioLoading ( V2TXLivePlayer player,
void *  extraInfo 
)
inlinevirtual

Audio loading event

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onAudioPlaying()

virtual void onAudioPlaying ( V2TXLivePlayer player,
bool  firstPlay,
void *  extraInfo 
)
inlinevirtual

Audio playback event

Parameters
playerPlayer object that calls back this notification
firstPlayPlay for the first time
extraInfoExtended information

◆ onConnected()

virtual void onConnected ( V2TXLivePlayer player,
void *  extraInfo 
)
inlinevirtual

live player has successfully connected to the server notification

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onError()

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

live player error notification, which is called back when the player encounters an error

Parameters
playerPlayer object that calls back this notification
codeError code V2TXLiveCode
msgError message
extraInfoExtended information

◆ onPlayoutVolumeUpdate()

virtual void onPlayoutVolumeUpdate ( V2TXLivePlayer player,
int32_t  volume 
)
inlinevirtual

Player playback volume callback.

Attention
This callback notification is received after V2TXLivePlayer#enableVolumeEvaluation(int) is called to enable playback volume display.
Parameters
playerPlayer object that calls back this notification
volumeCurrent playback volume

◆ onReceiveSeiMessage()

virtual void onReceiveSeiMessage ( V2TXLivePlayer player,
int  payloadType,
const uint8_t *  data,
uint32_t  dataSize 
)
inlinevirtual

Callback of receiving an SEI message. The sender calls sendSeiMessage in V2TXLivePusher to send an SEI message.

Attention
You will receive this callback after calling enableReceiveSeiMessage in V2TXLivePlayer to enable the receiving of SEI messages.
Parameters
playerPlayer object that calls back this notification
payloadTypeThe payload type of the received sei message
datasei message data
dataSizesei message data size

◆ onRenderVideoFrame()

virtual void onRenderVideoFrame ( V2TXLivePlayer player,
const V2TXLiveVideoFrame videoFrame 
)
inlinevirtual

Custom video rendering callback

Attention
Need you call V2TXLivePlayer::enableObserveVideoFrame:pixelFormat:bufferType: "enableObserveVideoFrame" to turn on the callback switch.
Parameters
playerPlayer object that calls back this notification
videoFrameVideo frame data V2TXLiveVideoFrame

◆ onSnapshotComplete()

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

Screenshot callback

Attention
This callback notification is received after snapshot is called to snapshot.
Parameters
playerPlayer object that calls back this notification
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 ( V2TXLivePlayer player,
V2TXLivePlayerStatistics  statistics 
)
inlinevirtual

Live player statistics callback.

Parameters
playerPlayer object that calls back this notification
statisticsPlayer statistics V2TXLivePlayerStatistics

◆ onVideoLoading()

virtual void onVideoLoading ( V2TXLivePlayer player,
void *  extraInfo 
)
inlinevirtual

Video loading event

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onVideoPlaying()

virtual void onVideoPlaying ( V2TXLivePlayer player,
bool  firstPlay,
void *  extraInfo 
)
inlinevirtual

Video playback event

Parameters
playerPlayer object that calls back this notification
firstPlayPlay for the first time
extraInfoExtended information

◆ onWarning()

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

live player warning notification

Parameters
playerPlayer object that calls back this notification
codeWarning code V2TXLiveCode
msgWarning message
extraInfoExtended information