Functional APIs

API List

  • IThunderEngine

Global FunctionFunction Name
Thunder::IThunderEngine*createEngine()
public member functionsFunction Name
virtual voiddestroyEngine() = 0
virtual intinitialize(const char* appId, int sceneId, IThunderEventHandler* pHandler) = 0
virtual intsetArea(AREA_TYPE area) = 0
virtual intjoinRoom(const char* token, int tokenLen, const char* roomId, const char* uid) = 0
virtual intleaveRoom() = 0
virtual intupdateToken(const char* token, int tokenLen) = 0
virtual intsetMediaMode(THUNDER_PROFILE mode) = 0
virtual intsetRoomMode(ROOM_CONFIG_TYPE mode) = 0
virtual intsetAudioConfig(AUDIO_PROFILE_TYPE profile, COMMUT_MODE commutMode, SCENARIO_MODE scenarioMode) = 0
virtual intsetAudioSourceType(ThunderSourceType sourceType) = 0
virtual intstopLocalAudioStream(bool stop) = 0
virtual intstopAllRemoteAudioStreams(bool stop) = 0
virtual intstopRemoteAudioStream(const char* uid, bool stop) = 0
virtual intsetAudioVolumeIndication(int interval, int smooth) = 0
virtual intenableLoopbackRecording(bool enabled) = 0
virtual intstartAudioRecording(const char* fileName, AUDIO_RECORDING_FILE_TYPE fileType, AUDIO_RECORDING_QUALITY_TYPE quality) = 0
virtual intstopAudioRecording() = 0
virtual intadjustRecordingSignalVolume(int volume) = 0
virtual intadjustPlaybackSignalVolume(int volume) = 0
virtual IAudioDeviceManager*getAudioDeviceMgr() = 0
virtual boolregisterAudioFrameObserver(IAudioFrameObserver* observer) = 0
virtual intsetRecordingAudioFrameParameters(int sampleRate, int channel, ThunderAudioRawFrameOperationMode mode, int samplesPerCall) = 0
virtual intsetPlaybackAudioFrameParameters(int sampleRate, int channel, ThunderAudioRawFrameOperationMode mode, int samplesPerCall) = 0
virtual intsetLogFilePath(const char* filePath) = 0
virtual intsetLogLevel(LOG_FILTER filter) = 0
virtual intregisterVideoFrameObserver(IVideoFrameObserver* observer) = 0
virtual IVideoDeviceManager*getVideoDeviceMgr() = 0
virtual intsetVideoEncoderConfig(const VideoEncoderConfiguration& config) = 0
virtual intsetLocalVideoCanvas(const VideoCanvas& canvas) = 0
virtual intsetRemoteVideoCanvas(const VideoCanvas& canvas) = 0
virtual intsetLocalCanvasScaleMode(VideoRenderMode mode) = 0
virtual intsetRemoteCanvasScaleMode(VideoRenderMode mode) = 0
virtual intstartVideoPreview() = 0
virtual intstopVideoPreview() = 0
virtual intenableLocalVideoCapture(bool enabled) = 0
virtual intstopLocalVideoStream(bool stop) = 0
virtual intstopRemoteVideoStream(const char* uid, bool stop) = 0
virtual intstopAllRemoteVideoStreams(bool stop) = 0
virtual intsetLocalVideoMirrorMode(ThunderVideoMirrorMode mode) = 0
virtual intsetVideoWatermark(const ThunderBoltImage& watermark) = 0
virtual intremoveVideoWatermarks() = 0
virtual intsetCustomAudioSource(bool bEnable, CustomAudioOptions& option) = 0
virtual intpushCustomAudioFrame(const char* pData, unsigned dataLen, unsigned timeStamp) = 0
virtual intsetCustomVideoSource(bool bEnable, CustomVideoOptions& option) = 0
virtual intpushCustomVideoFrame(const unsigned char* yuv[3], int linesize[3], unsigned timestamp) = 0
virtual intaddPublishOriginStreamUrl(const char* url) = 0
virtual intremovePublishOriginStreamUrl(const char* url) = 0
virtual intsetLiveTranscodingTask(const char* taskId, const LiveTranscoding& transcodingCfg) = 0
virtual intremoveLiveTranscodingTask(const char* taskId) = 0
virtual intaddPublishTranscodingStreamUrl(const char* taskId, const char* url) = 0
virtual intremovePublishTranscodingStreamUrl(const char* taskId, const char* url) = 0
virtual intaddSubscribe(const char* roomId, const char* uid) = 0
virtual intremoveSubscribe(const char* roomId, const char* uid) = 0
virtual intenableWebSdkCompatibility(bool enabled) = 0
virtual intsendUserAppMsgData(const char* msgData) = 0
virtual intsendMediaExtraInfo(const char* extraData) = 0
virtual intenableMixVideoExtraInfo(bool enabled) = 0
virtual intstartScreenCaptureForHwnd(HWND hWnd, const RECT* pRect) = 0
virtual intstartScreenCaptureForScreen(int screenId, const RECT* pRect) = 0
virtual intupdateScreenCaptureRect(const RECT* pRect) = 0
virtual intstopScreenCapture() = 0
virtual intpauseScreenCapture() = 0
virtual intresumeScreenCapture() = 0
virtual intregisterVideoCaptureObserver(IVideoCaptureObserver* observer) = 0
virtual intregisterMediaExtraInfoObserver(IThunderMediaExtraInfoObserver* observer) = 0
virtual IThunderAudioPlayer*createThunderAudioPlayer() = 0
virtual voiddestroyThunderAudioPlayer(IThunderAudioPlayer* player) = 0
virtual intgetVideoEncoderParam(const VideoEncoderConfiguration& configIn, ThunderVideoEncodeParam& paramOut) = 0
virtual ThunderConnectionStatusgetConnectionStatus() = 0
virtual intenableCaptureVolumeIndication(int interval, int moreThanThd, int lessThanThd, int smooth) = 0
virtual boolcheckFeatureSupport(FEATURE_SUPPORT flag) = 0
virtual intsetCaptureExcludeWindowList(HWND* wndList, int count) = 0
virtual intenableVoiceReverb(bool enabled) = 0
virtual intsetReverbParameter(const ReverbParameter& parameter) = 0
virtual intenableLimiter(bool enabled) = 0
virtual intsetLimiterParameter(const LimiterParameter& parameter) = 0
virtual intenableEqualizer(bool enabled) = 0
virtual intsetEqualizerParameter(const EqualizerParameter& parameter) = 0
virtual intsetVoicePitch(float pitch) = 0
virtual intenableHowlingDetector(bool enabled) = 0
virtual intenableEchoDetector(bool enabled) = 0
  • IAudioDeviceManager

public member functionsFunction Name
virtual intenumInputDevices(AudioDeviceList& devices) = 0
virtual intsetInputtingDevice(GUID& id) = 0
virtual intgetInputtingDevice(GUID& id) = 0
virtual intsetInputtingVolume(int volume) = 0
virtual intgetInputtingVolume(int& volume) = 0
virtual intsetInputtingMute(bool mute) = 0
virtual intgetInputtingMute(bool& mute) = 0
virtual intstartInputDeviceTest(int indicationInterval) = 0
virtual intstopInputDeviceTest() = 0
virtual intenumOutputDevices(AudioDeviceList& devices) = 0
virtual intsetOutputtingDevice(GUID& id) = 0
virtual intgetOutputtingDevice(GUID& id) = 0
virtual intsetOuttingVolume(int volume) = 0
virtual intgetOuttingVolume(int& volume) = 0
virtual intsetOutputtingMute(bool mute) = 0
virtual intgetOutputtingMute(bool& mute) = 0
virtual intstartOutputDeviceTest(int indicationInterval, const char* audioFileName) = 0
virtual intstopOutputDeviceTest() = 0
virtual intenableMicEnhancement(bool enabled) = 0
virtual intenableMicDenoise(bool enabled) = 0
virtual intenableAEC(bool enabled) = 0
virtual intenableAGC(bool enabled) = 0
  • IThunderAudioPlayer

public member functionsFunction Name
virtual boolopen(const char* path) = 0
virtual voidclose() = 0
virtual voidplay() = 0
virtual voidstop() = 0
virtual voidpause() = 0
virtual voidresume() = 0
virtual voidseek(unsigned int timeMS) = 0
virtual unsigned intgetTotalPlayTimeMS() = 0
virtual unsigned intgetCurrentPlayTimeMS() = 0
virtual intsetPlayerLocalVolume(int volume) = 0
virtual intsetPlayerPublishVolume(int volume) = 0
virtual intgetPlayerLocalVolume() = 0
virtual intgetPlayerPublishVolume() = 0
virtual intsetLooping(int cycle) = 0
virtual voidsetSemitone(int val) = 0
virtual voidsetTempo(float val) = 0
virtual voidsetPosition(int azimuth) = 0
virtual voidSetFilePlayerNotify(IThunderAudioPlayerNotify* notify) = 0
  • IVideoDeviceManager

public member functionsFunction Name
virtual intenumVideoDevices(VideoDeviceList& devices) = 0
virtual intstartVideoDeviceCapture(int deviceIdx) = 0
virtual intstopVideoDeviceCapture() = 0
virtual intenumMonitorDevices(MonitorDeviceList& devices) = 0

API Details

IThunderEngine

IThunderEngine::createEngine

EXTERN_C
{
 __declspec(dllimport) Thunder::IThunderEngine* createEngine();
};

Create the Thunder::IThunderEngine instance.

Note:

  • It is recommended to call the IThunderEngine::initialize API immediately after createEngine is called.
  • Currently, SDK supports only one IThunderEngine instance, that is, each process can only create one IThunderEngine object.
  • Unless otherwise specified, all interfaces in the IThunderEngine class are called asynchronously. It is recommended that interfaces are called on the same thread.
Return

Pointer to the Thunder::IThunderEngine object


IThunderEngine::destroyEngine

virtual void Thunder::IThunderEngine::destroyEngine();

Destroy the Thunder::IThunderEngine instance.

Description
  • This method releases all resources used by SDK.
  • Some applications only operate voice communication required by users. Resources can be released for other operations if they are not in need. This method may be applicable for such applications.
  • Once destroyEngine is called, the user will be no longer able to use functions of this instance and event notification will not be triggered any more.
  • To use communication function again, createEngine must be called again to create another IThunderEngine instance.

IThunderEngine::initialize

virtual int Thunder::IThunderEngine::initialize(const char* appId, int sceneId, IThunderEventHandler* pHandler);

Initialize the engine.

Note:

  • Only users with the same appId can communicate with each other.
  • Call this interface after an instance has been created. This interface is reset only when destroyEngine is called.
Parameter
ParameterTypeDescription
appIdINappId assigned for application program developers. It can be requested in the official website.
sceneIdINId for scenarios customized by developers. It details service scenarios and can be collected with more details based on scenarios. If not required, set it to 0.
pHandlerINPointer of the IThunderEventHandler object. SDK calls back various events for application programs through this abstract class during SDK running.
Return

IThunderEngine::setArea

virtual int Thunder::IThunderEngine::setArea(AREA_TYPE area);

Set country and area of users.

To accommodate to different laws and regulations at home and abroad, CS2 NETWORK provides both domestic (by default) and international central systems. Set it by referring to the following points:

  • If applications are mainly conducted abroad, this interface shall be called to set abroad area.
  • The users in domestic and international central systems cannot communicate with each other. So make ensure that users in the same room shall be in the same system.
  • The two systems are deployed globally, supporting global access.

Note:

  • This interface takes effect only if it is called before the calling of joinRoom.
  • It is necessary for abroad users but not for domestic users.
  • It can only be reset when destroyEngine is performed.
Parameter
ParameterTypeDescription
areaINRegion type is domestic by default. For details about the parameter value, see AREA_TYPE.
Return

IThunderEngine::joinRoom

virtual int Thunder::IThunderEngine::joinRoom(const char* token, int tokenLen, const char* roomName, const char* uid);

Join a room.

This method lets users join the (audio/video) communication room. In the same room, users can communicate with each other, and group chat starts when multiple users join it.

If during the call, users have to call leaveRoom to leave before joining the next one.

Note:

  • This API should be called after initialization (initialize).
  • The applications using different appId cannot communicate with each other.
  • Success returned by the function only indicates request execution success. You have joined a room successfully only if you receive the onJoinRoomSuccess notification.
Parameter
ParameterTypeDescription
tokenINRequired for authentication. For details, see User Authentication Description on official website.
tokenLenINToken length
roomNameINRoom Id (unique for AppId) only supports the permutation and combination of characters such as [A,Z],[a,z],[0,9],-,_, with the length of not more than 64 bytes.
uidINUser ID only supports the permutation and combination of characters such as [A,Z],[a,z],[0,9],-,_, with the length of not more than 64 bytes.
Return

IThunderEngine::leaveRoom

virtual int Thunder::IThunderEngine::leaveRoom();

Leaving room indicates hang off or exiting conversation.

Note:

  • This API should be called after initialization (initialize).
  • When joinRoom is called, you have to call leaveRoom to end conversation before starting the next one. No matter whether the user is idle or in a call, leaveRoom can be called, without adverse effects. This method can release all resources related to conversation.
Return

IThunderEngine::updateToken

virtual int Thunder::IThunderEngine::updateToken(const char* token, int tokenLen);

Update token.

Note:

  • This API should be called after initialization (initialize).
  • Success returned by the function only indicates request execution success. You have joined a room successfully only if you receive the onJoinRoomSuccess notification.

Token is used for authentication. Recommended token format is as follows. For details, see Authentication Access Manual.

uint16uint32uint64uint64uint32uint16nBytes20 Bytes
TokenLenAppIduidTimeStamp(ms)ValidTime(s)BizExtInfoLenBizExtInfoDataDigitalSignature

Refer to the following descriptions:

  1. The multi-byte integer uses network byte order, generally Big Endian.
  2. TokenLen: the length of the whole token includes its 2 bytes and abstract.
  3. Token expiration time=Timestamp+ValidTime*1000, the UTC time in millisecond since 1970.
  4. BizExtInfoData: Extension information that may be needed for service authentication is customized by the service.
  5. DigitalSignature: Digital signature adopts the hmac-sha1 algorithm to calculate all data before DigitalSignature to get the [TokenLen,BizExtInfoData]. AppSecret distributed in application of appId is used as the key.
  6. Token has to be transmitted by http, so the whole Token shall be encoded by url base64. Note that the url encode is not performed for the whole base64.
Parameter
ParameterTypeDescription
tokenINRequired for authentication. For details, see User Authentication Description.
tokenLenINToken length
Return

IThunderEngine::setMediaMode

virtual int Thunder::IThunderEngine::setMediaMode(THUNDER_PROFILE mode);

Set media format. PROFILE_NORMAL is used by SDK by default.

Note:

  • This interface should be called after initialization (initialize) and before joining a room (joinRoom).
  • It can only be reset when destroyEngine is performed.
Parameter
ParameterTypeDescription
modeINMedia mode. For details about the parameter value, see Thunder::THUNDER_PROFILE.
Return

IThunderEngine::setRoomMode

virtual int Thunder::IThunderEngine::setRoomMode(ROOM_CONFIG_TYPE mode);

Set room mode. ROOM_CONFIG_LIVE is used by SDK by default.

Note:

  • This interface should be called after initialization (initialize) and before joining a room (joinRoom).
  • It can only be reset when destroyEngine is performed.
Parameter
ParameterTypeDescription
modeINRoom mode. For details about the parameter value, see Thunder::ROOM_CONFIG_TYPE.
Return

IThunderEngine::setAudioConfig

virtual int Thunder::IThunderEngine::setAudioConfig(AUDIO_PROFILE_TYPE profile, COMMUT_MODE commutMode, SCENARIO_MODE scenarioMode);

Set audio parameters and application scenarios.

Note:

Parameter
ParameterTypeDescription
profileINAudio type. For details about the parameter value, see Thunder::AUDIO_PROFILE_TYPE.
commuModeINCommunication mode. For details about the parameter value, see Thunder::COMMUT_MODE.
scenarioModeINScenario mode. For details about the parameter value, see Thunder::SCENARIO_MODE.
Return

IThunderEngine::setAudioSourceType

virtual int Thunder::IThunderEngine::setAudioSourceType(ThunderSourceType sourceType);

Set audio publishing type.

Note:

Parameter
ParameterTypeDescription
sourceTypeINAudio publishing mode. For details about the parameter value, see Thunder::ThunderSourceType.
Return

IThunderEngine::stopLocalAudioStream

virtual int Thunder::IThunderEngine::stopLocalAudioStream(bool stop);

Stop broadcasting/Publish audio (including starting capture, encoding, and stream publishing).

Note:

  • Call this API after joining the room by calling (joinRoom).
Parameter
ParameterTypeDescription
StopINtrue: Close local audio; false: Open local audio
Return

IThunderEngine::stopAllRemoteAudioStreams

virtual int Thunder::IThunderEngine::stopAllRemoteAudioStreams(bool stop);

Stop/Receive all audio data. Process this interface based on the following rules:

  • By default, SDK receives all audio data.
  • After the setting of receiving all (stop=false), all audio stream in the room will be subscribed automatically. You can specify one stream of not being subscribed by stopRemoteAudioStream.
  • After the setting of receiving nothing (stop=true), all audio stream in the room will not be subscribed. You can specify one stream being subscribed by stopRemoteAudioStream.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called.
  • Determine whether to receive or disable remote users. Check the value of stopRemoteAudioStream first. If no value is found, use the value of this function.
Parameter
ParameterTypeDescription
StopINtrue: Close local audio; false: Open local audio
Return

IThunderEngine::stopRemoteAudioStream

virtual int Thunder::IThunderEngine::stopRemoteAudioStream(const char* uid, bool stop);

Stop/Receive audio data of specified users.

Note:

  • Call this API after joining the room by calling (joinRoom). This interface is reset only when destroyEngine is called.
  • Determine whether to receive or disable remote users. Check the value of this function first. If no value is found, use the value of stopRemoteAudioStream.
Parameter
ParameterTypeDescription
uidINUser UID
StopINtrue: Stop user audio, false: Receive user audio
Return

IThunderEngine::setAudioVolumeIndication

virtual int Thunder::IThunderEngine::setAudioVolumeIndication(int interval, int smooth);

Enable volume indication for speaker. This method allows SDK to return current speaker and speaker volume to application programs regularly.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called.
  • After this method is called, an onPlayVolumeIndication notification will be received once anyone speaks in the room
  • The volume carried in the notification does not include sound volume collected by the local microphone or played by files.
Parameter
ParameterTypeDescription
intervalINNotification interval. The default value is 0
<=0: The volume prompt is disabled
>0: Notification interval, unit: ms (a value greater than 200 is recommended)
smoothINSmooth coefficient, not realized currently
Return

IThunderEngine::enableLoopbackRecording

virtual int Thunder::IThunderEngine::enableLoopbackRecording(bool enabled);

Enable/Disable graphic card collection.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called.
Parameter
ParameterTypeDescription
enabledINtrue: Start graphic card collection; false: Stop graphic card collection
Return

IThunderEngine::startAudioRecording

virtual int Thunder::IThunderEngine::startAudioRecording(const char* fileName,
                                                         AUDIO_RECORDING_FILE_TYPE fileType,
                                                         AUDIO_RECORDING_QUALITY_TYPE quality);

Start audio recording.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
fileNameINRecording file name (complete path, not including filename extension, the filename extension is generated based on fileType)
fileTypeINFile format. For details about the parameter value, see Thunder::AUDIO_RECORDING_FILE_TYPE.
qualityINRecording quality. For details about the parameter value, see Thunder::AUDIO_RECORDING_QUALITY_TYPE.
Return

IThunderEngine::stopAudioRecording

virtual int Thunder::IThunderEngine::stopAudioRecording();

Stop audio recording.

Note:

  • This API should be called after initialization (initialize).
Return

IThunderEngine::adjustRecordingSignalVolume

virtual int Thunder::IThunderEngine::adjustRecordingSignalVolume(int volume);

Set recording volume.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
volumeINVolume range, which is [0--400.]
Return

IThunderEngine::adjustPlaybackSignalVolume

virtual int Thunder::IThunderEngine::adjustPlaybackSignalVolume(int volume);

Set playing volume.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
volumeINVolume range, which is [0--400.]
Return

IThunderEngine::getAudioDeviceMgr

virtual Thunder::IAudioDeviceManager* Thunder::IThunderEngine::getAudioDeviceMgr();

Obtain the instance object of the audio device management interface.

Note:

  • This API should be called after initialization (initialize).
Return

IThunderEngine::registerAudioFrameObserver

virtual int Thunder::IThunderEngine::registerAudioFrameObserver(IAudioFrameObserver* observer);

Register audio frame data observer IAudioFrameObserver.

Note:

  • This API should be called after initialization (initialize).
  • The user must inherit the IAudioFrameObserver interface class and implement the virtual methods. These methods will be used to call related original audio data.
Parameter
ParameterTypeDescription
observerINPointer of the IAudioFrameObserver interface class Registration is canceled if it is set to null.
Return

IThunderEngine::setRecordingAudioFrameParameters

virtual int Thunder::IThunderEngine::setRecordingAudioFrameParameters(int sampleRate,
 int channel,
 ThunderAudioRawFrameOperationMode mode,
 int samplesPerCall);

Set the mode for using raw audio recording data during callback onRecordAudioFrame

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
sampleRateINSampling rate
channelINAudio track; 1: Single track; 2: dual track
modeINMode of using onRecordAudioFrame. For details about the parameter value, see Thunder::ThunderAudioRawFrameOperationMode.
samplesPerCallINSpecify sampling point number for data return in onRecordAudioFrame , e.g. 1024 in transcoding publish stream. samplesPerCall = (int)(sampleRate × sampleInterval), in which: sampleInterval ≥ 0.01, in seconds.
Return

IThunderEngine::setPlaybackAudioFrameParameters

virtual int Thunder::IThunderEngine::setPlaybackAudioFrameParameters(int sampleRate,
 int channel,
 ThunderAudioRawFrameOperationMode mode,
 int samplesPerCall);

Set the mode for using raw audio playback data during callback onPlaybackAudioFrame

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
sampleRateINSampling rate
channelINAudio track; 1: Single track; 2: dual track
modeINMode of using onPlaybackAudioFrame. For details about the parameter value, see Thunder::ThunderAudioRawFrameOperationMode.
samplesPerCallINSampling number of returned data in specified onPlaybackAudioFrame. For example, the value is 1024 in transcoding and stream publishing. samplesPerCall = (int)(sampleRate × sampleInterval), in which: sampleInterval ≥ 0.01, in seconds.
Return

IThunderEngine::setLogFilePath

virtual int Thunder::IThunderEngine::setLogFilePath(const char* filePath);

Set directory for SDK to output log files.

Note:

  • Ensure that the specified directory has write permission.
Parameter
ParameterTypeDescription
filePathINComplete list of log files
Return

IThunderEngine::setLogLevel

virtual int Thunder::IThunderEngine::setLogLevel(LOG_FILTER filter);

Set the log storage level. Logs with lower level (LogLevel) will be filtered. Only logs with the log level indicated by this value or higher than this value are recorded.

Parameter
ParameterTypeDescription
filterINFor details about the log filtering level, see Thunder::LOG_FILTER.
Return

IThunderEngine::registerVideoFrameObserver

virtual int Thunder::IThunderEngine::registerVideoFrameObserver(IVideoFrameObserver* observer);

Register video frame data observer IVideoFrameObserver.

Note:

  • This API should be called after initialization (initialize).
  • The user must inherit the IVideoFrameObserver interface class and implement the virtual methods. These methods will be used to call related original video data.
Parameter
ParameterTypeDescription
observerINPointer of the IVideoFrameObserver interface class Registration is canceled if it is set to null.
Return

IThunderEngine::getVideoDeviceMgr

virtual Thunder::IVideoDeviceManager* Thunder::IThunderEngine::getVideoDeviceMgr();

Register video frame data observer IVideoFrameObserver.

Note:

  • This API should be called after initialization (initialize).
Return

IThunderEngine::setVideoEncoderConfig

virtual int Thunder::IThunderEngine::setVideoEncoderConfig(const VideoEncoderConfiguration& config);

Set video encoding configuration. Detailed description:

  • SDK will acquire specific video encoding parameters for video encoding from the configured server in accordance with parameter configuration. If the service entails special parameter demand for video encoding, contact Technical Support for personalized configuration.
  • If the video has been published, update the video encoding parameters. The updated video effect can be seen from local review and remote subscription.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
configINSpecific code configuration. For details about the parameter value, see Thunder::VideoEncoderConfiguration.
Return

IThunderEngine::setLocalVideoCanvas

virtual int Thunder::IThunderEngine::setLocalVideoCanvas(const VideoCanvas& canvas);

Set the rendering view of the local video.

  • You can preview and publish without setting this window.
  • You can see locally captured pictures by setting this window.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
canvasINReference of rendering object VideoCanvas
Return

IThunderEngine::setRemoteVideoCanvas

virtual int Thunder::IThunderEngine::setRemoteVideoCanvas(const VideoCanvas& canvas);

Set the rendering view of the remote video.

  • You can subscribe without setting this window.
  • After setting of this window, you can see video view of corresponding user through remote subscription.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
canvasINReference of rendering object VideoCanvas
Return

IThunderEngine::setLocalCanvasScaleMode

virtual int Thunder::IThunderEngine::setLocalCanvasScaleMode(VideoRenderMode mode);

Set local view display mode.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
modeINRendering mode. For details about the parameter value, see Thunder::VideoRenderMode
Return

IThunderEngine::setRemoteCanvasScaleMode

virtual int Thunder::IThunderEngine::setRemoteCanvasScaleMode(VideoRenderMode mode);

Set the remote play type.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
modeINRendering mode. For details about the parameter value, see Thunder::VideoRenderMode
Return

IThunderEngine::startVideoPreview

virtual int Thunder::IThunderEngine::startVideoPreview();

Start camera video preview.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
modeINRendering mode. For details about the parameter value, see Thunder::VideoRenderMode
Return

IThunderEngine::stopVideoPreview

virtual int Thunder::IThunderEngine::stopVideoPreview();

Stop camera video preview.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
modeINRendering mode. For details about the parameter value, see Thunder::VideoRenderMode
Return

IThunderEngine::enableLocalVideoCapture

virtual int Thunder::IThunderEngine::enableLocalVideoCapture(bool enabled);

Enable/Disable local video capture.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
enabledINtrue: Enable local video capture;
false: Disable local video capture
Return

IThunderEngine::stopLocalVideoStream

virtual int Thunder::IThunderEngine::stopLocalVideoStream(bool stop);

Enable/Disable local video sending.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
StopINTrue: Disable local video sending; false: Enable local video sending
Return

IThunderEngine::stopRemoteVideoStream

virtual int Thunder::IThunderEngine::stopRemoteVideoStream(const char* uid, bool stop);

Stop/Receive designated remote video.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called
  • Determine whether to receive or disable remote users. Check the value of this function first. If no value is found, use the value of stopAllRemoteVideoStreams
Parameter
ParameterTypeDescription
uidINUser id
StopINtrue: Stop remote video of a specified user; false: Receive remote video of a specified user
Return

IThunderEngine::stopAllRemoteVideoStreams

virtual int Thunder::IThunderEngine::stopAllRemoteVideoStreams(bool stop);

Stop/Receive all remote videos.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called.
  • Determine whether to receive or disable remote users. Check the value of stopRemoteVideoStream first. If no value is found, use the value of this function
Parameter
ParameterTypeDescription
StopINtrue: Stop all remote video; false; Receive all remote video. The default value is false

Return

IThunderEngine::setLocalVideoMirrorMode

virtual int Thunder::IThunderEngine::setLocalVideoMirrorMode(ThunderVideoMirrorMode mode);

Set local video mirror mode

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called.
  • Set the mirror mode for local preview and that visible to viewers respectively.
Parameter
ParameterTypeDescription
modeINMirror mode. For details about the parameter value, see Thunder::ThunderVideoMirrorMode
Return

IThunderEngine::setVideoWatermark

virtual int Thunder::IThunderEngine::setVideoWatermark(const Thunder::ThunderBoltImage& watermark);

Add local video watermark.

Note:

  • This API should be called after initialization (initialize).
  • Currently, only one watermark is supported. A newly added watermark will replace the existing one.
  • Only 24-bit and 32-bit pictures are supported. SDK will transform the pictures to the configured width.
Parameter
ParameterTypeDescription
watermarkINReference of watermark picture object to be added to local live streaming push. For details about the picture format, see Thunder::ThunderBoltImage
Return

IThunderEngine::removeVideoWatermarks

virtual int Thunder::IThunderEngine::removeVideoWatermarks();

Remove the local video watermark added.

Note:

  • This API should be called after initialization (initialize).
Return

IThunderEngine::setCustomAudioSource

virtual int Thunder::IThunderEngine::setCustomAudioSource(bool bEnable, CustomAudioOptions& option);

Set parameters for external audio capture.

Note:

Parameter
ParameterTypeDescription
bEnableINtrue: enable external audio capture
false: disable external audio capture (by default)
optionINExternal audio capture parameter. It is the reference of CustomAudioOptions
Return

IThunderEngine::pushCustomAudioFrame

virtual int Thunder::IThunderEngine::pushCustomAudioFrame(const char* pData, unsigned dataLen, unsigned timeStamp);

Push external audio frame.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
pDataINPCM audio frame data
dataLenINData length
timeStampINCapture timestamp
Return

IThunderEngine::setCustomVideoSource

virtual int Thunder::IThunderEngine::setCustomVideoSource(bool bEnable, CustomVideoOptions& option)

Set parameters for external video capture.

Note:

Parameter
ParameterTypeDescription
bEnableINtrue: enable external audio capture
false: disable external audio capture (by default)
optionINExternal video capture parameter. It is the reference of CustomVideoOptions
Return

IThunderEngine::pushCustomVideoFrame

virtual int Thunder::IThunderEngine::pushCustomVideoFrame(const unsigned char* yuv[3], int linesize[3], unsigned timestamp);

Push external video frame.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
yuvINYUV video data
linesizeINLine size of the buffer zone in YUV data
timestampINCapture timestamp
Return

IThunderEngine::addPublishOriginStreamUrl

virtual int Thunder::IThunderEngine::addPublishOriginStreamUrl(const char* url);

Add the source stream publishing address.

  • After this interface is called, the server will push source streams to the matching URL after publishing starts. Only one-channel stream publishing address can be added each time by this method. If multi-channel streams need to be pushed, this method have to be called repeatedly.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
  • A maximum of 5 addresses are supported for stream publishing
Parameter
ParameterTypeDescription
urlINStream publishing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: Some CDN manufacturers may not support the 512 bytes, for instance, Aliyun supports merely 256 bytes.
Return

IThunderEngine::removePublishOriginStreamUrl

virtual int Thunder::IThunderEngine::removePublishOriginStreamUrl(const char* url);

Remove the source stream publishing address.

Parameter
ParameterTypeDescription
urlINStream publishing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: Some CDN manufacturers may not support the 512 bytes, for instance, Aliyun supports merely 256 bytes.
Return

IThunderEngine::setLiveTranscodingTask

virtual int Thunder::IThunderEngine::setLiveTranscodingTask(const char* taskId, const LiveTranscoding& transcodingCfg);

Add/update transcoding task.

  • After this interface is called, the server will perform transcoding and push streams (if any) according to the configured canvas. Application programs must specify taskIds to distinguish different transcoding tasks.
  • During transcoding, this interface can be repeatedly called to update transcoding parameters.
  • One room supports a maximum of 5 transcoding tasks.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
taskIdINTranscoding task ID, which is unique in a room and is managed by users
transcodingCfgINSpecific transcoding layout. For details, see Thunder::LiveTranscoding
Return

IThunderEngine::removeLiveTranscodingTask

virtual int Thunder::IThunderEngine::removeLiveTranscodingTask(const char* taskId);

Remove a transcoding task.

  • After this interface is called, Jocloud background will terminate and delete stream mixing tasks.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
taskIdINTranscoding task ID, which is unique in a room and is managed by users
Return

IThunderEngine::addPublishTranscodingStreamUrl

virtual int Thunder::IThunderEngine::addPublishTranscodingStreamUrl(const char* taskId, const char* url);

Add a stream publishing address of a transcoding stream.

  • After this interface is called, the specified stream mixing will be pushed to the specified CDN address. Only one-channel stream publishing address can be added each time by this method. If multi-channel streams need to be pushed, this method have to be called repeatedly.
  • One transcoding task supports a maximum of 5 addresses for stream publishing

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
taskIdINTranscoding task ID
urlINStream publishing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: Some CDN manufacturers may not support the 512 bytes, for instance, Aliyun supports merely 256 bytes.
Return

IThunderEngine::removePublishTranscodingStreamUrl

virtual int Thunder::IThunderEngine::removePublishTranscodingStreamUrl(const char* taskId, const char* url);

Remove stream publishing address for transcoding stream.

  • After this interface is called, the specified mixed stream will not be pushed to the specified CDN address.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
taskIdINTranscoding task ID
urlINStream publishing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: Some CDN manufacturers may not support the 512 bytes, for instance, Aliyun supports merely 256 bytes.
Return

IThunderEngine::addSubscribe

virtual int Thunder::IThunderEngine::addSubscribe(const char* roomId, const char* uid);

Subscribe to specific streams (cross-room).

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
roomIdINRoom ID [which only supports the permutation and combination of characters such as [A,Z],[a,z],[0,9],-,_, with the length of not more than 64 bytes]
uidINUser ID
Return

IThunderEngine::removeSubscribe

virtual int Thunder::IThunderEngine::removeSubscribe(const char* roomId, const char* uid);

Unsubscribe specified streams.

  • After this interface is called, the specified mixed stream will not be pushed to the specified CDN address.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
roomIdINRoom ID [which only supports the permutation and combination of characters such as [A,Z],[a,z],[0,9],-,_, with the length of not more than 64 bytes]
uidINUser ID
Return

IThunderEngine::enableWebSdkCompatibility

virtual int Thunder::IThunderEngine::enableWebSdkCompatibility(bool enabled);

Enable/Disable WebSDK compatibility.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called
  • This method is applicable only to the live streaming scenario. Microphone connection is compatible with Web SDK by default, without calling this method.
  • Enable compatibility with WebSDK in live streaming. This interface must be called before publishing, which is irrelevant with entering or leaving the room.
Parameter
ParameterTypeDescription
enabledINWhether compatibility is enabled. Disabled by default
Return

IThunderEngine::sendUserAppMsgData

virtual int Thunder::IThunderEngine::sendUserAppMsgData(const char* msgData);

Send custom broadcast message of service.

This interface sends messages via media UDP channel with features of low-lantency and unreliability. Specified constraints are as follows:

  • The sender must join the room.
  • Call the interface after successfully opening microphone (messages cannot be sent if there are only audiences or broadcast authentication is failed).
  • This interface should be called with a frequency of less than twice each second. msgData should not exceed 200 bytes.
  • msg will be dropped if any of the conditions above is not met.
  • The messages cannot be guaranteed to be delivered to all online users in room, and cannot be guaranteed be delivered in order.
  • Monitor and notify causes for failure in sending customized broadcast messages through onSendAppMsgDataFailedStatus.
  • Monitor customized broadcast messages sent from other users through onRecvUserAppMsgData.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
msgDataINService customized broadcast message
Return

IThunderEngine::sendMediaExtraInfo

virtual int Thunder::IThunderEngine::sendMediaExtraInfo(const char* extraData);

Send media extra information (audio/video has been published). Usage description:

  • The sender must join the room, and call it after successfully publishing audio.
  • Audio publishing only: This interface is called every 100 ms at best. The media extra information cannot exceed 200 bytes.
  • Video publishing: The call frequency cannot exceed the frame rate. The media extra information cannot exceed 2048 bytes.
  • For example: Stream publishing applies default frame rate of 15 FPS, that is, the calling frequency cannot exceed 66.7 ms/time (1000/15).
  • Packet loss may occur.
  • SDK will try to call back media data at the time when related frames are played.
  • Monitor causes for failure in sending media extra information through onSendMediaExtraInfoFailedStatus.
  • Monitor media extra information sent from other users through onRecvMediaExtraInfo.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
extraDataINMedia extra information
Return

IThunderEngine::enableMixVideoExtraInfo

virtual int Thunder::IThunderEngine::enableMixVideoExtraInfo(bool enabled);

Enable video mixing with media extra information.

Note:

  • This interface is called only if you need to join a room (joinRoom). The configuration will be cleaned after you leave the room.
Parameter
ParameterTypeDescription
enabledINThe default value is false. true: Enable video mixing with media extra information; false: Disable video mixing with media extra information.
Return

IThunderEngine::startScreenCaptureForHwnd

virtual int Thunder::IThunderEngine::startScreenCaptureForHwnd(HWND hWnd, const RECT* pRect);

Start capturing specific screen.

Parameter
ParameterTypeDescription
hWndINWindow handle
pRectINSub region captured from a window. The coordinates are relative values. The coordinate of the point in the upper left corner is (0,0). The entire window is captured if the value is NULL.
Return

IThunderEngine::startScreenCaptureForScreen

virtual int Thunder::IThunderEngine::startScreenCaptureForScreen(int screenId = 0, const RECT* pRect);

Start capturing specific region on desktop.

Parameter
ParameterTypeDescription
screenIdINMonitor ID
pRectINSub region specified for capturing. The coordinate is a relative value of the monitor. The entire monitor screen is captured when this parameter is set to NULL.
Return

IThunderEngine::updateScreenCaptureRect

virtual int Thunder::IThunderEngine::updateScreenCaptureRect(const RECT* pRect);

Update the displayed region for capturing.

Parameter
ParameterTypeDescription
pRectINSub region specified for capturing. The coordinate is a relative value of the monitor or screen. The entire monitor screen or window is captured when this parameter is set to NULL.
Return

IThunderEngine::stopScreenCapture

virtual int Thunder::IThunderEngine::stopScreenCapture();

Stop capturing the desktop or window.

Return

IThunderEngine::pauseScreenCapture

virtual int Thunder::IThunderEngine::pauseScreenCapture();

Pause capturing the desktop or window.

Return

IThunderEngine::resumeScreenCapture

virtual int Thunder::IThunderEngine::resumeScreenCapture(const char* roomId, const char* uid);

Resume capturing the desktop or window.

Return

IThunderEngine::registerVideoCaptureObserver

virtual int Thunder::IThunderEngine::registerVideoCaptureObserver(IVideoCaptureObserver* observer);

Register observer object for collecting data of camera.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
observerINPointer of the IVideoCaptureObserver object. If observer is NULL, monitoring is canceled.
Return

IThunderEngine::registerMediaExtraInfoObserver

virtual int Thunder::IThunderEngine::registerMediaExtraInfoObserver(IThunderMediaExtraInfoObserver* observer);

Register the observer object of media extra information.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
observerINPointer of the IThunderMediaExtraInfoObserver object. If observer is NULL, monitoring is canceled.
Return

IThunderEngine::createThunderAudioPlayer

virtual IThunderAudioPlayer* Thunder::IThunderEngine::createThunderAudioPlayer();

Create an object for audio file player. For details, see IThunderAudioPlayer.

Return
  • IThunderAudioPlayer*: Pointer of the audio file player object
  • NULL: Creating audio file player failed.

IThunderEngine::destroyThunderAudioPlayer

virtual int Thunder::IThunderEngine::destroyThunderAudioPlayer(IThunderAudioPlayer* player);

Destroy audio file player.

Parameter
ParameterTypeDescription
playerINPointer of the IThunderAudioPlayer object
Return

IThunderEngine::getVideoEncoderParam

virtual int getVideoEncoderParam(const VideoEncoderConfiguration& configIn, ThunderVideoEncodeParam& paramOut);

Get encoding parameters by video encoding configuration.

Parameter
ParameterTypeDescription
configInINVideoEncoderConfiguration Encoding configuration
paramOutOUTThunderVideoEncodeParam Encoding parameters
Return

IThunderEngine::getConnectionStatus

virtual ThunderConnectionStatus getConnectionStatus();

Get the current network connection status.

Return

IThunderEngine::enableCaptureVolumeIndication

virtual int enableCaptureVolumeIndication(int interval, int moreThanThd, int lessThanThd, int smooth);

Enable callback of volume capture.

Parameter
ParameterTypeDescription
intervalIN<=0: disable volume prompt >0: callback interval, unit: millisecond
moreThanThdINcall back when =moreThanThd; <=0 invalid
lessThanThdINcall back when >=lessThanThd to <lessThanThd; <=0 invalid
smoothINReserved
Return

IThunderEngine::checkFeatureSupport

virtual bool checkFeatureSupport(FEATURE_SUPPORT flag);

Whether it support a specific feature.

Parameter
ParameterTypeDescription
flagINFEATURE_SUPPORT a specific feature, for example, check whether it supports capturing Magnification API by calling FEATURE_SUPPORT_MAGAPI.
Return
  • true: support
  • false: not support

IThunderEngine::setCaptureExcludeWindowList

virtual int setCaptureExcludeWindowList(HWND* wndList, int count);

List of windows to be excluded when setting screen capture.

Caution:

  • Call this API after calling checkFeatureSupport to check whether it supports filtering windows.
Parameter
ParameterTypeDescription
wndListINList of windows to be excluded
countINNumber of windows to be excluded
Return


IThunderEngine::enableVoiceReverb

virtual int enableVoiceReverb(bool enabled);

Enable/disable local voice reverberation.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledIN"true"-enable, "false"-disable (default)
Return

IThunderEngine::setReverbParameter

virtual int setReverbParameter(const ReverbParameter& parameter);

Sets the local voice reverberation parameters.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
parameterINReverberation parameters
Return

IThunderEngine::enableLimiter

virtual int enableLimiter(bool enabled);

Enable/disable the limiter.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledIN"true"-enable, "false"-disable (default)
Return

IThunderEngine::setLimiterParameter

virtual int setLimiterParameter(const LimiterParameter& parameter);

Set limiter parameters.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
parameterINLimiter parameters, see details in LimiterParameter
Return
  • 0: Success
  • <0: Failure. For return code details, see details in enum ThunderRet.

IThunderEngine::enableEqualizer

virtual int enableEqualizer(bool enabled);

Enable or disable the equalizer.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledIN"true"-enable, "false"-disable(default)
Return
  • 0: Success
  • <0: Failure. For return code details, see details in enum ThunderRet.

IThunderEngine::setEqualizerParameter

virtual int setEqualizerParameter(const EqualizerParameter& parameter);

Set equalizer parameters.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
parameterINEqualizer parameters, see details in EqualizerParameter
Return
  • 0: Success
  • <0: Failure. For return code details, see details in enum ThunderRet.

IThunderEngine::setVoicePitch

virtual int setVoicePitch(float pitch);

Set voice pitch parameters.

Note:

  • This API should be called after initialization and reset by calling destroyEngine.
  • The samller the value, the lower the pitch.
Parameter
ParameterTypeDescription
pitchINVoice pitch, range: [-12, 12], default: 0
Return

IThunderEngine::enableHowlingDetector

virtual int enableHowlingDetector(bool enabled);

Enable or disable howling detection.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledINWhether to enable howling detection: "true"-enable, "false"(default)-disable
Return

IThunderEngine::enableEchoDetector

virtual int enableEchoDetector(bool enabled);

Enable/disable echo detection.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledINWhether to enable echo detection: "true"-enable, "false"(default)-disable
Return

IAudioDeviceManager

IAudioDeviceManager::enumInputDevices

virtual int Thunder::IAudioDeviceManager::enumInputDevices(AudioDeviceList& devices);

Enumerate audio input devices.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
devicesOUTInformation about the audio device. For details, see AudioDeviceList
Return

IAudioDeviceManager::setInputtingDevice

virtual int Thunder::IAudioDeviceManager::setInputtingDevice(GUID& id);

Set audio input devices.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
idINUnique descriptor for a device
Return

IAudioDeviceManager::getInputtingDevice

virtual int Thunder::IAudioDeviceManager::getInputtingDevice(GUID& id);

Obtain the currently selected input device.

Note:

This API should be called after initialization (initialize).

Parameter
ParameterTypeDescription
idOUTUnique descriptor for a device
Return

IAudioDeviceManager::setInputtingVolume

virtual int Thunder::IAudioDeviceManager::setInputtingVolume(int volume);

Set the volume of the current audio input device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
volumeINVolume value [0-400]
Return

IAudioDeviceManager::getInputtingVolume

virtual int Thunder::IAudioDeviceManager::getInputtingVolume(int volume);

Obtain the volume of the current audio input device.

Note:

  • This API should be called after initialization initialize.
Parameter
ParameterTypeDescription
volumeOUTVolume value [0-400]
Return

IAudioDeviceManager::setInputtingMute

virtual int Thunder::IAudioDeviceManager::setInputtingMute(bool mute);

Mute the current audio input device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
muteINtrue: mute; false: unmute
Return

IAudioDeviceManager::getInputtingMute

virtual int Thunder::IAudioDeviceManager::getInputtingMute(bool& mute);

Obtain the mute status of the current audio input device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
muteOUTtrue: mute; false: unmute
Return

IAudioDeviceManager::startInputDeviceTest

virtual int Thunder::IAudioDeviceManager::startInputDeviceTest(int indicationInterval);

Start testing the current audio input device.

Note:

  • This API should be called after initialization (initialize).
  • After calling this interface, you will receive an onInputVolume notification.
Parameter
ParameterTypeDescription
indicationIntervalINCheck interval. The default value is 0.
Return

IAudioDeviceManager::stopInputDeviceTest

virtual int Thunder::IAudioDeviceManager::stopInputDeviceTest();

Stop testing the current audio input device.

Note:

  • This API should be called after initialization (initialize).
Return

IAudioDeviceManager::enumOutputDevices

virtual int Thunder::IAudioDeviceManager::enumOutputDevices(AudioDeviceList& devices);

Enumerate audio playback devices.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
devicesOUTList of audio playback devices. For details, see AudioDeviceList.
Return

IAudioDeviceManager::setOutputtingDevice

virtual int Thunder::IAudioDeviceManager::setOutputtingDevice(GUID& id);

Specify the audio playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
idINUnique descriptor for a device
Return

IAudioDeviceManager::getOutputtingDevice

virtual int Thunder::IAudioDeviceManager::getOutputtingDevice(GUID& id);

Obtain the current audio playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
idOUTUnique descriptor for a device
Return

IAudioDeviceManager::setOuttingVolume

virtual int Thunder::IAudioDeviceManager::setOuttingVolume(int volume);

Set the volume of the current playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
volumeINVolume value [0-100]
Return

IAudioDeviceManager::getOuttingVolume

virtual int Thunder::IAudioDeviceManager::getOuttingVolume(int& volume);

Obtain the volume of the current playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
volumeOUTVolume value [0-100]
Return

IAudioDeviceManager::setOutputtingMute

virtual int Thunder::IAudioDeviceManager::setOutputtingMute(bool mute);

Mute/Unmute the current playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
muteINtrue: mute; false: unmute
Return

IAudioDeviceManager::getOutputtingMute

virtual int Thunder::IAudioDeviceManager::getOutputtingMute(bool& mute);

Obtain the mute status of the current playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
muteOUTtrue: mute;
false: unmute
Return

IAudioDeviceManager::startOutputDeviceTest

virtual int Thunder::IAudioDeviceManager::startOutputDeviceTest(int indicationInterval, const char* audioFileName);

Start testing the current playback device.

Note:

Parameter
ParameterTypeDescription
indicationIntervalINCheck interval. The default value is 0.
audioFileNameINFull path of the audio file that is played. Win7 and higher support mp3, aac, and wave formats while versions earlier than Win7 support only the wav format.
Return

IAudioDeviceManager::stopOutputDeviceTest

virtual int Thunder::IAudioDeviceManager::stopOutputDeviceTest();

Stop testing the current audio playback device.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
roomIdINRoom ID [which only supports the permutation and combination of characters such as [A,Z],[a,z],[0,9],-,_, with the length of not more than 64 bytes]
uidINUser ID
Return

IAudioDeviceManager::enableMicEnhancement

virtual int Thunder::IAudioDeviceManager::enableMicEnhancement(bool enabled);

Enable/Disable microphone enhancement.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called
Parameter
ParameterTypeDescription
enabledINtrue: Enable microphone enhancement; false: Disable microphone enhancement. The default value is false.
Return

IAudioDeviceManager::enableMicDenoise

virtual int Thunder::IAudioDeviceManager::enableMicDenoise(bool enabled);

Enable/Disable microphone noise reduction.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called
Parameter
ParameterTypeDescription
enabledINtrue: Enable microphone noise reduction; false: Disable microphone noise reduction. The default value is false.
Return

IAudioDeviceManager::enableAEC

virtual int Thunder::IAudioDeviceManager::enableAEC(bool enabled);

Enable/Disable AEC.

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called
Parameter
ParameterTypeDescription
enabledINtrue: Enable AEC; false: Disable AEC. The default value is false.
Return

IAudioDeviceManager::enableAGC

virtual int Thunder::IAudioDeviceManager::enableAGC(bool enabled);

Enable/Disable Automatic Gain Control (AGC).

Note:

  • This API should be called after initialization (initialize). This interface is reset only when destroyEngine is called
Parameter
ParameterTypeDescription
enabledINtrue: Enable AEC; false: Disable AEC. The default value is false.
Return

IThunderAudioPlayer

IThunderAudioPlayer::open

virtual bool Thunder::IThunderAudioPlayer::open(const char* path);

Open a specified file.

Parameter
ParameterTypeDescription
pathAbsolute file path
Return
  • true: Opening file succeeded
  • false: Opening file failed

IThunderAudioPlayer::close

virtual void Thunder::IAudioDeviceManager::close();

Close the current file.


IThunderAudioPlayer::play

virtual void Thunder::IAudioDeviceManager::play();

Play a file that has been opened.

Note:

  • Before playing a file, call IThunderAudioPlayer::open to open it first.

IThunderAudioPlayer::stop

virtual void Thunder::IAudioDeviceManager::stop();

Stop playing.


IThunderAudioPlayer::pause

virtual void Thunder::IAudioDeviceManager::pause();

Pause playing a file that has been opened.


IThunderAudioPlayer::resume

virtual void Thunder::IAudioDeviceManager::resume();

Pause playing a file that has been opened.


IThunderAudioPlayer::seek

virtual void Thunder::IAudioDeviceManager::seek(unsigned int timeMS);

Jump to a specified time for play.

Note:

  • Ensure that the file is in playback state.
  • The value cannot be greater than that obtained by getTotalPlayTimeMS.
Parameter
ParameterTypeDescription
timeMSINSpecified time, unit: ms

IThunderAudioPlayer::getTotalPlayTimeMS

virtual unsigned int Thunder::IAudioDeviceManager::getTotalPlayTimeMS();

Get the total play time of files.

Note:

  • Call IThunderAudioPlayer::open to open the file first.
Return
  • Total duration for playing a file

IThunderAudioPlayer::getCurrentPlayTimeMS

virtual unsigned int Thunder::IAudioDeviceManager::getCurrentPlayTimeMS();

Get the time which has been played.

Note:

  • Call IThunderAudioPlayer::open to open the file and play it.
Return
  • Played duration

IThunderAudioPlayer::setPlayerLocalVolume

virtual int Thunder::IAudioDeviceManager::setPlayerLocalVolume(int volume);

Adjusts volume size when music files are played on local end.

Parameter
ParameterTypeDescription
volumeINPlay volume [0-100]
Return

IThunderAudioPlayer::setPlayerPublishVolume

virtual int Thunder::IAudioDeviceManager::setPlayerPublishVolume(int volume);

Adjust the publish volume of the music file.

Parameter
ParameterTypeDescription
volumeINPlay volume [0-100]
Return

IThunderAudioPlayer::getPlayerLocalVolume

virtual int Thunder::IAudioDeviceManager::getPlayerLocalVolume();

Get the local volume of music files. The value matches that configured by setPlayerLocalVolume. The range is [0-100].

Note:

  • Call IThunderAudioPlayer::open to open the file and play it.
Return
  • Volume of the music file when played locally

IThunderAudioPlayer::getPlayerPublishVolume

virtual int Thunder::IAudioDeviceManager::getPlayerPublishVolume();

Obtain the publish volume of the music file. The value matches that configured by setPlayerPublishVolume. The range is [0-100].

Note:

  • Call IThunderAudioPlayer::open to open the file and play it.
Return
  • Publish volume of the music file

IThunderAudioPlayer::setLooping

virtual int Thunder::IAudioDeviceManager::setLooping(int cycle);

Sets times of loop playbacks.

Parameter
ParameterTypeDescription
cycleIN-1: indicates infinite loop; 0: No loop (default value); Positive integer: Loop times
Return

IThunderAudioPlayer::setSemitone

virtual void setSemitone(int val);

Set the audio playback tone.

Prameters
ParameterTypeDescription
valINTone value: -5, -4, -3, -2, -1, 0(normal), 1, 2, 3, 4, 5

IThunderAudioPlayer::setTempo

virtual void setTempo(float val);

Set the audio playback speed.

Parameter
ParameterTypeDescription
valINSpeed: 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0

IThunderAudioPlayer::setPosition

virtual void setPosition(int azimuth);

Set the audio playback direction.

Parameter
ParameterTypeDescription
azimuthINPlayback direction,-90~90

IThunderAudioPlayer::SetFilePlayerNotify

virtual void Thunder::IAudioDeviceManager::void SetFilePlayerNotify(IThunderAudioPlayerNotify* notify);

Set playback callback.

Parameter
ParameterTypeDescription
notifyINInterface class of the playback callback. For details, see IThunderAudioPlayerNotify.

IVideoDeviceManager

IVideoDeviceManager::enumVideoDevices

virtual int Thunder::IVideoDeviceManager::enumVideoDevices(VideoDeviceList& devices);

Enumerate video input devices.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
devicesOUTList of video input devices. For details, see VideoDeviceList.
Return

IVideoDeviceManager::startVideoDeviceCapture

virtual int Thunder::IVideoDeviceManager::startVideoDeviceCapture(int index);

Start the video input device and initiate collection.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
indexINDevice index
Return

IVideoDeviceManager::stopVideoDeviceCapture

virtual int Thunder::IVideoDeviceManager::stopVideoDeviceCapture();

Stop video device capture.

Note:

  • This API should be called after initialization (initialize).
Return

IVideoDeviceManager::enumMonitorDevices

virtual int Thunder::IVideoDeviceManager::enumMonitorDevices(MonitorDeviceList& devices);

Enumerate monitor input devices.

Note:

  • This API should be called after initialization (initialize).
Parameter
ParameterTypeDescription
devicesOUTReturned list of video input devices. For details, see MonitorDeviceList.
Return

IVideoDeviceManager::startDeviceTest

virtual int startDeviceTest(int index, HWND hwnd);

Start testing the video capture device.

Note:

  • Ather start testing the video capture device by calling this API, you should stop the test by calling stopDeviceTest; and it cannot be called with startVideoDeviceCapture to open the same device.
Parameter
ParameterTypeDescription
deviceIdxINVideo device No.,which can be obtained by calling enumVideoDevices
hwndINvideo rendering window, which cannot be set to NULL, otherwise, error code may be returned
Return

IVideoDeviceManager::stopDeviceTest

virtual int stopDeviceTest();

Stop video capture device test.

Note:

  • You can call this API stop testing video devices after calling startDeviceTest.
Return

IVideoDeviceManager::getVideoDeviceCapture

virtual int getVideoDeviceCapture(int& deviceIdx);

Get video device No.

Note:

  • This API should be called after initialization.
Parameter
ParameterTypeDescription
deviceIdxOUTVideo device No., see details in enumVideoDevices
Return

Enumerations & Structure

AREA_TYPE

enum Thunder::AREA_TYPE

Area type

Enumeration ValuesDescription
AREA_DEFAULT(0)Domestic, default value
AREA_FOREIGN(1)Overseas
AREA_RESERVED(2)Reserved

THUNDER_PROFILE

enum Thunder::THUNDER_PROFILE

Media mode

Enumeration ValuesDescription
PROFILE_DEFAULT(0)Default mode (audio/video mode)
PROFILE_NORMAL(1)Audio/video mode
PROFILE_ONLY_AUDIO(2)Audio-only mode, applicable to audio-only optimization

ROOM_CONFIG_TYPE

enum Thunder::ROOM_CONFIG_TYPE

Media mode

Enumeration ValuesDescription
ROOM_CONFIG_LIVE(0)Live streaming mode, where quality is prioritized and delay is large. Applicable to viewer or audience scenario. When audience publishes audio/video and becomes anchors, the value changes to communication mode.
ROOM_CONFIG_COMMUNICATION(1)Communication mode is applicable for 1v1 communication and group conversation due to its short time delay and fluent communication.
ROOM_CONFIG_MultiAudioRoom(4)Audio room mode is applicable for group audio room due to its low time delay and low bandwidth occupied

AUDIO_PROFILE_TYPE

enum Thunder::AUDIO_PROFILE_TYPE

Audio type

Enumeration ValuesDescription
AUDIO_PROFILE_DEFAULT(0)Default type: "NET_AAC_ELD"(default)-sampling rate: 44.1 KHz, dual track, code rate: 40 kbps; 1-audio mode, 3-live streaming mode
AUDIO_PROFILE_SPEECH_STANDARD(1)Specify the sampling rate of 16 KHz. Speech encoding, single sound track, encoding rate of about 18 kbps
AUDIO_PROFILE_MUSIC_STANDARD_STEREO(2)Specify the sampling rate of 44.1 KHz. Music encoding, dual sound tracks, encoding rate of about 24 kbps, high encoding delay
AUDIO_PROFILE_MUSIC_STANDARD(3)Specify the sampling rate of 44.1 KHz. Music encoding, dual sound tracks, encoding rate of about 48 kbps, low encoding delay
AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(4)Specify the sampling rate of 44.1KHz, music encoding, dual track, and encoding rate of around 128kbps
AUDIO_PROFILE_MUSIC_HIGHER_QUALITY = 5Specify the sampling rate of 44.1KHz, music encoding, dual track, and encoding rate of around 192kbps

COMMUT_MODE

enum Thunder::COMMUT_MODE

Interactive mode

Enumeration ValuesDescription
COMMUT_MODE_DEFAULT(0)Default type, which is COMMUT_MODE_DEFAULT.
COMMUT_MODE_HIGH(1)High interactive mode
COMMUT_MODE_LOW(2)Low interactive mode

SCENARIO_MODE

enum Thunder::SCENARIO_MODE

Scenario mode

Enumeration ValuesDescription
SCENARIO_MODE_DEFAULT(0)Default type, which is SCENARIO_MODE_STABLE_FIRST.
SCENARIO_MODE_STABLE_FIRST(1)Smooth is prioritized. Recommended for use in education scenarios that require high stability.
SCENARIO_MODE_QUALITY_FIRST(2)Tone quality is prioritized. Recommended for use in show scenarios where microphone connection is seldom required.

ThunderSourceType

enum Thunder::ThunderSourceType

Audio publishing mode

Enumeration ValuesDescription
THUNDER_AUDIO_MIC(0)Only microphone
THUNDER_AUDIO_FILE(1)Only file
THUNDER_AUDIO_MIX(2)Microphone and file
THUNDER_AUDIO_TYPE_NONE(10)Stop all upstream audio data

AUDIO_RECORDING_FILE_TYPE

enum Thunder::AUDIO_RECORDING_FILE_TYPE

Audio publishing mode

Enumeration ValuesDescription
AUDIO_RECORDING_WAV(0)wav format
AUDIO_RECORDING_AAC(1)aac format
AUDIO_RECORDING_MP3(2)mp3 format

AUDIO_RECORDING_QUALITY_TYPE

enum Thunder::AUDIO_RECORDING_QUALITY_TYPE

Audio publishing mode

Enumeration ValuesDescription
AUDIO_RECORDING_QUALITY_LOW(0)Low tone quality
AUDIO_RECORDING_QUALITY_MEDIUM(1)Mediocre tone quality
AUDIO_RECORDING_QUALITY_HIGH(2)High tone quality

ThunderAudioRawFrameOperationMode

enum Thunder::ThunderAudioRawFrameOperationMode

Audio publishing mode

Enumeration ValuesDescription
THUNDER_AUDIO_RAW_FRAME_OPERATION_MODE_READ_ONLY(1)Read only mode. The user only acquires original data from AudioFrame
THUNDER_AUDIO_RAW_FRAME_OPERATION_MODE_WRITE_ONLY(2)Write only mode. The user replaces data in AudioFrame for encoding transmission of SDK
THUNDER_AUDIO_RAW_FRAME_OPERATION_MODE_READ_WRITE(3)Read-write mode. The user obtains data from AudioFrame and modifies data. Then the data is returned to SDK for encoding and transmission.

LOG_FILTER

enum Thunder::LOG_FILTER

Audio publishing mode

Enumeration ValuesDescription
LOG_LEVEL_TRACE(0)TRACE
LOG_LEVEL_DEBUG(1)DEBUG
LOG_LEVEL_INFO(2)INFO
LOG_LEVEL_WARN(3)WARN
LOG_LEVEL_ERROR(4)ERROR
LOG_LEVEL_RELEASE (10)RELEASE

VideoEncoderConfiguration

struct Thunder::VideoEncoderConfiguration
{
 VideoPublishPlayType playType;
 VideoPublishMode publishMode;
};

Video encoding configuration

MemberDescription
VideoPublishPlayTypePublishing type
VideoPublishModePublishing bracket

ThunderVideoEncodeParam

struct Thunder::ThunderVideoEncodeParam
{
  int width; // Width
  int height; // Height
  int frameRate; // Frame rate
  int codeRate; // Bit rate
};

Video encoding parameters.


VideoPublishPlayType

enum Thunder::VideoPublishPlayType

Audio publishing mode

Enumeration ValuesDescription
VIDEO_PUBLISH_PLAYTYPE_SINGLE(0)Single publishing
VIDEO_PUBLISH_PLAYTYPE_INTERACT(1)Microphone-connection video publishing
VIDEO_PUBLISH_PLAYTYPE_SCREENCAP(2)Screen recording publishing

VideoPublishMode

enum Thunder::VideoPublishMode

Audio publishing mode

Enumeration ValuesDescription
VIDEO_PUBLISH_MODE_DEFAULT(-1)Undefined. The publishing definition is determined by configuration
VIDEO_PUBLISH_MODE_SMOOTH_DEFINITION(1)Fluent
VIDEO_PUBLISH_MODE_NORMAL_DEFINITION(2)Standard definition
VIDEO_PUBLISH_MODE_HIGH_DEFINITION(3)High definition
VIDEO_PUBLISH_MODE_SUPER_DEFINITION(4)Ultra definition
VIDEO_PUBLISH_MODE_BLUERAY(5)Blue light

VideoCanvas

#define MAX_THUNDER_UID_LEN 65 // UID length

struct Thunder::VideoCanvas
{
 HWND hWnd;
 VideoRenderMode renderMode;
 char uid[MAX_THUNDER_UID_LEN];
};

Video encoding configuration

MemberDescription
HWNDVideo rendering window
VideoRenderModeVideo rendering mode
char uid[MAX_THUNDER_UID_LEN]User id

VideoRenderMode

enum Thunder::VideoRenderMode

Video rendering mode

Enumeration ValuesDescription
VIDEO_RENDER_MODE_FILL(0)Pull to full screen
VIDEO_RENDER_MODE_ASPECT_FIT(1)Adapt to window
VIDEO_RENDER_MODE_CLIP_TO_BOUNDS(2)Tailed to full screen

ThunderVideoMirrorMode

enum Thunder::ThunderVideoMirrorMode

Mirror mode for local preview video and stream publishing video

Enumeration ValuesDescription
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_MIRROR_PUBLISH_NO_MIRROR(0)The preview other than stream publishing is mirrored
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_PUBLISH_BOTH_MIRROR(1)Both the preview and stream publishing are mirrored
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_PUBLISH_BOTH_NO_MIRROR(2)Neither the preview nor stream publishing is mirrored
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_NO_MIRROR_PUBLISH_MIRROR(3)The preview other than stream publishing is mirrored

ThunderBoltImage

#define MAX_THUNDER_URL_LEN 512 // url length

struct Thunder::ThunderBoltImage
{
  int x; // Take the upper left corner as the original point, horizontal coordinate
  int y; // Take the upper left corner as the original point, vertical coordinate
  int width; // Width
  int height; // Height
  char url[MAX_THUNDER_URL_LEN]; // Absolute path address or http, https address of local picture
};

Picture information


CustomAudioOptions

struct CustomAudioOptions
{
  int sampleRate; // Sampling rate (48k,44.1,16k,8k)
  int channels; // Audio channel
  int bitpersample; // Bit width of sampling point (currently only 16 available)
  bool bMixSdkCapture; // Whether to synthesize the capture of SDK itself
};

External audio capture parameters


CustomVideoOptions

struct CustomVideoOptions
{
  enum CustomVideoSrcDataType
  {
    DATA_TYPE_I420 = 0,
    DATA_TYPE_NV12 = 1,
    DATA_TYPE_BGR24 = 2,
    DATA_TYPE_BGRA = 3,
  };

  int srcWidth; // Width and height of input source [dynamic update not available]
  int srcHeight; // Height of input source [dynamic update not available]
  int destWidth; // Width and height of output stream [this parameter has been deprecated and needs to be set according to the interface setVideoEncoderConfig]
  int destHeight; // Width and height of output stream [this parameter has been deprecated and needs to be set according to the interface setVideoEncoderConfig]
  int codeRate; // Specific value of bit rate (unit: kbps) [this parameter has been deprecated and needs to be set according to the interface setVideoEncoderConfig]
  CustomVideoSrcDataType srcDataType; // Data type of source stream
};

External video capture parameters.


LiveTranscoding

#define MAX_THUNDER_TRANSCODINGUSER_COUNT 9 // Number of users with maximum image transcoding
#define MAX_THUNDER_ROOMID_LEN 65 // roomId length
#define MAX_THUNDER_UID_LEN 65 // uid length

struct LiveTranscoding
{
  // Audio is unified by default to "encode": 1,"bitrate":128,"sample":44100,"channel":2
  enum TranscodingMode
  {
    TRANSCODING_MODE_320X180 = 1, // "encode":100,"bitrate":150,"fps":15,"gop":30,"height":180,"width":320
    TRANSCODING_MODE_320X240 = 2, // "encode":100,"bitrate":200,"fps":15,"gop":30,"height":240,"width":320
    TRANSCODING_MODE_640X360 = 3, // "encode":100,"bitrate":500,"fps":15,"gop":30,"height":360,"width":640
    TRANSCODING_MODE_640X480 = 4, // "encode":100,"bitrate":500,"fps":15,"gop":30,"height":480,"width":640
    TRANSCODING_MODE_960X544 = 5, // "encode":100,"bitrate":1000,"fps":24,"gop":48,"height":544,"width":960
    TRANSCODING_MODE_1280X720 = 6, // "encode":100,"bitrate":1600,"fps":24,"gop":48,"height":720,"width":1280
    TRANSCODING_MODE_1920X1080 = 7, // "encode":100,"bitrate":4500,"fps":24,"gop":48,"height":1080,"width":1920
  };

  LiveTranscoding() : transcodingMode(0), userCount(0) {}

  int transcodingMode; // Transcoding bracket (enum TranscodingMode)
  int userCount;
  TranscodingUser userList[MAX_THUNDER_TRANSCODINGUSER_COUNT];
  };

struct TranscodingUser
{
 TranscodingUser()
 : bStandard(false)
 , layoutX(0)
 , layoutY(0)
 , layoutW(0)
 , layoutH(0)
 , zOrder(0)
 , bCrop(false)
 , cropX(0)
 , cropY(0)
 , cropW(0)
 , cropH(0)
 , alpha(0)
 , audioChannel(0)
 {
 }

 bool bStandard; // Standard stream user or not
 int layoutX; // User's location x in video mixing canvas
 int layoutY; // User's location y in video mixing canvas
 int layoutW; // User’s width in video mixing canvas
 int layoutH; // User’s height in video mixing canvas
 int zOrder; // Layer number of the user’s video frame on the live video. The value range is the integer in [0, 100] (0 = lowest layer, 1 = first layer from bottom to top, and so on)
 bool bCrop; // 0: display in the middle after zooming, mend black edges on the upper and lower / left and right sides; 1: crop in the middle after zooming, and crop the upper and lower / left and right extra regions
 int cropX; // X coordinate of crop region, left blank means default to center cropping
 int cropY; // Y coordinate of crop region
 int cropW; // Width of crop region
 int cropH; // Height of crop region
 float alpha; // Transparency of user video on the live video. 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. The default is 1.0
 int audioChannel; // Not yet realized
 char uid[MAX_THUNDER_UID_LEN];
 char roomId[MAX_THUNDER_ROOMID_LEN];
};

Video mixing parameters


AudioDeviceList

#define MAX_DEVICE_NAME_LEN 512 // Device name
#define MAX_DEVICE_DESC_LEN 512 // Device description
#define MAX_DEVICE_COUNT 16 // Maximum quantity of devices

struct GUID
{
 unsigned long Data1;
 unsigned short Data2;
 unsigned short Data3;
 unsigned char Data4[8];
};

struct AudioDeviceInfo // Information about audio device
{
 GUID id; // Identification of audio device
 char name[MAX_DEVICE_NAME_LEN]; // Name of audio device
 char desc[MAX_DEVICE_DESC_LEN]; // Description of audio device
};

struct AudioDeviceList
{
 AudioDeviceInfo device[MAX_DEVICE_COUNT]; // List of audio devices
 int count; // Number of video devices
};

List of audio devices


MonitorDeviceList

#define MAX_DEVICE_NAME_LEN 512 // Device name
#define MAX_DEVICE_COUNT 16 // Maximum quantity of devices

struct RECT
{
 long left;
 long top;
 long right;
 long bottom;
};

struct MonitorDeviceInfo
{
 int index; // Acquired device number
 int flags; // Flags for screen attributes. The following table lists the possible values:
 // 0: This screen is not the home screen.
 // 1: This screen is the home screen, can also be identified by the macro MONITORINFOF_PRIMARY came with Windows
 void* handle; // pHandler to display monitor <==> HMONITOR
 RECT rcWork; // Rectangular working area of specified screen, represented in virtual screen coordinates
 RECT rcMonitor; // Rectangular specified screen, represented in virtual screen coordinates
 char name[MAX_DEVICE_NAME_LEN]; // Device name
};

struct MonitorDeviceList
{
 int count; // Number of video devices
 MonitorDeviceInfo device[MAX_DEVICE_COUNT]; // List of video devices
};

List of displayer information.


VideoDeviceList

struct VideoDeviceList
{
  VideoDeviceInfo device[MAX_DEVICE_COUNT]; // List of video devices
  int count; // Number of video devices
};

List of video devices


VideoDeviceInfo

struct VideoDeviceInfo
{
  char name[MAX_DEVICE_NAME_LEN]; // Name of video device
  int index; // Index of video device
};

Video device information


FEATURE_SUPPORT

enum Thunder::FEATURE_SUPPORT

System fetures.

Enumeration ValueDescription
FEATURE_SUPPORT_MAGAPI(0)Mag API capture

ReverbParameter

struct ReverbParameter
{
  float roomSize; // Room size, range: [0~100]
  float preDelay; // Pre-delay, range: [0~200], unit: ms
  float reverberance; // Reverberance, range: [0~100]
  float hfDamping; // Damping, range: [0~100]
  float toneLow; // Low tone, range: [0~100]
  float toneHigh; // High tone, range: [0~100]
  float wetGain; // Wet gain, range: [-20~10], unit: dB
  float dryGain; // Dry gain, range: [-20~10], unit: dB
  float stereoWidth; // Stereo width, range: [0~100]
};

Reverberation parameters.


LimiterParameter

struct LimiterParameter
{
  float ceiling; // Target threshold, range: [-30 ~ 0]
  float threshold; // Threshold, range: [-10 ~ 0]
  float preGain; // Pre-gain, range: [0 ~ 30]
  float release; // Release time, range: [0 ~ 1000]
  float attack; // Attack time, range: [0 ~ 1000]
  float lookahead; //  ook-ahead value, range: [0 ~ 8]
  float lookaheadRatio; // Look-ahead ratio, range: [0.5 ~ 2]
  float rootMeanSquare; // Root mean square值, range: [0 ~ 100]
  float stLink; // Stereo, range: [0 ~ 1]
};

Limiter parameters.


EqualizerParameter

struct EqualizerParameter
{
  float amplitudeGain; // Amplitude gain, range: [-12 ~ 12], unit: dB
  float gains[10]; // Band gain list,range of each band: [-12 ~ 12]
                   // The center frequency of each band is 31 Hz, 62 Hz, 125 Hz, 250 Hz, 500 Hz, 1000 Hz, 2000 Hz, 4000 Hz, 8000 Hz, 16000 Hz
};

Equalizer parameters.


Was this page helpful?

Helpful Not helpful
Submitted! Your feedback would help us improve the website.
Feedback
Top