LiteAVSDK
Tencent Cloud LVB 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

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

◆ V2TXLivePusherObserver

class V2TXLivePusherObserver

Instance Methods

(void) - onError:message:extraInfo
 
(void) - onWarning:message:extraInfo
 
(void) - onCaptureFirstAudioFrame
 
(void) - onCaptureFirstVideoFrame
 
(void) - onMicrophoneVolumeUpdate
 
(void) - onPushStatusUpdate:message:extraInfo
 
(void) - onStatisticsUpdate
 
(void) - onSnapshotComplete
 
(void) - onProcessVideoFrame:dstFrame
 
(void) - onGLContextDestroyed
 
(void) - onSetMixTranscodingConfig:message
 

Method Documentation

◆ onError:message:extraInfo()

- (void) onError: (V2TXLiveCode code
message: (NSString *)  msg
extraInfo: (NSDictionary *)  extraInfo 
optional

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

Parameters
codeError code V2TXLiveCode.
msgError message.
extraInfoExtended information.

◆ onWarning:message:extraInfo()

- (void) onWarning: (V2TXLiveCode code
message: (NSString *)  msg
extraInfo: (NSDictionary *)  extraInfo 
optional

Live pusher warning notification.

Parameters
codeWarning code V2TXLiveCode.
msgWarning message.
extraInfoExtended information.

◆ onCaptureFirstAudioFrame()

- (void) onCaptureFirstAudioFrame
optional

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

◆ onCaptureFirstVideoFrame()

- (void) onCaptureFirstVideoFrame
optional

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

◆ onMicrophoneVolumeUpdate()

- (void) onMicrophoneVolumeUpdate: (NSInteger)  volume
optional

Microphone-collected volume callback.

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

◆ onPushStatusUpdate:message:extraInfo()

- (void) onPushStatusUpdate: (V2TXLivePushStatus status
message: (NSString *)  msg
extraInfo: (NSDictionary *)  extraInfo 
optional

Callback notification of the pusher connection status.

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

◆ onStatisticsUpdate()

- (void) onStatisticsUpdate: (V2TXLivePusherStatistics *)  statistics
optional

Live pusher statistics callback.

Parameters
statisticsPusher statistics V2TXLivePusherStatistics .

◆ onSnapshotComplete()

- (void) onSnapshotComplete: (TXImage *)  image
optional

Screenshot callback

Attention
This callback notification will be received after calling snapshot() .
Parameters
imageCaptured video image

◆ onProcessVideoFrame:dstFrame()

- (void) onProcessVideoFrame: (V2TXLiveVideoFrame *_Nonnull)  srcFrame
dstFrame: (V2TXLiveVideoFrame *_Nonnull)  dstFrame 
optional

Custom video processing callback

Attention
You will receive this callback only after you call V2TXLivePusher::enableCustomVideoProcess:pixelFormat:bufferType: "enableCustomVideoProcess" to enable custom video processing. 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.
  • (void) onProcessVideoFrame:(V2TXLiveVideoFrame * _Nonnull)srcFrame dstFrame:(V2TXLiveVideoFrame * _Nonnull)dstFrame { GLuint dstTextureId = renderItemWithTexture(srcFrame.textureId, srcFrame.width, srcFrame.height); dstFrame.textureId = dstTextureId; return 0; } 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:
  • (void) onProcessVideoFrame:(V2TXLiveVideoFrame * _Nonnull)srcFrame dstFrame:(V2TXLiveVideoFrame * _Nonnull)dstFrame
      {
          thirdparty_process(srcFrame.textureId, srcFrame.width, srcFrame.height, dstFrame.textureId);
          return 0;
      }
    
Parameters
srcFrame
For images before processing
dstFrame
For images after processing

◆ onGLContextDestroyed()

- (void) onGLContextDestroyed
optional

Callback of destroying the OpenGL context in the SDK

◆ onSetMixTranscodingConfig:message()

- (void) onSetMixTranscodingConfig: (V2TXLiveCode code
message: (NSString *)  msg 
optional

Callback of setting On-Cloud MixTranscoding parameters, which corresponds to the setMixTranscodingConfig API.

Parameters
code0: successful; other values: failed
msgError message