Overview
Callback notifications for live stream publishing
Features
You can use V2TXLivePusherObserver
to receive notifications about V2TXLivePusher, including publisher connection status, first audio/video frame, statistics, and warning and error messages.
Callback for error. This callback is triggered when the publisher encounters an error.
public void onError(int code, String msg, Bundle extraInfo)
Parameter | Type | Description |
---|---|---|
code | int | Error code |
msg | String | Error message |
extraInfo | Bundle | Extra information |
Callback for warning.
public void onWarning(int code, String msg, Bundle extraInfo)
Parameter | Type | Description |
---|---|---|
code | int | Warning code |
msg | String | Warning message |
extraInfo | Bundle | Extra information |
Callback of the publisher’s connection status.
public void onPushStatusUpdate(V2TXLivePushStatus status, String msg, Bundle extraInfo)
Parameter | Type | Description |
---|---|---|
status | V2TXLivePushStatus | Status code |
msg | String | Status message |
extraInfo | Bundle | Extra information |
V2TXLivePushStatus
enumerated valuesValue | Description |
---|---|
V2TXLivePushStatusDisconnected | Disconnected from the server |
V2TXLivePushStatusConnecting | Connecting to the server |
V2TXLivePushStatusConnectSuccess | Connected to the server |
V2TXLivePushStatusReconnecting | Reconnecting to the server |
Callback for a screenshot taken.
public void onSnapshotComplete(Bitmap image)
Parameter | Type | Description |
---|---|---|
image | Bitmap * | The video image captured |
Callback for custom video processing.
Note:You will receive this callback after you call
V2TXLivePusher#enableCustomVideoProcess(boolean, V2TXLiveDef.V2TXLivePixelFormat, V2TXLiveDef.V2TXLiveBufferType)
to enable custom video processing.
public void onProcessVideoFrame(V2TXLiveVideoFrame srcFrame, V2TXLiveVideoFrame dstFrame)
Parameter | Type | Description |
---|---|---|
srcFrame | V2TXLiveVideoFrame | Images before processing |
dstFrame | V2TXLiveVideoFrame | Images after processing |
Callback for a GL context for custom video processing being created.
public void onGLContextCreated()
Callback for a GL context for custom video processing being destroyed.
public void onGLContextDestroyed()
Callback for capturing the first video frame.
public void onCaptureFirstVideoFrame()
Callback for capturing the first audio frame.
public void onCaptureFirstAudioFrame()
Callback of mic capturing volume.
public void onMicrophoneVolumeUpdate(int volume)
Callback of publisher statistics.
public void onStatisticsUpdate(V2TXLivePusherStatistics statistics)
Parameter | Type | Description |
---|---|---|
statistics | V2TXLivePusherStatistics | Publisher statistics |
Callback for setting On-Cloud MixTranscoding parameters.
Note:You will receive this callback after you call
V2TXLivePusher#setMixTranscodingConfig(V2TXLiveDef.V2TXLiveTranscodingConfig)
to set On-Cloud MixTranscoding parameters.
public void onSetMixTranscodingConfig(int code, String msg)
Parameter | Type | Description |
---|---|---|
code | int | 0 : successful; other values: failed |
msg | String | Error message |
문제 해결에 도움이 되었나요?