NERtc Windows SDK
V4.4.301
|
#include <nertc_engine_ex.h>
Public 成员函数 | |
virtual NERtcConnectionStateType | getConnectionState ()=0 |
virtual int | muteLocalAudioStream (bool mute)=0 |
virtual int | setAudioProfile (NERtcAudioProfileType profile, NERtcAudioScenarioType scenario)=0 |
virtual int | setAudioEffectPreset (NERtcVoiceChangerType type)=0 |
virtual int | setVoiceBeautifierPreset (NERtcVoiceBeautifierType type)=0 |
virtual int | setLocalVoicePitch (double pitch)=0 |
virtual int | setLocalVoiceEqualization (NERtcVoiceEqualizationBand band_frequency, int band_gain)=0 |
virtual int | subscribeRemoteAudioStream (uid_t uid, bool subscribe)=0 |
virtual int | setVideoConfig (const NERtcVideoConfig &config)=0 |
virtual int | enableDualStreamMode (bool enable)=0 |
virtual int | setupLocalSubStreamVideoCanvas (NERtcVideoCanvas *canvas)=0 |
virtual int | setLocalRenderMode (NERtcVideoScalingMode scaling_mode)=0 |
virtual int | setLocalSubStreamRenderMode (NERtcVideoScalingMode scaling_mode)=0 |
virtual int | setLocalVideoMirrorMode (NERtcVideoMirrorMode mirror_mode)=0 |
virtual int | setRemoteRenderMode (uid_t uid, NERtcVideoScalingMode scaling_mode)=0 |
virtual int | setupRemoteSubStreamVideoCanvas (uid_t uid, NERtcVideoCanvas *canvas)=0 |
virtual int | subscribeRemoteVideoSubStream (uid_t uid, bool subscribe)=0 |
virtual int | setRemoteSubSteamRenderMode (uid_t uid, NERtcVideoScalingMode scaling_mode)=0 |
virtual int | startVideoPreview ()=0 |
virtual int | stopVideoPreview ()=0 |
virtual int | muteLocalVideoStream (bool mute)=0 |
virtual int | setLocalMediaPriority (NERtcMediaPriorityType priority, bool is_preemptive)=0 |
virtual int | setParameters (const char *parameters)=0 |
virtual int | setRecordingAudioFrameParameters (NERtcAudioFrameRequestFormat *format)=0 |
virtual int | setPlaybackAudioFrameParameters (NERtcAudioFrameRequestFormat *format)=0 |
virtual int | setMixedAudioFrameParameters (int sample_rate)=0 |
virtual int | setAudioFrameObserver (INERtcAudioFrameObserver *observer)=0 |
virtual int | startAudioDump ()=0 |
virtual int | stopAudioDump ()=0 |
virtual int | startAudioMixing (NERtcCreateAudioMixingOption *option)=0 |
virtual int | stopAudioMixing ()=0 |
virtual int | pauseAudioMixing ()=0 |
virtual int | resumeAudioMixing ()=0 |
virtual int | setAudioMixingSendVolume (uint32_t volume)=0 |
virtual int | getAudioMixingSendVolume (uint32_t *volume)=0 |
virtual int | setAudioMixingPlaybackVolume (uint32_t volume)=0 |
virtual int | getAudioMixingPlaybackVolume (uint32_t *volume)=0 |
virtual int | getAudioMixingDuration (uint64_t *duration)=0 |
virtual int | getAudioMixingCurrentPosition (uint64_t *position)=0 |
virtual int | setAudioMixingPosition (uint64_t seek_position)=0 |
virtual int | playEffect (uint32_t effect_id, NERtcCreateAudioEffectOption *option)=0 |
virtual int | stopEffect (uint32_t effect_id)=0 |
virtual int | stopAllEffects ()=0 |
virtual int | pauseEffect (uint32_t effect_id)=0 |
virtual int | resumeEffect (uint32_t effect_id)=0 |
virtual int | pauseAllEffects ()=0 |
virtual int | resumeAllEffects ()=0 |
virtual int | setEffectSendVolume (uint32_t effect_id, uint32_t volume)=0 |
virtual int | getEffectSendVolume (uint32_t effect_id, uint32_t *volume)=0 |
virtual int | setEffectPlaybackVolume (uint32_t effect_id, uint32_t volume)=0 |
virtual int | getEffectPlaybackVolume (uint32_t effect_id, uint32_t *volume)=0 |
virtual int | enableLoopbackRecording (bool enabled, const char *device_name)=0 |
virtual int | adjustLoopbackRecordingSignalVolume (int volume)=0 |
virtual int | enableEarback (bool enabled, uint32_t volume)=0 |
virtual int | setEarbackVolume (uint32_t volume)=0 |
virtual int | setStatsObserver (IRtcMediaStatsObserver *observer)=0 |
virtual int | enableAudioVolumeIndication (bool enable, uint64_t interval)=0 |
virtual int | startScreenCaptureByScreenRect (const NERtcRectangle &screen_rect, const NERtcRectangle ®ion_rect, const NERtcScreenCaptureParameters &capture_params)=0 |
virtual int | startScreenCaptureByDisplayId (unsigned int display_id, const NERtcRectangle ®ion_rect, const NERtcScreenCaptureParameters &capture_params)=0 |
virtual int | startScreenCaptureByWindowId (source_id_t window_id, const NERtcRectangle ®ion_rect, const NERtcScreenCaptureParameters &capture_params)=0 |
virtual int | updateScreenCaptureRegion (const NERtcRectangle ®ion_rect)=0 |
virtual int | stopScreenCapture ()=0 |
virtual int | pauseScreenCapture ()=0 |
virtual int | resumeScreenCapture ()=0 |
virtual int | setExcludeWindowList (source_id_t *window_list, int count)=0 |
virtual int | setExternalVideoSource (bool enabled)=0 |
virtual int | pushExternalVideoFrame (NERtcVideoFrame *frame)=0 |
virtual int | setExternalAudioSource (bool enabled, int sample_rate, int channels)=0 |
virtual int | pushExternalAudioFrame (NERtcAudioFrame *frame)=0 |
virtual int | setExternalAudioRender (bool enabled, int sample_rate, int channels)=0 |
virtual int | pullExternalAudioFrame (void *data, int len)=0 |
virtual const char * | getVersion (int *build)=0 |
virtual const char * | getErrorDescription (int error_code)=0 |
virtual void | uploadSdkInfo ()=0 |
virtual int | addLiveStreamTask (const NERtcLiveStreamTaskInfo &info)=0 |
virtual int | updateLiveStreamTask (const NERtcLiveStreamTaskInfo &info)=0 |
virtual int | removeLiveStreamTask (const char *task_id)=0 |
virtual int | sendSEIMsg (const char *data, int length, NERtcVideoStreamType type)=0 |
virtual int | sendSEIMsg (const char *data, int length)=0 |
virtual int | setLocalCanvasWatermarkConfigs (NERtcVideoStreamType type, NERtcCanvasWatermarkConfig &config)=0 |
virtual int | setRemoteCanvasWatermarkConfigs (uid_t uid, NERtcVideoStreamType type, NERtcCanvasWatermarkConfig &config)=0 |
virtual int | takeLocalSnapshot (NERtcVideoStreamType stream_type, NERtcTakeSnapshotCallback *callback)=0 |
virtual int | takeRemoteSnapshot (uid_t uid, NERtcVideoStreamType stream_type, NERtcTakeSnapshotCallback *callback)=0 |
virtual int | startAudioRecording (const char *file_path, int sample_rate, NERtcAudioRecordingQuality quality)=0 |
virtual int | stopAudioRecording ()=0 |
virtual int | adjustUserPlaybackSignalVolume (uid_t uid, int volume)=0 |
virtual int | startChannelMediaRelay (NERtcChannelMediaRelayConfiguration *config)=0 |
virtual int | updateChannelMediaRelay (NERtcChannelMediaRelayConfiguration *config)=0 |
virtual int | stopChannelMediaRelay ()=0 |
virtual int | setLocalPublishFallbackOption (int option)=0 |
virtual int | setRemoteSubscribeFallbackOption (int option)=0 |
virtual int | enableSuperResolution (bool enable)=0 |
virtual int | enableEncryption (bool enable, NERtcEncryptionConfig config)=0 |
virtual int | setCloudProxy (int proxyType)=0 |
Public 成员函数 继承自 nertc::IRtcEngine | |
virtual int | initialize (const NERtcEngineContext &context)=0 |
virtual void | release (bool sync=true)=0 |
virtual int | setClientRole (NERtcClientRole role)=0 |
virtual int | setChannelProfile (NERtcChannelProfileType profile)=0 |
virtual int | joinChannel (const char *token, const char *channel_name, uid_t uid)=0 |
virtual int | switchChannel (const char *token, const char *channel_name)=0 |
virtual int | leaveChannel ()=0 |
virtual int | queryInterface (NERtcInterfaceIdType iid, void **inter)=0 |
virtual int | enableLocalAudio (bool enabled)=0 |
virtual int | setupLocalVideoCanvas (NERtcVideoCanvas *canvas)=0 |
virtual int | setupRemoteVideoCanvas (uid_t uid, NERtcVideoCanvas *canvas)=0 |
virtual int | enableLocalVideo (bool enabled)=0 |
virtual int | subscribeRemoteVideoStream (uid_t uid, NERtcRemoteVideoStreamType type, bool subscribe)=0 |
RtcEngine class provides main interface-related methods for applications to call.
IRtcEngineEx is the expansion interface of the NERTC SDK. Creates an IRtcEngine object and calls the methods of this object, and you can activate the communication feature the NERTC SDK provides.
|
pure virtual |
After the method is successfully called, the current user can receive the notification about the status of the live stream.
[in] | info | indicates information of live task. For more information, see NERtcLiveStreamTaskInfo. |
|
pure virtual |
Adjusts the volume of captured signals of sound cards.
After calling sound card capturing by calling enableLoopbackRecording, you can call the method to adjust the volume of captured signals of sound cards.
[in] | volume | The captured signals volume through sound cards. Value range: 0 to 100. The default value of 100 represents the original volume. |
|
pure virtual |
Adjusts the volume of local signal playback from a specified remote user.
After you join the room, you can call the method to adjust the volume of local audio playback from different remote users or repeatedly adjust the volume of audio playback from a specified remote user.
uid | The ID of a remote user. |
volume | Playback volume: 0 to 100.
|
|
pure virtual |
Enables volume indication for the speaker.
The method allows the SDK to report to the app the information about the volume of the user that pushes local streams and the remote user (up to three users) that has the highest instantaneous volume. The information about the current speaker and the volume is reported.
If this method is enabled, when a user joins a room and pushes streams, the SDK triggers onRemoteAudioVolumeIndication based on the preset time intervals.
enable | specifies whether to prompt the speaker volume. |
interval | The time interval at which volume prompt is displayed. Unit: milliseconds. The value must be the multiples of 100 milliseconds. |
|
pure virtual |
Specifies whether to enable or disable the dual stream mode.
The method sets the single-stream mode or dual-stream mode. If the dual-stream mode is enabled, the receiver can choose to receive the high-quality stream or low-quality stream video. The high-quality stream has a high resolution and high bitrate. The low-quality stream has a low resolution and low bitrate.
[in] | enable | specifies whether to enable dual-stream mode.
|
|
pure virtual |
Enables or disables in-ear monitoring.
[in] | enabled | Enabled or disabled. |
[in] | volume | The volume of ear-monitoring. |
|
pure virtual |
Enables or disables media stream encryption.
In scenes where high safety is required such as financial sectors, you can set encryption modes of media streams with the method before joining the room.
enable | whether to enable media stream encryption.
|
config | specifies encryption plan for media streams. For more information, see NERtcEncryptionConfig. |
|
pure virtual |
Enables or disables local audio capture through the sound card.
After the feature is enabled, the audio played by the sound card is integrated into local video streams. In this way, you can publish the audio to the remote side.
[in] | enabled | Specifies whether to enable the capture feature through the sound card.
|
[in] | device_name | The device name of the sound card. The name is set as NULL by default, which indicates capturing through the current sound card. The parameter applies to macOS platform only. If users use virtual sound cards such as “Soundflower”, you can set the sound card name of virtual card as parameter. In this way, the SDK finds the corresponding device of virtual sound cards and starts capturing. |
|
pure virtual |
Enables or disables AI super resolution.
enable | specifies whether to enable AI super resolution. By default, the setting is disabled. |
|
pure virtual |
Gets the playback position of the music file.
The method gets the playback position of the music file. Unit: milliseconds. You can call the method when you are in a room.
[out] | position | The playback position of the audio mixing file. Unit: milliseconds. |
|
pure virtual |
Gets the duration of the audio mixing.
The method gets the duration of the audio mixing. Unit: milliseconds. You can call the method when you are in a room.
[out] | duration | The duration of the audio mixing. Unit: milliseconds. |
|
pure virtual |
Gets the playback volume of the audio mixing.
The method gets the playback volume of the audio mixing in the audio mixing. You can call the method when you are in a room.
[out] | volume | The volume of the audio mixing. |
|
pure virtual |
Gets the volume for publishing of audio mixing.
The method gets the volume for publishing of the audio mixing in the audio mixing. You can call the method when you are in a room.
[out] | volume | The volume for publishing of the audio mixing. |
|
pure virtual |
Gets the current connection status.
|
pure virtual |
Gets the playback volume of the audio effects files.
You can call this method after joining a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
[out] | volume | The audio effect playback volume. |
|
pure virtual |
Gets the audio effect volume for publishing.
The method gets the audio effect volume for publishing. You can call the method when you are in a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
[out] | volume | The audio effect volume for publishing. |
|
pure virtual |
Check the error description of specified error codes.
[in] | error_code | NERtcErrorCode . |
|
pure virtual |
Query the SDK version number.
[out] | build | The compilation number. |
|
pure virtual |
Enables or disabling publishing the local audio stream. The method is used to enable or disable publishing the local audio stream.
[in] | mute | Mute or Unmute.
|
|
pure virtual |
Enables or disables publishing the local video stream.
If the method is called Successfully, onUserVideoMute is triggered remotely.
[in] | mute |
|
|
pure virtual |
Pauses all audio effect files.
You can call the method when you are in a room.
|
pure virtual |
Stops playing music files or audio mixing.
The method pauses playing audio mixing. You can call the method when you are in a room.
|
pure virtual |
Pauses playing all audio effects.
You can call the method when you are in a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
|
pure virtual |
Pauses screen sharing.
|
pure virtual |
Plays a specified audio effect file.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
[in] | option | The options of creating audio effect files configurations including types, full path or URL of audio mixing files. For more information, see NERtcCreateAudioEffectOption. |
|
pure virtual |
Pulls the external audio data.
The method pulls the audio data from the internal audio engine. After you enable the external audio data rendering functionality by calling setExternalAudioRender, you can use pullExternalAudioFrame to get the audio PCM data.
[out] | data | indicates data pointer. The SDK internally copies data into data. |
[in] | len | The size of the audio data that are pulled. Unit: bytes.
|
|
pure virtual |
Pushes the external audio data input.
Pushes the audio frame data captured from the external audio source to the internal audio engine. If you enable the external audio data source by calling setExternalAudioSource, you can use pushExternalAudioFrame to send audio PCM data.
[in] | frame | The data of frame cannot exceed 7680 bytes in length.
|
|
pure virtual |
Pushes the external video frames.
The method actively pushes the data of video frames that are encapsulated with the NERtcVideoFrame class to the SDK. Make sure that you have already called setExternalVideoSource with a value of true before you call this method. Otherwise, an error message is repeatedly prompted if you call the method.
[in] | frame | The video frame data. |
|
pure virtual |
Deletes a push task.
[in] | task_id | The ID of a live streaming task. |
|
pure virtual |
Resumes playing all audio effects files.
You can call the method when you are in a room.
|
pure virtual |
Resumes playing the audio mixing.
The method resumes audio mixing, and continues playing the audio mixing. You can call the method when you are in a room.
|
pure virtual |
Resumes playing a specified audio effect.
You can call the method when you are in a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
|
pure virtual |
Resumes screen sharing.
|
pure virtual |
Sends SEI messages.
While the local video stream is pushed, SEI data is also sent to sync some additional information. After SEI data is sent, the receiver can retrieve the content by listening on IRtcEngineEventHandlerEx::onRecvSEIMsg callback.
data | The custom SEI frame data. |
length | The custom SEI data size whose maximum value does not exceed 4096 bytes. |
|
pure virtual |
Sends SEI messages.
While the local video stream is pushed, SEI data is also sent to sync some additional information. After SEI data is sent, the receiver can retrieve the content by listening on IRtcEngineEventHandlerEx::onRecvSEIMsg callback.
data | The custom SEI frame data. |
length | The custom SEI data size whose maximum value does not exceed 4096 bytes. |
type | The type of the stream channel with which the SEI data is transmitted. For more information, see NERtcVideoStreamType. |
|
pure virtual |
Sets the voice changer effect for the SDK-preset voice.
The method can add multiple preset audio effects to original human voices and change audio profiles.
[in] | type | The preset voice changer effect. By default, the audio effect is disabled. For more information, see NERtcVoiceChangerType. |
|
pure virtual |
Registers the audio observer object.
The method is used to set audio capture or play PCM data callbacks. You can use the method to process audios. You need to register callbacks with this method when engine needs to trigger callbacks of onAudioFrameDidRecord or onAudioFrameWillPlayback.
observer | The object instance. If you pass in NULL, you cancel the registration and clear the settings of NERtcAudioFrameRequestFormat. |
|
pure virtual |
Adjusts the playback volume of the audio mixing.
The method adjusts the playback volume of the audio mixing in the audio mixing. You can call the method when you are in a room.
[in] | volume | The volume range of the audio mixing is 0 to 100. The default value of 100 represents the original volume. |
|
pure virtual |
Sets the playback position of the music file to a different starting position.
The method sets the playback position of the music file to a different starting position. The method allows you to play the music file from the position based on your requirements rather than from the beginning of the music file.
[in] | seek_position | The playback position of the music file. Unit: milliseconds. |
|
pure virtual |
Adjusts the audio mixing volume for publishing.
The method adjusts the volume for publishing of the audio mixing in the audio mixing. You can call the method when you are in a room.
[in] | volume | The audio mixing volume for publishing. Valid values: 0 to 100. The default value of 100 represents the original volume. |
|
pure virtual |
Sets the audio encoding profile.
[in] | profile | Sets the sample rate, bitrate, encoding mode, and the number of channels. NERtcAudioProfileType. |
[in] | scenario | Sets the type of an audio application scenario. NERtcAudioScenarioType. |
|
pure virtual |
开启并设置云代理服务。
在内网环境下,如果用户防火墙开启了网络限制,请参考《使用云代理》将指定 IP 地址和端口号加入防火墙白名单,然后调用此方法开启云代理,并将 proxyType 参数设置为 kNERtcTransportTypeUDPProxy(1),即指定使用 UDP 协议的云代理。
onConnectionStateChange(kNERtcConnectionStateConnecting, kNERtcReasonConnectionChangedSettingProxyServer)
回调。setCloudProxy(kNERtcTransportTypeNoneProxy)
。 proxyType | 云代理类型。详细信息请参考 NERtcTransportType 。该参数为必填参数,若未赋值,SDK 会报错。 |
|
pure virtual |
Sets the volume for in-ear monitoring.
You can call the method when you are in a room.
[in] | volume | The volume of ear-monitoring. Valid values: to 100. The default value is 100. |
|
pure virtual |
Sets the playback volume of an audio effect file.
You can call this method after joining a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
[in] | volume | The audio effect volume for publishing. Valid values: 0 to 100. The default value is 100. |
|
pure virtual |
Adjusts the audio effect volume for publishing.
The method adjusts the audio effect volume for publishing. You can call the method when you are in a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
[in] | volume | The audio effect volume. Value range: 0 to 100. The default value of 100 represents the original volume. |
|
pure virtual |
Sets the window list that need to be blocked in capturing screens. The method can be dynamically called in the capturing.
window_list | The ID of the screen to be blocked. |
count | The number of windows that are needed to be blocked. |
|
pure virtual |
Sets external audio rendering.
The method is suitable for scenarios that require personalized audio rendering. By default, the setting is disabled. If you choose an audio playback device or a sudden restart occurs, the setting becomes invalid. After you call the method, you can use pullExternalAudioFrame to get audio PCM data.
[in] | enabled | Specifies whether to output external data.
|
[in] | sample_rate | The sample rate of data. You need to input following data in the same sample rate. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect. |
[in] | channels | The number of data channels. You need to return following data in the same number of channels. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect. Valid values:
|
|
pure virtual |
Enables or disables the external audio stream source.
After you call the method, the setting becomes invalid if you choose audio input device or a sudden restart occurs. After the method is called, you can call pushExternalAudioFrame to send the pulse-code modulation (PCM) data.
[in] | enabled | Specifies whether to input external data.
|
[in] | sample_rate | The sample rate of data. You need to input following data in the same sample rate. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect. |
[in] | channels | The number of channels. You need to input following data in the same number of channels. Note: If you call the method to disable the functionality, you can pass in a random valid value. In this case, the setting does not take effect. Valid values:
|
|
pure virtual |
Enables or disables the external video source.
When you enable the external video source through the method, you need to set kNERtcExternalVideoDeviceID as the ID of external video source with IVideoDeviceManager::setDevice kNERtcExternalVideoDeviceID method.
[in] | enabled | Specifies whether input external video source data.
|
|
pure virtual |
Adds a watermark image to the local video.
type | The type of video streams. You can set the value to bigstream or substream. For more information, see NERtcVideoStreamType. |
config | The configuration of the watermark for the canvas. You can set text watermark, image watermark, and timestamp watermark. A value of null is set to remove the watermark. For more information, see NERtcCanvasWatermarkConfig. |
|
pure virtual |
Sets the priority of media streams from a local user.
If a user has a high priority, the media stream from the user also has a high priority. In unreliable network connections, the SDK guarantees the quality the media stream from users with a high priority.
priority | The priority of the local media stream. The default value is kNERtcMediaPriorityNormal. For more information, see NERtcMediaPriorityType. |
is_preemptive | specifies whether to enable the preempt mode. The default value is false, which indicates that the preempt mode is disabled.
|
|
pure virtual |
Sets the fallback option for the published local video stream based on the network conditions.
The quality of the published local audio and video streams is degraded with poor quality network connections. After calling this method and setting the option to kNERtcStreamFallbackAudioOnly:
option | The fallback option of publishing audio and video streams. The fallback kNERtcStreamFallbackAudioOnly is disabled by default. For more information, see RTCStreamFallbackOption. |
|
pure virtual |
Sets the local view display mode.
This method is used to set the display mode about the local view. The application can repeatedly call the method to change the display mode.
[in] | scaling_mode | The video display mode. NERtcVideoScalingMode. |
|
pure virtual |
Sets the display mode for local substreams video of screen sharing.
This method is used to set the display mode about the local view. The application can repeatedly call the method to change the display mode.
[in] | scaling_mode | The video display mode. NERtcVideoScalingMode. |
|
pure virtual |
Sets the mirror mode of the local video.
The method is used to set whether to enable the mirror mode for the local video. The mirror code determines whether to flip the screen view right or left.
Mirror mode for local videos only affects what local users view. The views of remote users are not affected. App can repeatedly call this method to modify the mirror mode.
[in] | mirror_mode | The video mirror mode. For more information, see NERtcVideoMirrorMode. |
|
pure virtual |
Sets the local voice equalization effect. You can customize the center frequencies of the local voice effects.
[in] | band_frequency | Sets the band frequency. Value range: 0 to 9. Those numbers represent the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 250, 500, 1k, 2k, 4k, 8k, and 16k Hz. |
[in] | band_gain | Sets the gain of each band (dB). Value range: -15 to 15. The default value is 0. |
|
pure virtual |
Sets the voice pitch of a local voice.
The method changes the voice pitch of the local speaker.
[in] | pitch | The voice frequency. Valid values: 0.5 to 2.0. Smaller values have lower pitches. The default value is 1, which That the pitch is not changed. |
|
pure virtual |
Sets the sample rate of audio mixing stream after the audio is recording and playback.
The method is used to set audio recording format of onMixedAudioFrame .
sample_rate | The sample rate of data returned in onMixedAudioFrame. Only 8000, 16000, 32000, 44100, and 48000 are supported. |
|
pure virtual |
Sets parameters for audio and video calls. You can configure the SDK through JSON to provide features like technology review and special customization. Publicizes JSON options in a standardized way.
[in] | parameters | Related parameters for audio and video calls whose format is the JSON string. |
|
pure virtual |
Sets the audio playback format.
The method is used to set audio recording format of onAudioFrameDidRecord callback.
format | The sample rate and channels of data returned in the onAudioFrameWillPlayback. A value of NULL is allowed. The default value is NULL. |
|
pure virtual |
Sets the audio recording format.
The method is used to set audio recording format of onAudioFrameDidRecord callback.
format | The sample rate and channels of data returned in the onAudioFrameDidRecord. A value of NULL is allowed. The default value is NULL. |
|
pure virtual |
Adds a watermark to the remote video canvas.
uid | The ID of a remote user. |
type | The type of video streams. You can set the value to bigstream or substream. For more information, see NERtcVideoStreamType. |
config | The configuration of the watermark for the canvas. You can set text watermark, image watermark, and timestamp watermark. A value of null is set to remove the watermark. For more information, see NERtcCanvasWatermarkConfig. |
|
pure virtual |
Sets display mode for remote views.
This method is used to set the display mode for the remote view. App can repeatedly call this method to modify the display mode.
[in] | uid | The ID of a remote user. |
[in] | scaling_mode | The video display mode. NERtcVideoScalingMode. |
|
pure virtual |
Sets the fallback option for the subscribed remote audio and video stream with poor network connections.
The quality of the subscribed audio and video streams is degraded with unreliable network connections. You can use the interface to set the option as kNERtcStreamFallbackVideoStreamLow or kNERtcStreamFallbackAudioOnly.
option | The fallback option for the subscribed remote audio and video stream. With unreliable network connections, the stream falls back to a low-quality video stream of kNERtcStreamFallbackVideoStreamLow. For more information, see RTCStreamFallbackOption. |
|
pure virtual |
Sets substream video display modes for remote screen sharing.
You can use the method when screen sharing is enabled in substreams on the remote side. The application can repeatedly call the method to change the display mode.
[in] | uid | The ID of a remote user. |
[in] | scaling_mode | The video display mode. NERtcVideoScalingMode. |
|
pure virtual |
Registers a stats observer.
[in] | observer | The stats observer. |
|
pure virtual |
Sets a remote substream canvas.
This method is used to set the display information about the local secondary stream video. The app associates with the video view of local secondary stream by calling this method. During application development, in most cases, before joining a room, you must first call this method to set the local video view after the SDK is initialized.
[in] | canvas | The video canvas information. |
|
pure virtual |
Sets a remote substream video canvas.
The method associates a remote user with a substream view. You can assign a specified uid to use a corresponding canvas.
[in] | uid | The ID of a remote user. |
[in] | canvas | The video canvas settings. |
|
pure virtual |
Sets local video parameters.
[in] | config | Sets the video encoding parameters. For more information, see NERtcVideoConfig. |
|
pure virtual |
Sets an SDK-preset voice beautifier effect.
The method can set a SDK-preset voice beautifier effect for a local user who sends an audio stream.
[in] | type | The present voice beautifier effect. By default, the voice beautifier effect is disabled. For more information, see NERtcVoiceBeautifierType. |
|
pure virtual |
Starts recording an audio dump file. Audio dump files can be used to analyze audio issues.
|
pure virtual |
Starts playing a music file.
This method mixes the specified local or online audio file with the audio stream captured by the audio devices.
[in] | option | indicates options of creating audio mixing configurations that include types, full path or URL. For more information, see NERtcCreateAudioMixingOption. |
|
pure virtual |
Starts an audio recording on a client.
After calling the method, the client records the audio streams that are mixed by all users, and stores the streams in a local file. The onAudioRecording() callback is triggered when the recording starts or ends.
If you specify a type of audio quality, the recording file is saved in different formats.
file_path | The absolute path where the recording file is saved. The file name and format must be accurate. For example, sdcard/xxx/audio.aac.
|
sample_rate | The audio sample rate (Hz). Valid values: 16000, 32000, 44100, and 48000. The default value is 32000. |
quality | The audio quality. The parameter is valid only the audio file is in AAC format. For more information, see NERtcAudioRecordingQuality. |
|
pure virtual |
Starts relaying media streams. Media streams from up to four rooms can be relayed. A room can receive multiple relayed media streams.
config | The configuration for destination rooms. |
|
pure virtual |
Enables screen sharing by specifying the ID of the screen. The content of screen sharing is sent by substreams.
The content of the screen sharing is sent as a substream. If you join a room and call this method to enable the substream, the onUserSubStreamVideoStart callback is remotely triggered.
display_id | The ID of the screen to be shared. Developers need to specify the screen they share through the parameters. |
region_rect | (optional) The relative position of shared screen to the full screen. |
capture_params | The configurations of screen sharing. |
|
pure virtual |
Shares screens through specifying regions. Shares a certain screen or part of region of a screen. Users need to specify the screen region they wants to share in the method.
When calling the method, you need to specify the screen region to be shared, and share the overall frame of the screen or designated regions.
If you join a room and successfully call this method to enable the substream, the onUserSubStreamVideoStart callback is remotely triggered.
screen_rect | The relative position of the screen to virtual screens that is shared. |
region_rect | (optional) The relative position of shared screen to the full screen. If you set the shared region beyond the frame of the screen, only content within the screen is shared. If you set the value of width or height as 0, the full screen is shared. |
capture_params | The configurations of screen sharing. |
|
pure virtual |
Enables screen sharing by specifying the ID of the screen. The content of screen sharing is sent by substreams.
Enables screen sharing by specifying the ID of the screen. The content of screen sharing is sent by substreams.
If you join a room and call this method to enable the substream, the onUserSubStreamVideoStart callback is remotely triggered.
window_id | The ID of the screen to be shared. |
region_rect | (optional) The relative position of shared screen to the full screen. |
capture_params | The configurations of screen sharing. |
|
pure virtual |
Enables video preview.
The method is used to enable local video preview before you join a room. Prerequisites for calling the API:
|
pure virtual |
Stops playing all audio effects.
|
pure virtual |
Finishes recording an audio dump file.
|
pure virtual |
Stops playing music files or audio mixing.
The method stops playing the audio mixing. You can call the method when you are in a room.
|
pure virtual |
Stops the audio recording on the client.
If the local client leaves the room, audio recording automatically stops. You can call the stopAudioRecording method to manually stop recording during calls at any time.
|
pure virtual |
Stops relaying media streams.
|
pure virtual |
Stops playing a specified audio effect file.
You can call the method when you are in a room.
[in] | effect_id | The ID of the specified audio effect. Each audio effect has a unique ID. |
|
pure virtual |
Stops screen sharing.
If you use the method to disable the substream after joining a room, the onUserSubStreamVideoStop callback is remotely triggered.
|
pure virtual |
Stops video preview.
|
pure virtual |
Unsubscribes from or subscribes to audio streams from specified remote users.
After a user joins a channel, audio streams from all remote users are subscribed by default. You can call this method to unsubscribe from or subscribe to audio streams from all remote users.
[in] | uid | The user ID. |
[in] | subscribe |
|
|
pure virtual |
Subscribes to or unsubscribes from remote substream video from screen sharing. You can receive the substream video data only after you subscribe to remote substream video stream.
[in] | uid | The user ID. |
[in] | subscribe |
|
|
pure virtual |
Takes a local video snapshot.
The takeLocalSnapshot method takes a local video snapshot on the local substream or local bigstream, and call NERtcTakeSnapshotCallback::onTakeSnapshotResult callback to return data of snapshot screen.
stream_type | The video stream type of the snapshot. You can set the value to bigstream or substream. For more information, see NERtcVideoStreamType. |
callback | The snapshot callback. For information, see NERtcTakeSnapshotCallback. |
|
pure virtual |
Takes a snapshot of a remote video.
You can call takeRemoteSnapshot to specify the uid of video screen of remote bigstreams and substreams, and returns screenshot data of NERtcTakeSnapshotCallback::onTakeSnapshotResult callback.
uid | The ID of a remote user. |
stream_type | The video stream type of the snapshot. You can set the value to bigstream or substream. For more information, see NERtcVideoStreamType. |
callback | The snapshot callback. For information, see NERtcTakeSnapshotCallback. |
|
pure virtual |
Updates the information of the destination room that relays media stream.
config | The configuration for destination rooms. |
|
pure virtual |
Updates and modifies a push task in a room.
[in] | info | indicates information of live task. For more information, see NERtcLiveStreamTaskInfo. |
|
pure virtual |
When sharing a screen or window, updates the shared region.
region_rect | (optional) The relative position of shared screen to the full screen. If you set the shared region beyond the frame of the screen, only content within the screen is shared. If you set width or height as 0, the full screen is shared. |
|
pure virtual |
Uploads the SDK information. You can call the method only after joining a room. The data that is published contains the log file and the audio dump file.