public member functions | Function Name |
---|---|
virtual void | onJoinRoomSuccess(const char* roomId, const char* uid, int elapsed) = 0 |
virtual void | onLeaveRoom() = 0 |
virtual void | onPlayVolumeIndication(const AudioVolumeInfo* speakers, int speakerCount, int totalVolume) = 0 |
virtual void | onInputVolume(unsigned volume) = 0 |
virtual void | onOutputVolume(unsigned volume) = 0 |
virtual void | onBizAuthResult(bool bPublish, AUTH_RESULT result) = 0 |
virtual void | onSdkAuthResult(AUTH_RESULT result) = 0 |
virtual void | onTokenWillExpire(const char* token) = 0 |
virtual void | onTokenRequest() = 0 |
virtual void | onUserBanned(bool status) = 0 |
virtual void | onNetworkQuality(const char* uid, NetworkQuality txQuality, NetworkQuality rxQuality) = 0 |
virtual void | onFirstLocalVideoFrameSent(int elapsed) = 0 |
virtual void | onFirstLocalAudioFrameSent(int elapsed) = 0 |
virtual void | onRemoteAudioStopped(const char* uid, bool stop) = 0 |
virtual void | onConnectionStatus(ThunderConnectionStatus status) = 0 |
virtual void | onConnectionLost() = 0 |
virtual void | onRemoteVideoStopped(const char* uid, bool stop) = 0 |
virtual void | onVideoSizeChanged(const char* uid, int width, int height, int rotation) = 0 |
virtual void | onRemoteVideoPlay(const char* uid, int width, int height, int elapsed) = 0 |
virtual void | onNetworkTypeChanged(ThunderNetworkType type) = 0 |
virtual void | onAudioCaptureStatus(ThunderAudioDeviceStatus type) = 0 |
virtual void | onPublishStreamToCDNStatus(const char* url, ThunderPublishCDNErrorCode errorCode) = 0 |
virtual void | onRoomStats(RoomStats stats) = 0 |
virtual void | onRecvUserAppMsgData(const char* uid, const char* msgData) = 0 |
virtual void | onSendAppMsgDataFailedStatus(int status) = 0 |
virtual void | onVideoCaptureStatus(int status) = 0 |
virtual void | onLocalVideoStats(const LocalVideoStats stats) = 0 |
virtual void | onLocalAudioStats(const LocalAudioStats stats) = 0 |
virtual void | onRemoteVideoStatsOfUid(const char* uid, const RemoteVideoStats stats) = 0 |
virtual void | onRemoteAudioStatsOfUid(const char* uid, const RemoteAudioStats stats) = 0 |
virtual void | onRemoteAudioPlay(const char* uid, int elapsed) |
virtual void | onLocalAudioStatusChanged(LOCAL_AUDIO_STREAM_STATUS status, LOCAL_AUDIO_STREAM_ERROR_REASON errorReason) |
virtual void | onLocalVideoStatusChanged(LOCAL_VIDEO_STREAM_STATUS status, LOCAL_VIDEO_STREAM_ERROR_REASON error) |
virtual void | onRemoteAudioStateChangedOfUid(const char* uid, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_REASON reason, int elapsed) |
virtual void | onRemoteVideoStateChangedOfUid(const char* uid, REMOTE_VIDEO_STATE state, REMOTE_VIDEO_REASON reason, int elapsed) |
virtual void | onDeviceStats(const DeviceStats& stats) |
virtual void | onCaptureVolumeIndication(int totalVolume, int cpt, int micVolume) |
virtual void | onAudioDeviceVolumeChanged(int deviceType, int volume, bool muted) |
virtual void | onVideoDeviceStateChanged(const char* deviceId, MEDIA_DEVICE_TYPE deviceType, MEDIA_DEVICE_STATE_TYPE deviceState) |
virtual void | onHowlingDetectResult(bool bHowling) |
virtual void | onEchoDetectResult(bool bEcho) |
virtual void | onWarning |
public member functions | Function Name |
---|---|
virtual bool | onRecordAudioFrame(AudioFrame& audioFrame) = 0 |
virtual bool | onPlaybackAudioFrame(AudioFrame& audioFrame) = 0 |
virtual bool | onPlaybackAudioFrameBeforeMixing(char* uid, AudioFrame& audioFrame) = 0 |
public member functions | Function Name |
---|---|
virtual void | onAudioFileVolume(unsigned int volume, unsigned int currentMs, unsigned int totalMs) = 0 |
virtual void | onAudioFilePlayEnd() = 0 |
virtual void | onAudioFileStateChange(ThunderAudioFilePlayerEvent event, ThunderAudioFilePLayerErrorCode errorCode) |
public member functions | Function Name |
---|---|
virtual bool | onPreviewVideoFrame(VideoFrame& videoFrame) = 0 |
virtual bool | onRenderVideoFrame(const char* uid, VideoFrame& videoFrame) = 0 |
public member functions | Function Name |
---|---|
virtual bool | onCaptureVideoFrame(VideoFrame& videoFrame) = 0 |
public member functions | Function Name |
---|---|
virtual void | onSendMediaExtraInfoFailedStatus(int status) = 0 |
virtual void | onRecvMediaExtraInfo(const char* uid, const char* pData, int dataLen) = 0 |
virtual bool | onRecvMixAudioInfo(const char* uid, MixAudioInfoList& infos) = 0 |
virtual bool | onRecvMixVideoInfo(const char* uid, MixVideoInfoList& infos) = 0 |
virtual void Thunder::IThunderEventHandler::onJoinRoomSuccess(const char* roomName, const char* uid, int elapsed);
Called when a user joins a channel.
Note:
If you receive this callback after calling IThunderEngine::joinRoom means, connection to the server succeeds. In this case, you can call interfaces that are allowed only after entering room successfully.
Parameter | Type | Description |
---|---|---|
roomName | OUT | Room name |
uid | OUT | User ID |
elapsed | OUT | TTime elapsed from the user calling the IThunderEngine::joinRoom until the SDK triggers this callback, unit: ms |
virtual void Thunder::IThunderEventHandler::onLeaveRoom();
Called when a user leaves the channel.
Note:
This callback notifies that a user leaves the room if you the application calls leaveRoom.
virtual void Thunder::IThunderEventHandler::onPlayVolumeIndication(const AudioVolumeInfo* speakers, int speakerCount, int totalVolume);
Report which users are speaking, the speakers' volume.
Note:
Once setAudioVolumeIndication is enabled, this callback is triggered at the set interval, regardless of whether a user speaks or not.
Parameter | Type | Description |
---|---|---|
speakers | OUT | Speaker (array). For details, see AudioVolumeInfo. |
speakerCount | OUT | Total number of speakers. |
totalVolume | OUT | Total volume after audio mixing, range: [0-100] |
virtual void Thunder::IThunderEventHandler::onInputVolume(unsigned volume);
Reports the input volume for audition.
Note:
This callback is received if startInputDeviceTest is called. The call frequency is 120 ms.
Parameter | Type | Description |
---|---|---|
volume | OUT | Volume value [0-100] |
virtual void Thunder::IThunderEventHandler::onOutputVolume(unsigned volume);
Reports the input volume for audition.
Note:
This callback is received if startOutputDeviceTestis called. The call frequency is 150 ms.
Parameter | Type | Description |
---|---|---|
volume | OUT | Volume value [0-100] |
virtual void Thunder::IThunderEventHandler::onBizAuthResult(bool bPublish, AUTH_RESULT result);
Callback on service authentication results.
Note:
- For returned results to be authenticated by the service, Jocloud will transfer the authentication request to the service authentication server and pass through and return authentication results.
- This callback is received if service authentication is mandatory for services and there is media stream in the uplink.
Parameter | Type | Description |
---|---|---|
bPublish | OUT | true: publishing authentication false: playing authentication |
result | OUT | Authentication results 0: pass Other values: fail. |
virtual void Thunder::IThunderEventHandler::onSdkAuthResult(AUTH_RESULT result);
Callback of SDK authentication result.
Note:
- Reports authentication result if IThunderEngine::joinRoom is called and there is uplink and downlink media data.
Parameter | Type | Description |
---|---|---|
result | OUT | For details about the authentication result, see AUTH_RESULT |
virtual void Thunder::IThunderEventHandler::onTokenWillExpire(const char* token);
This callback is received if the user’s token is to expire.
Parameter | Type | Description |
---|---|---|
token | OUT | token expired |
virtual void Thunder::IThunderEventHandler::onTokenRequest();
This callback is received if the user’s token has expired.
virtual void Thunder::IThunderEventHandler::onUserBanned(bool status);
This callback is received if the user’s banning status has changed.
Parameter | Type | Description |
---|---|---|
status | OUT | true: banned; false: unbanned |
virtual void Thunder::IThunderEventHandler::onUserJoined(const char* uid, int elapsed);
Called when a user/anchor joins the room.
Note:
- This API is deprecated from V2.8.0.
- This callback is valid only in audio-only mode and will be triggered when other users enter the room where the local user has entered.
Parameter | Type | Description |
---|---|---|
uid | OUT | User ID |
elapsed | OUT | Time delay from the local user calling joinRoom until the SDK triggers this callback, uint: ms |
virtual void Thunder::IThunderEventHandler::onUserOffline(const char* uid, USER_OFFLINE_REASON_TYPE reason);
Callback when the user exits the current room.
Note:
- This API is deprecated from V2.8.0.
- This callback is valid only in audio-only mode and is returned when other users leave the room where the local user has entered.
Parameter | Type | Description |
---|---|---|
uid | OUT | User ID |
reason | OUT | Offline reason. For details, see USER_OFFLINE_REASON_TYPE. |
virtual void Thunder::IThunderEventHandler::onNetworkQuality(const char* uid, NetworkQuality txQuality, NetworkQuality rxQuality);
Reporting user network uplink/downlink quality.
Parameter | Type | Description |
---|---|---|
uid | OUT | User ID |
txQuality | OUT | Uplink network quality of this user. For details, see NetworkQuality. |
rxQuality | OUT | Downlink network quality of this user. For details, see NetworkQuality. |
virtual void Thunder::IThunderEventHandler::onFirstLocalVideoFrameSent(int elapsed);
Called when the first local video frame is sent.
Parameter | Type | Description |
---|---|---|
elapsed | OUT | Time elapsed (ms) from the local user calling the IThunderEngine::joinRoom until the SDK triggers this callback |
virtual void Thunder::IThunderEventHandler::onFirstLocalAudioFrameSent(int elapsed);
Called when the first local audio frame is sent.
Parameter | Type | Description |
---|---|---|
elapsed | OUT | Time elapsed (ms) from the local user calling the IThunderEngine::joinRoom until the SDK triggers this callback |
virtual void Thunder::IThunderEventHandler::onRemoteAudioStopped(const char* uid, bool stopped);
Callback on enabling/disabling remote user’s audio stream. This callback is received if IThunderEngine::joinRoom is called and status of existing and subsequent audio streams in the room changes.
Parameter | Type | Description |
---|---|---|
uid | OUT | Remote user ID |
mute | OUT | true: Audio streams disabled; false: Audio streams enabled |
virtual void Thunder::IThunderEventHandler::onConnectionStatus(ThunderConnectionStatus status);
Reporting status of connection with server network. This callback is received if IThunderEngine::joinRoom is called and SDK connection with server network changes.
Parameter | Type | Description |
---|---|---|
status | OUT | Network connection status. For details, see ThunderConnectionStatus. |
virtual void Thunder::IThunderEventHandler::onConnectionLost();
Callback on disconnection with server network. This callback is received if IThunderEngine::joinRoom is called and SDK connection with server network is interrupted.
virtual void Thunder::IThunderEventHandler::onRemoteVideoStopped(const char* uid, bool stopped);
Callback on stopping/starting remote user video streaming. This callback is received if IThunderEngine::joinRoom is called and status of existing and subsequent video streams in the room change.
Parameter | Type | Description |
---|---|---|
uid | OUT | Remote user Id |
mute | OUT | true: Video streams disabled; false: Video streams enabled |
virtual void Thunder::IThunderEventHandler::onVideoSizeChanged(const char* uid, int width, int height, int rotation);
Callback on change in local or remote video resolution. This callback is received if IThunderEngine::joinRoom is called and video resolution changes.
Parameter | Type | Description |
---|---|---|
uid | OUT | User ID |
width | OUT | Width |
height | OUT | High |
rotation | OUT | Reserved |
virtual void Thunder::IThunderEventHandler::onRemoteVideoPlay(const char* uid, int width, int height, int elapsed);
Callback on displayed first remote video frame. Used to calculate the video speed. This callback is received after setRemoteVideoCanvas is called and video streams are received and displayed in the window.
Parameter | Type | Description |
---|---|---|
uid | OUT | User id |
width | OUT | Width |
height | OUT | High |
elapsed | OUT | Time (ms) consumed from calling IThunderEngine::joinRoom to event callback |
virtual void Thunder::IThunderEventHandler::onNetworkTypeChanged(ThunderNetworkType type);
Callback on network status change. This callback is received if initialization (initialize) is complete and network type changes.
Parameter | Type | Description |
---|---|---|
type | OUT | Network connection type. For details, see ThunderNetworkType. |
virtual void Thunder::IThunderEventHandler::onAudioCaptureStatus(ThunderAudioDeviceStatus type);
Callback on changes in audio device capture status. Enable audio capture. When device for audio capture changes in status, this notification will be received.
Parameter | Type | Description |
---|---|---|
type | OUT | Collection status of the audio device. For details, see ThunderAudioDeviceStatus. |
virtual void Thunder::IThunderEventHandler::onPublishStreamToCDNStatus(const char* url, ThunderPublishCDNErrorCode errorCode);
Callback on CDN stream publishing result. This callback is received if the user has called addPublishOriginStreamUrl or addPublishTranscodingStreamUrl for stream publishing and the stream publishing status changes.
Parameter | Type | Description |
---|---|---|
url | OUT | URL for stream publishing |
errorCode | OUT | Error code for stream publishing. For details, see ThunderPublishCDNErrorCode. |
virtual void Thunder::IThunderEventHandler::onRoomStats(RoomStats stats);
Callback on uplink/downlink traffic (periodic callback at an interval of 2 seconds). This callback is received when the user enters a channel.
Parameter | Type | Description |
---|---|---|
stats | OUT | Specific status. For details, see RoomStats. |
virtual void Thunder::IThunderEventHandler::onRecvUserAppMsgData(const char* uid, const char* msgData);
Callback custom broadcast message of service This callback is received by users entering the channel if the anchor sends data through sendUserAppMsgData.
Parameter | Type | Description |
---|---|---|
uid | OUT | uid of the user that sends the message |
msgData | OUT | Received customized broadcast message |
virtual void Thunder::IThunderEventHandler::onSendAppMsgDataFailedStatus(ThunderSendAppMsgDataFailedStatus status);
This callback is received if the anchor fails to send data by calling sendUserAppMsgData.
Parameter | Type | Description |
---|---|---|
status | OUT | Causes for failure in sending customized broadcast messages. For details, see ThunderSendAppMsgDataFailedStatus. |
virtual void Thunder::IThunderEventHandler::onVideoCaptureStatus(ThunderCaptureStatus status);
Callback on changes in camera capture status. This callback is received when camera collection starts and the collection status of the camera changes.
Parameter | Type | Description |
---|---|---|
status | OUT | Camera collection status. For details, see ThunderCaptureStatus. |
virtual void Thunder::IThunderEventHandler::onLocalVideoStats(const LocalVideoStats stats);
The statistics of sending of video stream by local device is described during this callback. Callback time: 1. immediate callback when the publishing interface is called; 2. immediate callback on bracket change during the publishing; and 3. periodical callback at an interval of 2s.
Parameter | Type | Description |
---|---|---|
stats | OUT | Statistical data on local video. For details, see LocalVideoStats. |
virtual void Thunder::IThunderEventHandler::onLocalAudioStats(const LocalAudioStats stats);
The statistics of sending of video stream by local device is described during this callback. Callback time: periodical callback at an interval of 2s.
Parameter | Type | Description |
---|---|---|
stats | OUT | Statistical data on local audio. For details, see LocalAudioStats. |
virtual void Thunder::IThunderEventHandler::onRemoteVideoStatsOfUid(const char* uid, const RemoteVideoStats stats);
The end-to-end video stream status in calling of remote users is described during this callback, which is triggered once 2s for each remote user/anchor. In case multiple users/anchors exist remotely at the same time, this callback will be triggered multiple times every 2 seconds.
Parameter | Type | Description |
---|---|---|
uid | OUT | Id of remote user/anchor |
stats | OUT | Statistical data on remote video. For details, see RemoteVideoStats. |
virtual void Thunder::IThunderEventHandler::onRemoteAudioStatsOfUid(const char* uid, const RemoteAudioStats stats);
This callback describes end-to-end video streaming status of remote user during the call. It is triggered every 2s for each remote user/anchor. In case multiple users/anchors exist remotely at the same time, this callback will be triggered multiple times every 2 seconds.
Parameter | Type | Description |
---|---|---|
uid | OUT | Id of remote user/anchor |
stats | OUT | Statistical data on remote audio. For details, see RemoteAudioStats. |
virtual void onRemoteAudioPlay(const char* uid, int elapsed);
Callback about first frame of played remote videos.
Parameter | Type | Description |
---|---|---|
uid | OUT | Remote user ID (anchor ID) |
elapsed | OUT | Period from the the user calls joinRoom to the event occurs, unit: milliseconds |
virtual void onLocalAudioStatusChanged(LOCAL_AUDIO_STREAM_STATUS status, LOCAL_AUDIO_STREAM_ERROR_REASON errorReason);
Local audio status change callback.
Parameter | Type | Description |
---|---|---|
status | OUT | Local audio status, see details in LOCAL_AUDIO_STREAM_STATUS |
errorReason | OUT | Cause of local audio error, see details in LOCAL_AUDIO_STREAM_ERROR_REASON |
virtual void onLocalVideoStatusChanged(LOCAL_VIDEO_STREAM_STATUS status, LOCAL_VIDEO_STREAM_ERROR_REASON error);
Local video status change callback.
Parameter | Type | Description |
---|---|---|
status | OUT | Local video status, see details in LOCAL_VIDEO_STREAM_STATUS |
error | OUT | Cause of local video error, see details in LOCAL_VIDEO_STREAM_ERROR_REASON |
virtual void onRemoteAudioStateChangedOfUid(const char* uid,
REMOTE_AUDIO_STATE state,
REMOTE_AUDIO_REASON reason,
int elapsed);
Callback about audio status change of remote users.
Parameter | Type | Description |
---|---|---|
uid | OUT | Remote user ID (anchor ID) |
state | OUT | Audio stream status, see details in REMOTE_AUDIO_STATE |
reason | OUT | Cause of audio stream change, see details in REMOTE_AUDIO_REASON |
elapsed | OUT | Period from the the user calls joinRoom to the event occurs, unit: milliseconds |
virtual void onRemoteVideoStateChangedOfUid(const char* uid,
REMOTE_VIDEO_STATE state,
REMOTE_VIDEO_REASON reason,
int elapsed);
Callback about video status change of remote users.
Parameter | Type | Description |
---|---|---|
uid | OUT | Remote user ID (anchor ID) |
state | OUT | Video stream status, see details in REMOTE_VIDEO_STATE |
reason | OUT | Cause of video stream change, see details in REMOTE_VIDEO_REASON |
elapsed | OUT | Period from the the user calls joinRoom to the event occurs, unit: milliseconds |
virtual void onDeviceStats(const DeviceStats& stats);
CPU or memory usage satus.
Parameter | Type | Description |
---|---|---|
stats | OUT | CPU or memory usage satus, see details in DeviceStats |
virtual void onCaptureVolumeIndication(int totalVolume, int cpt, int micVolume);
Volume capture callback, which is disable by default and can be enabled by calling enableCaptureVolumeIndication.
Parameter | Type | Description |
---|---|---|
totalVolume | OUT | Volume, range: [0-100] |
cpt | OUT | Capture time |
micVolume | OUT | Volume captured by microphone, range: [0-100] |
virtual void onAudioDeviceVolumeChanged(int deviceType, int volume, bool muted);
Volume change of playback or recording device, or audio player apllication.
Parameter | Type | Description |
---|---|---|
deviceType | OUT | Device type,see details in MEDIA_DEVICE_TYPE |
volume | OUT | Volume |
muted | OUT | Whether to mute: 0-no, 1-yes |
virtual void onVideoDeviceStateChanged(const char* deviceId, MEDIA_DEVICE_TYPE deviceType, MEDIA_DEVICE_STATE_TYPE deviceState);
Callback of video device status change. For example, plug cameras.
Parameter | Type | Description |
---|---|---|
deviceId | OUT | Video device ID,which corresponds to VideoDeviceInfo.index |
deviceType | OUT | Device type, see details in MEDIA_DEVICE_TYPE |
deviceState | OUT | Video device status, see details in MEDIA_DEVICE_STATE_TYPE |
virtual void onHowlingDetectResult(bool bHowling);
Callback of howling detection results.
Note:
- The callback is received when the enableHowlingDetector is enabled and the microphone is on.
- The callback is called when the echo detection status changes.
- The callback will be recevied when the enableHowlingDetector is enabled and the microphone status changes.
- This callback will be received once from enableHowlingDetector(false) to enableHowlingDetector(true) when the microphone is on.
Parameter | Type | Description |
---|---|---|
bHowling | OUT | Detection result: "true"-detected, "false"-not detected |
virtual void onEchoDetectResult(bool bEcho);
Callback of echo detection results.
Note:
- The callback is received when the enableEchoDetector is enabled and the microphone is on.
- The callback is called when the echo detection status changes.
- The callback will be recevied when the enableEchoDetector is enabled and the microphone status changes.
- This callback will be received once from enableEchoDetector(false) to enableEchoDetector(true) when the microphone is on.
Parameter | Type | Description |
---|---|---|
bEcho | OUT | Detection result: "true"-detected, "false"-not detected |
virtual void onWarning(ThunderWarningCode warnCode, const char *msg);
Inform the business layer of SDK warnings.
| Parameter | Type | Description | | :--- | :--- | | :--- | | warnCode | OUT | Warning code, see details in ThunderWaringCode | | msg | OUT | Warning details |
virtual void Thunder::IAudioFrameObserver::onRecordAudioFrame(AudioFrame& audioFrame);
Callback on raw audio capture data.
Parameter | Type | Description |
---|---|---|
audioFrame | OUT | For original audio data, see AudioFrame for details |
virtual void Thunder::IAudioFrameObserver::onPlaybackAudioFrame(AudioFrame& audioFrame);
Callback on raw audio play data.
Parameter | Type | Description |
---|---|---|
audioFrame | OUT | For original audio data, see AudioFrame for details |
virtual void Thunder::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing(char* uid, AudioFrame& audioFrame);
Callback of original data decoded by remote user can differentiate users through different uids.
Parameter | Type | Description |
---|---|---|
uid | OUT | Remote user uid |
audioFrame | OUT | For original audio data, see AudioFrame for details |
virtual void Thunder::IThunderAudioPlayerNotify::onAudioFileVolume(unsigned int volume, unsigned int currentMs, unsigned int totalMs);
Callback on progress information of audio player.
Parameter | Type | Description |
---|---|---|
volume | OUT | Volume range: [0-100] |
currentMs | OUT | Current play progress, unit: ms |
totalMs | OUT | Total duration of the audio file, unit: ms |
Note:
- This API is deprecated from V2.8.0,, and it is recommended to call onAudioFileStateChange.
virtual void Thunder::IThunderAudioPlayerNotify::onAudioFilePlayEnd();
The audio player plays and then calls back.
virtual void onAudioFileStateChange(ThunderAudioFilePlayerEvent event, ThunderAudioFilePLayerErrorCode errorCode);
Playback status.
Parameter | Type | Description |
---|---|---|
event | OUT | Playback description, see details in ThunderAudioFilePlayerEvent |
errorCode | OUT | Error codes, see details in ThunderAudioFilePLayerErrorCode |
virtual bool Thunder::IVideoFrameObserver::onPreviewVideoFrame(VideoFrame& videoFrame);
The local video preview data is called back. The current data format is YUV420.
Parameter | Type | Description |
---|---|---|
videoFrame | OUT | Local preview video data. For details, see VideoFrame. |
virtual bool Thunder::IVideoFrameObserver::onRenderVideoFrame(const char* uid, VideoFrame& videoFrame);
The rendering video data of other users is called back. The data format is YUV420.
Parameter | Type | Description |
---|---|---|
uid | OUT | User id |
videoFrame | OUT | User rending video data. For details, see VideoFrame. |
virtual bool Thunder::IVideoCaptureObserver::onCaptureVideoFrame(VideoFrame& videoFrame);
The local video capture data is called back. The current data format is BGRA.
Parameter | Type | Description |
---|---|---|
videoFrame | OUT | Local collection video data. For details, see VideoFrame. |
virtual void Thunder::IThunderMediaExtraInfoObserver::onSendMediaExtraInfoFailedStatus(int status);
Callback on failure in sending media extra information.
Parameter | Type | Description |
---|---|---|
status | OUT | Error code for failure. See ThunderSendMediaExtraInfoFailedStatus for details. |
virtual void Thunder::IThunderMediaExtraInfoObserver::onRecvMediaExtraInfo(const char* uid, const char* pData, int dataLen);
Callback on media extra information received.
Parameter | Type | Description |
---|---|---|
uid | OUT | User id |
pData | OUT | Media extra information |
dataLen | OUT | Length of media extra information |
virtual bool Thunder::IThunderMediaExtraInfoObserver::onRecvMixAudioInfo(const char* uid, MixAudioInfoList& infos);
Callback on extra information of mixed audio streams received.
Parameter | Type | Description |
---|---|---|
uid | OUT | User id |
infos | OUT | List of information about mixed audio stream |
virtual bool Thunder::IThunderMediaExtraInfoObserver::onRecvMixVideoInfo(const char* uid, MixVideoInfoList& infos);
Callback on extra information of mixed video streams received.
Parameter | Type | Description |
---|---|---|
uid | OUT | User id |
infos | OUT | List of information about mixed video streams |
#define MAX_THUNDER_UID_LEN 65 // UID length
struct AudioVolumeInfo
{
char uid[MAX_THUNDER_UID_LEN]; // User id
int volume; // Volume
};
Information about playing volume
enum Thunder::AUTH_RESULT
Authentication result
Member | Descrpition |
---|---|
AUTHRES_SUCCUSS(0) | Authentication succeeded |
AUTHRES_ERR_SERVER_INTERNAL(10000) | Server internal error, try again |
AUTHRES_ERR_NO_TOKEN(10001) | token not carried. updateToken needs to be called. |
AUTHRES_ERR_TOKEN_ERR(10002) | Token authentication failed (incorrect digital signature), which may be caused by incorrect appSecret |
AUTHRES_ERR_APPID(10003) | appid in token is inconsistent with appid when execute authentication |
AUTHRES_ERR_UID(10004) | uid in token is inconsistent with uid when execute authentication |
AUTHRES_ERR_TOKEN_EXPIRE(10005) | token has expired |
AUTHRES_ERR_NO_APP(10006) | App does not exist, which is not registered in the management background |
AUTHRES_ERR_TOKEN_WILL_EXPIRE(10007) | token is about to expire. Callback is returned 30s in advance. |
AUTHRES_ERR_NO_BAND(10008) | The user is baned |
enum Thunder::USER_OFFLINE_REASON_TYPE
Causes for user going offline
Member | Descrpition |
---|---|
USER_OFFLINE_QUIT(1) | The user is offline actively |
USER_OFFLINE_DROPPED(2) | The packet could not be received for long time, lost connection due to timeout. Note: Because SDK uses unreliable channel, the counterpart may leave our side actively. So it is misjudged as timeout offline |
USER_OFFLINE_BECOME_AUDIENCE(3) | User status is switched from anchor to audience (live mode) |
enum Thunder::NetworkQuality
Network quality
Member | Descrpition |
---|---|
THUNDER_QUALITY_UNKNOWN(0) | Unknown quality |
THUNDER_QUALITY_EXCELLENT(1) | Excellent network quality |
THUNDER_QUALITY_GOOD(2) | Good network quality |
THUNDER_QUALITY_POOR(3) | The network quality is poor, but the communication is not affected even the user can feel its defects. |
THUNDER_QUALITY_BAD(4) | The network quality is bad, and the communication can be barely made but is not smooth |
THUNDER_QUALITY_VBAD(5) | The network quality is very bad, the communication cannot be made basically |
THUNDER_QUALITY_DOWN(6) | Network disconnected and communication failed. |
enum Thunder::ThunderConnectionStatus
Server connection status
Member | Descrpition |
---|---|
THUNDER_CONNECTION_STATUS_CONNECTING(0) | Connecting |
THUNDER_CONNECTION_STATUS_CONNECTED(1) | Connected |
THUNDER_CONNECTION_STATUS_DISCONNECTED(2) | Disconnected |
enum Thunder::ThunderConnectionStatus
Network type
Member | Descrpition |
---|---|
THUNDER_NETWORK_TYPE_UNKNOWN(0) | Unknown network connection type |
THUNDER_NETWORK_TYPE_DISCONNECTED(1) | The network has been disconnected |
THUNDER_NETWORK_TYPE_CABLE(2) | Cable network |
THUNDER_NETWORK_TYPE_WIFI(3) | Wi-Fi (hotspot included) |
THUNDER_NETWORK_TYPE_MOBILE(4) | Mobile network. 2G, 3G and 4G network cannot be differentiated |
THUNDER_NETWORK_TYPE_MOBILE_2G(5) | 2G mobile network |
THUNDER_NETWORK_TYPE_MOBILE_3G(6) | 3G mobile network |
THUNDER_NETWORK_TYPE_MOBILE_4G(7) | 4G mobile network |
enum Thunder::ThunderConnectionStatus
Audio device status
Member | Descrpition |
---|---|
THUNDER_AUDIO_DEVICE_STATUS_INIT_CAPTURE_SUCCESS(0) | Callback on successful initialization of audio capture device |
THUNDER_AUDIO_DEVICE_STATUS_INIT_CAPTURE_ERROR_OR_NO_PERMISSION(1) | Callback on initialization failure of audio capture. It may be caused by no permission |
THUNDER_AUDIO_DEVICE_STATUS_RELEASE_CAPTURE_SUCCESS(2) | Callback on successful release of audio capture device |
enum Thunder::ThunderPublishCDNErrorCode
Error codes for CDN stream publishing
Member | Descrpition |
---|---|
THUNDER_PUBLISH_CDN_ERR_SUCCESS(0) | Stream publishing succeeded |
THUNDER_PUBLISH_CDN_ERR_TOCDN_FAILED(1) | Publishing stream to external server (CDN) is failed. 1. Check whether url is correct. 2. Check whether the token in the URL is valid (generally, token is required during cdn stream publishing and can be ignored if it doe not exist). |
THUNDER_PUBLISH_CDN_ERR_THUNDERSERVER_FAILED(2) | Publish the stream to thunder internal server is failed. 1. Check the anchor uplink network. 2. Contact us to locate internal transmission faults. |
THUNDER_PUBLISH_CDN_ERR_THUNDERSERVER_STOP(3) | Stop stream publishing |
struct Thunder::RoomStats
{
int totalDuration; // Total call duration, unit: second
int txBitrate; // Chain sending bit rate (unit: bps)
int rxBitrate; // Chain receiving bit rate (unit: bps)
int txBytes; // Total sent bytes
int rxBytes; // Total received bytes
int txAudioBytes; // Total sent audio bytes
int rxAudioBytes; // Total received audio bytes
int txVideoBytes; // Total sent video bytes
int rxVideoBytes; // Total received video bytes
int txAudioBitrate; // Audio packet sending bit rate (unit: bps)
int rxAudioBitrate; // Audio packet receiving bit rate (unit: bps)
int txVideoBitrate; // Video packet sending bit rate (unit: bps)
int rxVideoBitrate; // Video packet receiving bit rate (unit: bps)
int lastmileDelay; // Local client-to-edge server delay (unit: milliseconds)
};
Information about uplink and downlink traffic in the room
enum Thunder::ThunderSendAppMsgDataFailedStatus
Causes for failure in sending user-defined messages
Member | Descrpition |
---|---|
THUNDER_SEND_APP_DATA_HIGHT_FREQUENCY(1) | Excessively high sending frequency. Fewer than twice each second is recommended. |
THUNDER_SEND_APP_DATA_LARGE_MSG_DATA(2) | Excessively large size of sent data each time. It is recommended that data sent each time does not exceed 200 bytes. |
THUNDER_SEND_APP_DATA_NO_PUBLISH_SUCCESS(3) | Publishing failed |
enum Thunder::ThunderCaptureStatus
Camera collection status
Member | Descrpition |
---|---|
THUNDER_VIDEO_CAPTURE_STATUS_SUCCESS(0) | Succeeded |
THUNDER_VIDEO_CAPTURE_STATUS_AUTHORIZED(1) | Permission not granted to users yet (not supported on PCs temporarily) |
THUNDER_VIDEO_CAPTURE_STATUS_NOT_DETERMINED(2) | Permission not granted yet (not supported on PCs temporarily) |
THUNDER_VIDEO_CAPTURE_STATUS_RESTRICTED(3) | Occupied |
THUNDER_VIDEO_CAPTURE_STATUS_DENIED(4) | No permission |
THUNDER_VIDEO_CAPTURE_STATUS_DENIED(5) | Close |
THUNDER_VIDEO_CAPTURE_STATUS_LOST(6) | The device is removed. |
THUNDER_VIDEO_CAPTURE_STATUS_RESUME(7) | The device is removed and inserted again. |
enum Thunder::QUALITY_ADAPT_INDICATION
Adaption of video quality
Member | Descrpition |
---|---|
ADAPT_NONE(0) | The quality of local video is constant |
ADAPT_UP_BANDWIDTH(1) | The quality of local video has been improved because of higher network bandwidth |
ADAPT_DOWN_BANDWIDTH(2) | The quality of local video becomes worse because of lower network bandwidth |
enum Thunder::QUALITY_ADAPT_INDICATION
Video encoding type
Member | Descrpition |
---|---|
VIDEO_CODEC_UNKNOW(0) | Unknown type |
VIDEO_CODEC_VP8(1) | Standard VP8 |
VIDEO_CODEC_H264(2) | Standard H264 |
VIDEO_CODEC_H265(3) | Standard H265 |
VIDEO_CODEC_EVP(4) | Enhanced VP8 |
VIDEO_CODEC_E264(5) | Enhanced H264 |
enum Thunder::VIDEO_ENCODED_TYPE
Video coding mode.
Member | Description |
---|---|
VIDEO_ENCODED_TYPE_UNKNOWN(0) | Unknown type |
VIDEO_ENCODED_TYPE_HARD(1) | Hard-coding |
VIDEO_ENCODED_TYPE_SOFT(2) | Soft-coding |
struct Thunder::LocalVideoStats
{
int sendBitrate;// Actual sending bit rate (unit: Kbps), with the exception of sending bit rate of reloaded videos after packet loss
int sendFrameRate;// Actual sending frame rate (unit: fps), with the exception of sending frame rate of reloaded videos after packet loss
int encoderOutputFrameRate;// Output frame rate of local encoder (unit: fps)
int rendererOutputFrameRate;// Output frame rate of local preview (unit: fps)
int targetBitrate;// Target encoding bit rate of current encoder (unit: Kbps). This bit rate is a value estimated by this SDK in accordance with current network status.
int targetFrameRate;// Target encoding frame rate of current encoder (unit: fps). This frame rate is a value estimated by this SDK in accordance with current network status.
QUALITY_ADAPT_INDICATION qualityAdaptIndication;//Quality adaptability of local videos since last statistics (based on target frame rate and target bit rate)
int encodedBitrate;//Bit rate of video encoding (Kbps). This parameter includes no encoding bit rate of reloaded videos after packet loss.
int encodedFrameWidth;// Encoded video width (px)
int encodedFrameHeight;// Encoded video height (px)
int encodedFrameCount;// Number of frames sent by video, an accumulated value
VIDEO_ENCODED_TYPE encodedType;// Encoding mode
VIDEO_CODEC_TYPE codecType;// Encoding type of videos
int configBitRate;//Configured bit rate (kbps)
int configFrameRate;// Configured frame rate
int configWidth;// Configured encoding width
int configHeight;// Configured encoding height
};
Statistics on video streams sent from the local device, among which:
struct LocalAudioStats
{
int encodeBitrate; // Code rate (unit: kbps)
int numChannels; // Number of channels
int sendSampleRate; // Sampling rate sent (unit: Hz)
int sendBitrate; // Average value of bit rate of sent data (unit: Kbps)
int enableVad; // Whether to enable VAD when sending audios: 0-disable, 1-enable
};
Statistics on audio streams sent from the local device
enum Thunder::REMOTE_VIDEO_STREAM_TYPE
High/Low stream type
Member | Descrpition |
---|---|
REMOTE_VIDEO_STREAM_HIGH(0) | High stream |
REMOTE_VIDEO_STREAM_LOW(1) | Low stream |
struct RemoteVideoStats
{
int delay; // Delay from publishing remote video stream to playback
int width; // Width of remote video stream
int height; // Height of remote video stream
int receivedBitrate; // Receiving bit rate (unit: Kbps)
int decoderOutputFrameRate; // Output frame rate of remote video decoder (unit: fps)
int rendererOutputFrameRate; // Output frame rate of remote video renderer (unit: fps)
int packetLossRate; // Packet loss rate (%) of remote video after network confrontation
REMOTE_VIDEO_STREAM_TYPE rxStreamType; // Types of video stream, including large stream and small stream
int totalFrozenTime; // The accumulated time (ms) from the time when a remote user joins a channel to the time of video freezing
int frozenRate; // The percentage (%) of the accumulated time (from the time when a remote user joins a channel to the time of video freezing) accounting for total effective time of videos
};
Status of end-to-end video streams of remote users in a call. Among which:
struct RemoteAudioStats
{
int quality;// Quality of audio streams sent by remote users. 0: Unknown; 1: Excellent; 2: Good; 3: Poor, flawed but does not affect communication; 4: Bad, communication can be made but not smoothly; 5: Very Bad, communication can barely be made; 6: Disconnected, communication can not be made at all
int networkTransportDelay;// Network delay from an audio sending end to an audio receiving end
int jitterBufferDelay;// Delay from a receiving end to network jitter buffer
int totalDelay;// Total delay from capturing the host audio to audience playing the audio, unit: millisecond
int frameLossRate;// Frame loss rate (%) of remote audio streams
int numChannels;// Number of channels
int receivedSampleRate;// Sampling rate (Hz) of remote audios
int receivedBitrate;// Average bit rate of remote audios within a statistical period
int totalFrozenTime;// The accumulated time (ms) from the time when a remote user joins a channel to the time of audio freezing
int frozenRate;// The percentage (%) of the accumulated time (from the time when a remote user joins a channel to the time of audio freezing) accounting for total effective time of audios
};
Status of end-to-end audio streams of remote users in a call.
enum IAudioFrameObserver::AUDIO_FRAME_TYPE
Audio frame type
Member | Descrpition |
---|---|
FRAME_TYPE_PCM16(0) | PCM 16bit little endian |
struct IAudioFrameObserver::AudioFrame
{
AUDIO_FRAME_TYPE type;
int samples; // Sample quantity of the frame
int bytesPerSample; // Bytes per sample: PCM (16 digits) contains two types
int channels; // Number of channels (crossed data for stereo); 1: single track, 2: dual track
int samplesPerSec; // Sampling rate
void* buffer; // data buffer
long long renderTimeMs; // Not used momentarily
int avsync_type; // Not used momentarily
};
Detailed information about audio data. For details about audio frame type, see AUDIO_FRAME_TYPE.
enum Thunder::VIDEO_FRAME_TYPE
Video frame type
Member | Descrpition |
---|---|
FRAME_TYPE_YUV420(0) | YUV420 |
FRAME_TYPE_BGRA(1) | BGRA |
#define MAX_THUNDER_VIDEO_BUFFER_PLANE 8 // Maximum plane number of video frames (I420: 3, RGB: 1)
struct VideoFrame
{
void* dataPtr[MAX_THUNDER_VIDEO_BUFFER_PLANE]; // Pointer to each plane data in video frame
int dataLength[MAX_THUNDER_VIDEO_BUFFER_PLANE]; // Length of each plane data in video frame
int dataStride[MAX_THUNDER_VIDEO_BUFFER_PLANE]; // Step size of each plane data in video frame
int width; // Width of video frame
int height; // Width and height of video frame
VIDEO_FRAME_TYPE type; // Type of video frame
int rotation; // Rotation angle
__int64 timeStamp; // Presentation timestamp
};
Detailed information about video data. For details about video frame type, see VIDEO_FRAME_TYPE.
enum IThunderMediaExtraInfoObserver::ThunderSendMediaExtraInfoFailedStatus
Causes for failure in sending media extra information.
Member | Descrpition |
---|---|
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_DATA_EMPTY(1) | Extra information is null. |
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_DATA_TOO_LARGE(2) | Excessively large size of sent data each time |
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_FREQUENCY_TOO_HIGHT(3) | Excessively high sending frequency |
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_NOT_IN_ANCHOR_SYSTEM(4) | Not an anchor system |
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_NO_JOIN_MEDIA(5) | Channel not to be joined |
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_NO_PUBLISH_SUCCESS(6) | Publishing failed |
struct MixAudioInfo // Information about mixed audio stream
{
char uid[MAX_THUNDER_UID_LEN]; // User id
int volume; // Volume of mixed audio stream [0,100]
};
Information about mixed audio stream
struct MixAudioInfoList // List of information about mixed audio stream
{
int count; // Number of lists of information about mixed audio stream
MixAudioInfo mixAudio[MAX_THUNDER_MIX_AUDIO_COUNT]; // Specific information about mixed audio stream
};
List of information about mixed audio stream
struct MixVideoInfo
{
char uid[MAX_THUNDER_UID_LEN]; // User id
int width; // Original width of this user's video
int height; // Original height of this user's video
int cropX; // X coordinate of the begin point used to crop the original video in video mixing
int cropY; // Y coordinate of the begin point used to crop the original video in video mixing
int cropW; // Width of the original video to be cropped in video mixing
int cropH; // Height of the original video to be cropped in video mixing
int layoutX; // X coordinate of the begin point of this user's video in video mixing canvas
int layoutY; // Y coordinate of the begin point of this user's video in video mixing canvas
int layoutW; // Width of this user's video in video mixing canvas
int layoutH; // Height of this user's video in video mixing canvas
int zOrder; // Layer number of this user's video frame in video mixing. The value range is the integer in [0, 100], and the minimum value is 0, indicating that the image in this region is at the lowest level
float alpha; // Transparency of this user's video frame in video mixing.
// The value range is [0.0, 1.0]. 0.0 indicates that the image in this region is completely transparent, while 1.0 indicates completely opaque
};
Information about mixed video streams
struct MixVideoInfoList // List of information about mixed video streams
{
int count; // Number of lists of information about mixed video stream
MixVideoInfo mixVideo[MAX_THUNDER_MIX_VIDEO_COUNT]; // Specific information about mixed video stream
};
List of information about mixed video streams
enum Thunder::ThunderAudioFilePlayerEvent
Local file playback status.
Member | Description |
---|---|
AUDIO_PLAY_EVENT_OPEN(1) | Open file |
AUDIO_PLAY_EVENT_PLAY(2) | Start playback |
AUDIO_PLAY_EVENT_STOP(3) | Stop playback |
AUDIO_PLAY_EVENT_PAUSE(4) | Pause |
AUDIO_PLAY_EVENT_RESUME(5) | Resume playback |
AUDIO_PLAY_EVENT_END(6) | Playback finished |
AUDIO_PLAY_EVENT_SEEK_COMPLETE(7) | Speed playback |
enum Thunder::ThunderAudioFilePLayerErrorCode
Error codes of local file playback.
Member | Description |
---|---|
AUDIO_PLAYER_OPEN_FILE_PATH_ERROR(-4) | Incorrect file path |
AUDIO_PLAYER_OPEN_FILE_FORMAT_NOT_SUPPORT(-3) | Incorrect file format |
AUDIO_PLAYER_OPEN_FILE_DECODER_FAILED(-2) | Decoding file format failed |
AUDIO_PLAYER_CREATE_FILE_DECODER_FAILED(-1) | Parsing file format failed |
AUDIO_PLAYER_STATUS_SUCCESS(0) | Succeeded |
enum Thunder::LOCAL_AUDIO_STREAM_STATUS
Local audios stream status
Member | Description |
---|---|
THUNDER_LOCAL_AUDIO_STREAM_STATUS_STOPPED(0) | Default initialization status |
THUNDER_LOCAL_AUDIO_STREAM_STATUS_CAPTURING(1) | Enabling the recording device succeeded |
THUNDER_LOCAL_AUDIO_STREAM_STATUS_ENCODING(2) | Coding the first frame of local audios succeeded |
THUNDER_LOCAL_AUDIO_STREAM_STATUS_SENDING(3) | Sending the first frame of local audios succeeded |
THUNDER_LOCAL_AUDIO_STREAM_STATUS_FAILED(4) | Enabling local audios failed |
enum Thunder::LOCAL_AUDIO_STREAM_ERROR_REASON
Cuase of local audios change
Member | Description |
---|---|
THUNDER_LOCAL_AUDIO_STREAM_ERROR_OK(0) | Normal |
THUNDER_LOCAL_AUDIO_STREAM_ERROR_UNKOWN(1) | Unknown reason |
THUNDER_LOCAL_AUDIO_STREAM_ERROR_CAPTURE_FAILURE(2) | Capturing local audios failed |
THUNDER_LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE(3) | Coding local audios failed |
enum Thunder::LOCAL_VIDEO_STREAM_STATUS
Local video stream status
Member | Description |
---|---|
THUNDER_LOCAL_VIDEO_STREAM_STATUS_STOPPED(0) | Default initialization status |
THUNDER_LOCAL_VIDEO_STREAM_STATUS_CAPTURING(1) | Enabling the recording device succeeded |
THUNDER_LOCAL_VIDEO_STREAM_STATUS_PREVIEWING(2) | Previewing local video succeeded |
THUNDER_LOCAL_VIDEO_STREAM_STATUS_ENCODING(3) | Coding the first frame of local videos succeeded |
THUNDER_LOCAL_VIDEO_STREAM_STATUS_SENDING(4) | Sending the first frame of local videos succeeded |
THUNDER_LOCAL_VIDEO_STREAM_STATUS_FAILED(5) | Enabling local videos failed |
enum Thunder::LOCAL_VIDEO_STREAM_ERROR_REASON
Cause of local video acquisition failure.
Member | Description |
---|---|
THUNDER_LOCAL_VIDEO_STREAM_ERROR_OK(0) | Normal |
THUNDER_LOCAL_VIDEO_STREAM_ERROR_FAILURE(1) | Unknown error |
THUNDER_LOCAL_VIDEO_STREAM_ERROR_DEVICE_DENIED(2) | No permission to enable the capture device |
THUNDER_LOCAL_VIDEO_STREAM_ERROR_DEVICE_RESTRICTED(3) | The capture device is in use |
THUNDER_LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE(4) | Capturing local videos failed. Please whether the capture device is working properly |
THUNDER_LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE(5) | Coding failure of local video |
enum Thunder::REMOTE_AUDIO_STATE
Remote audio stream status.
Member | Description |
---|---|
THUNDER_REMOTE_AUDIO_STATE_STOPPED(0) | Default initialization sataus, which may be reported under the conditions of THUNDER_REMOTE_AUDIO_REASON_LOCAL_STOPPED(4) or THUNDER_REMOTE_AUDIO_REASON_REMOTE_STOPPED(6) |
THUNDER_REMOTE_AUDIO_STATE_STARTING(1) | The local user has accepted the first package of remote audio stream |
THUNDER_REMOTE_AUDIO_STATE_DECODING(2) | Decoding, playback normal |
THUNDER_REMOTE_AUDIO_STATE_FROZEN(3) | The reomte audio is freezing, which will be reported under the condition of THUNDER_REMOTE_AUDIO_REASON_NETWORK_CONGESTION(2) |
enum Thunder::REMOTE_AUDIO_REASON
Cause of remote video stream status change.
Member | Description |
---|---|
THUNDER_REMOTE_AUDIO_REASON_OK(0) | Normal |
THUNDER_REMOTE_AUDIO_REASON_INTERNAL(1) | Internal reason |
THUNDER_REMOTE_AUDIO_REASON_NETWORK_CONGESTION(2) | Network blocked |
THUNDER_REMOTE_AUDIO_REASON_NETWORK_RECOVERY(3) | Network back to normal |
THUNDER_REMOTE_AUDIO_REASON_LOCAL_STOPPED(4) | The local user stops receiving reomte audios or disables the audio module |
THUNDER_REMOTE_AUDIO_REASON_LOCAL_STARTED(5) | The local user resumes receiving the remote audio stream or enables the audio module |
THUNDER_REMOTE_AUDIO_REASON_REMOTE_STOPPED(6) | The remote user stops sending the audio stream or disables the audio module |
THUNDER_REMOTE_AUDIO_REASON_REMOTE_STARTED(7) | The remote user resumes sending the remote audio stream or enables the audio module |
enum Thunder::REMOTE_VIDEO_STATE
Remote video stream status.
Member | Description |
---|---|
THUNDER_REMOTE_VIDEO_STATE_STOPPED(0) | Default initialization status, which will be reported under the conditions of THUNDER_REMOTE_VIDEO_REASON_LOCAL_STOPPED(4) or THUNDER_REMOTE_VIDEO_REASON_REMOTE_STOPPED(6) |
THUNDER_REMOTE_VIDEO_STATE_STARTING(1) | The local user has accepted the first package of the reomte video |
THUNDER_REMOTE_VIDEO_STATE_DECODING(2) | The remote video is being decoded |
THUNDER_REMOTE_VIDEO_STATE_RENDERING(3) | The remote video is being renderred |
THUNDER_REMOTE_VIDEO_STATE_FROZEN(4) | Remote video is freezing, which will be reported under the conditions of THUNDER_REMOTE_VIDEO_REASON_NETWORK_CONGESTION(2) |
enum Thunder::REMOTE_VIDEO_REASON
Cause of remote audio stream status change.
Member | Description |
---|---|
THUNDER_REMOTE_VIDEO_REASON_OK(0) | Normal |
THUNDER_REMOTE_VIDEO_REASON_INTERNAL(1) | Internal reason |
THUNDER_REMOTE_VIDEO_REASON_NETWORK_CONGESTION(2) | Network blocked |
THUNDER_REMOTE_VIDEO_REASON_NETWORK_RECOVERY(3) | Network back to normal |
THUNDER_REMOTE_VIDEO_REASON_LOCAL_STOPPED(4) | The local user stops receiving reomte audios or disables the audio module |
THUNDER_REMOTE_VIDEO_REASON_LOCAL_STARTED(5) | The local user resumes receiving the remote audio stream or enables the audio module |
THUNDER_REMOTE_VIDEO_REASON_REMOTE_STOPPED(6) | The remote user stops sending the audio stream or disables the audio module |
THUNDER_REMOTE_VIDEO_REASON_REMOTE_STARTED(7) | The remote user resumes sending the remote audio stream or enables the audio module |
enum Thunder::MEDIA_DEVICE_TYPE
Media device type.
Member | Description |
---|---|
UNKNOWN_AUDIO_DEVICE(-1) | Unknown device |
AUDIO_PLAYOUT_DEVICE(0) | Audio player |
AUDIO_RECORDING_DEVICE(1) | Audio recoring device |
VIDEO_RENDER_DEVICE(2) | Video rendering device |
VIDEO_CAPTURE_DEVICE(3) | Video capture device |
AUDIO_APPLICATION_PLAYOUT_DEVICE(4) | Audio player application |
enum Thunder::MEDIA_DEVICE_STATE_TYPE
Media device status.
Member | Description |
---|---|
MEDIA_DEVICE_STATE_ACTIVE(1) | The device is available |
MEDIA_DEVICE_STATE_DISABLED(2) | The device is not available |
MEDIA_DEVICE_STATE_NOT_PRESENT(4) | The device does not exist |
MEDIA_DEVICE_STATE_UNPLUGGED(8) | The device is unplugged |
enum Thunder::ThunderWaringCode
Warning code
Enumeration Value | Description |
---|---|
THUNDER_PACK_AUDIO_WARING(3001) | The capture volume of the audio capture device is too low |
CPU/memory usage status
struct Thunder::DeviceStats
{
double cpuTotalUsage; // Current system CPU usage (%)
double cpuAppUsage; // CPU usage of the current application (%)
double memoryAppUsage; // Memory usage of the current application (%)
double memoryTotalUsage; // Current system memory usage (%)
};