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

Data Structures

protocol  <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-p

protocol V2TXLivePusherObserver-p
+ Inheritance diagram for <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:
 
(void) - onScreenCaptureStarted
 
(void) - onScreenCaptureStopped:
 

Method Documentation

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

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

◆ onGLContextDestroyed()

- (void) onGLContextDestroyed
optional

Callback of destroying the OpenGL context in the SDK

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

◆ 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
srcFrameFor images before processing
dstFrameFor images after processing

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

◆ onScreenCaptureStarted()

- (void) onScreenCaptureStarted
optional

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

◆ onScreenCaptureStopped:()

- (void) onScreenCaptureStopped: (int)  reason
optional

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.

◆ 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

◆ onSnapshotComplete:()

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

Screenshot callback

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

◆ onStatisticsUpdate:()

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

Live pusher statistics callback.

Parameters
statisticsPusher statistics V2TXLivePusherStatistics .

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