Live pusher callback notification.
Some V2TXLivePusher callback notifications can be received, including the pusher status, volume callback, statistics, warnings, and error messages.
◆ V2TXLivePusherObserver
class V2TXLivePusherObserver |
◆ 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
-
code | Error code V2TXLiveCode. |
msg | Error message. |
extraInfo | Extended information. |
◆ onWarning:message:extraInfo()
- (void) onWarning: |
|
(V2TXLiveCode) |
code |
message: |
|
(NSString *) |
msg |
extraInfo: |
|
(NSDictionary *) |
extraInfo |
|
|
| |
|
optional |
Live pusher warning notification.
- Parameters
-
code | Warning code V2TXLiveCode. |
msg | Warning message. |
extraInfo | Extended 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
-
volume | Current 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
-
status | Pusher connection status V2TXLivePushStatus . |
msg | Connection status message. |
extraInfo | Extended information. |
◆ onStatisticsUpdate()
Live pusher statistics callback.
- Parameters
-
◆ onSnapshotComplete()
- (void) onSnapshotComplete: |
|
(TXImage *) |
image |
|
|
optional |
Screenshot callback
- Attention
- This callback notification will be received after calling snapshot() .
- Parameters
-
image | Captured video image |
◆ onProcessVideoFrame:dstFrame()
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
-
code | 0: successful; other values: failed |
msg | Error message |