Agora C++ API Reference for All Platforms
Public Member Functions | List of all members
agora::rtc::IRtcEngineEx Class Referenceabstract

Inherits agora::rtc::IRtcEngine.

Inherited by agora::rtc::IRtcEngineInternal.

Public Member Functions

virtual int joinChannelEx (const char *token, const RtcConnection &connection, const ChannelMediaOptions &options, IRtcEngineEventHandler *eventHandler)=0
 
virtual int leaveChannelEx (const RtcConnection &connection)=0
 
virtual int leaveChannelEx (const RtcConnection &connection, const LeaveChannelOptions &options)=0
 
virtual int updateChannelMediaOptionsEx (const ChannelMediaOptions &options, const RtcConnection &connection)=0
 
virtual int setVideoEncoderConfigurationEx (const VideoEncoderConfiguration &config, const RtcConnection &connection)=0
 
virtual int setupRemoteVideoEx (const VideoCanvas &canvas, const RtcConnection &connection)=0
 
virtual int muteRemoteAudioStreamEx (uid_t uid, bool mute, const RtcConnection &connection)=0
 
virtual int muteRemoteVideoStreamEx (uid_t uid, bool mute, const RtcConnection &connection)=0
 
virtual int setRemoteVideoStreamTypeEx (uid_t uid, VIDEO_STREAM_TYPE streamType, const RtcConnection &connection)=0
 
virtual int muteLocalAudioStreamEx (bool mute, const RtcConnection &connection)=0
 
virtual int muteLocalVideoStreamEx (bool mute, const RtcConnection &connection)=0
 
virtual int muteAllRemoteAudioStreamsEx (bool mute, const RtcConnection &connection)=0
 
virtual int muteAllRemoteVideoStreamsEx (bool mute, const RtcConnection &connection)=0
 
virtual int setSubscribeAudioBlocklistEx (uid_t *uidList, int uidNumber, const RtcConnection &connection)=0
 
virtual int setSubscribeAudioAllowlistEx (uid_t *uidList, int uidNumber, const RtcConnection &connection)=0
 
virtual int setSubscribeVideoBlocklistEx (uid_t *uidList, int uidNumber, const RtcConnection &connection)=0
 
virtual int setSubscribeVideoAllowlistEx (uid_t *uidList, int uidNumber, const RtcConnection &connection)=0
 
virtual int setRemoteVideoSubscriptionOptionsEx (uid_t uid, const VideoSubscriptionOptions &options, const RtcConnection &connection)=0
 
virtual int setRemoteVoicePositionEx (uid_t uid, double pan, double gain, const RtcConnection &connection)=0
 
virtual int setRemoteUserSpatialAudioParamsEx (uid_t uid, const agora::SpatialAudioParams &params, const RtcConnection &connection)=0
 
virtual int setRemoteRenderModeEx (uid_t uid, media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode, const RtcConnection &connection)=0
 
virtual int enableLoopbackRecordingEx (const RtcConnection &connection, bool enabled, const char *deviceName=NULL)=0
 
virtual int adjustUserPlaybackSignalVolumeEx (unsigned int uid, int volume, const RtcConnection &connection)=0
 
virtual CONNECTION_STATE_TYPE getConnectionStateEx (const RtcConnection &connection)=0
 
virtual int enableEncryptionEx (const RtcConnection &connection, bool enabled, const EncryptionConfig &config)=0
 
virtual int createDataStreamEx (int *streamId, bool reliable, bool ordered, const RtcConnection &connection)=0
 
virtual int createDataStreamEx (int *streamId, DataStreamConfig &config, const RtcConnection &connection)=0
 
virtual int sendStreamMessageEx (int streamId, const char *data, size_t length, const RtcConnection &connection)=0
 
virtual int addVideoWatermarkEx (const char *watermarkUrl, const WatermarkOptions &options, const RtcConnection &connection)=0
 
virtual int clearVideoWatermarkEx (const RtcConnection &connection)=0
 
virtual int sendCustomReportMessageEx (const char *id, const char *category, const char *event, const char *label, int value, const RtcConnection &connection)=0
 
virtual int enableAudioVolumeIndicationEx (int interval, int smooth, bool reportVad, const RtcConnection &connection)=0
 
virtual int startRtmpStreamWithoutTranscodingEx (const char *url, const RtcConnection &connection)=0
 
virtual int startRtmpStreamWithTranscodingEx (const char *url, const LiveTranscoding &transcoding, const RtcConnection &connection)=0
 
virtual int updateRtmpTranscodingEx (const LiveTranscoding &transcoding, const RtcConnection &connection)=0
 
virtual int stopRtmpStreamEx (const char *url, const RtcConnection &connection)=0
 
virtual int startChannelMediaRelayEx (const ChannelMediaRelayConfiguration &configuration, const RtcConnection &connection)=0
 
virtual int updateChannelMediaRelayEx (const ChannelMediaRelayConfiguration &configuration, const RtcConnection &connection)=0
 
virtual int stopChannelMediaRelayEx (const RtcConnection &connection)=0
 
virtual int pauseAllChannelMediaRelayEx (const RtcConnection &connection)=0
 
virtual int resumeAllChannelMediaRelayEx (const RtcConnection &connection)=0
 
virtual int getUserInfoByUserAccountEx (const char *userAccount, rtc::UserInfo *userInfo, const RtcConnection &connection)=0
 
virtual int getUserInfoByUidEx (uid_t uid, rtc::UserInfo *userInfo, const RtcConnection &connection)=0
 
virtual int setVideoProfileEx (int width, int height, int frameRate, int bitrate)=0
 
virtual int enableDualStreamModeEx (bool enabled, const SimulcastStreamConfig &streamConfig, const RtcConnection &connection)=0
 
virtual int setDualStreamModeEx (SIMULCAST_STREAM_MODE mode, const SimulcastStreamConfig &streamConfig, const RtcConnection &connection)=0
 
virtual int enableWirelessAccelerate (bool enabled)=0
 
virtual int takeSnapshotEx (const RtcConnection &connection, uid_t uid, const char *filePath)=0
 
- Public Member Functions inherited from agora::rtc::IRtcEngine
virtual void release (bool sync=false)=0
 
virtual int initialize (const RtcEngineContext &context)=0
 
virtual int queryInterface (INTERFACE_ID_TYPE iid, void **inter)=0
 
virtual const char * getVersion (int *build)=0
 
virtual const char * getErrorDescription (int code)=0
 
virtual int joinChannel (const char *token, const char *channelId, const char *info, uid_t uid)=0
 
virtual int joinChannel (const char *token, const char *channelId, uid_t uid, const ChannelMediaOptions &options)=0
 
virtual int updateChannelMediaOptions (const ChannelMediaOptions &options)=0
 
virtual int leaveChannel ()=0
 
virtual int leaveChannel (const LeaveChannelOptions &options)=0
 
virtual int renewToken (const char *token)=0
 
virtual int setChannelProfile (CHANNEL_PROFILE_TYPE profile)=0
 
virtual int setClientRole (CLIENT_ROLE_TYPE role)=0
 
virtual int setClientRole (CLIENT_ROLE_TYPE role, const ClientRoleOptions &options)=0
 
virtual int startEchoTest ()=0
 
virtual int startEchoTest (int intervalInSeconds)=0
 
virtual int startEchoTest (const EchoTestConfiguration &config)=0
 
virtual int stopEchoTest ()=0
 
virtual int enableMultiCamera (bool enabled, const CameraCapturerConfiguration &config)=0
 
virtual int enableVideo ()=0
 
virtual int disableVideo ()=0
 
virtual int startPreview ()=0
 
virtual int startPreview (VIDEO_SOURCE_TYPE sourceType)=0
 
virtual int stopPreview ()=0
 
virtual int stopPreview (VIDEO_SOURCE_TYPE sourceType)=0
 
virtual int startLastmileProbeTest (const LastmileProbeConfig &config)=0
 
virtual int stopLastmileProbeTest ()=0
 
virtual int setVideoEncoderConfiguration (const VideoEncoderConfiguration &config)=0
 
virtual int setBeautyEffectOptions (bool enabled, const BeautyOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0
 
virtual int setLowlightEnhanceOptions (bool enabled, const LowlightEnhanceOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0
 
virtual int setVideoDenoiserOptions (bool enabled, const VideoDenoiserOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0
 
virtual int setColorEnhanceOptions (bool enabled, const ColorEnhanceOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0
 
virtual int enableVirtualBackground (bool enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0
 
virtual int enableRemoteSuperResolution (uid_t userId, bool enable)=0
 
virtual int setupRemoteVideo (const VideoCanvas &canvas)=0
 
virtual int setupLocalVideo (const VideoCanvas &canvas)=0
 
virtual int enableAudio ()=0
 
virtual int disableAudio ()=0
 
virtual int setAudioProfile (AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) __deprecated=0
 
virtual int setAudioProfile (AUDIO_PROFILE_TYPE profile)=0
 
virtual int setAudioScenario (AUDIO_SCENARIO_TYPE scenario)=0
 
virtual int enableLocalAudio (bool enabled)=0
 
virtual int muteLocalAudioStream (bool mute)=0
 
virtual int muteAllRemoteAudioStreams (bool mute)=0
 
virtual int setDefaultMuteAllRemoteAudioStreams (bool mute) __deprecated=0
 
virtual int muteRemoteAudioStream (uid_t uid, bool mute)=0
 
virtual int muteLocalVideoStream (bool mute)=0
 
virtual int enableLocalVideo (bool enabled)=0
 
virtual int muteAllRemoteVideoStreams (bool mute)=0
 
virtual int setDefaultMuteAllRemoteVideoStreams (bool mute) __deprecated=0
 
virtual int muteRemoteVideoStream (uid_t uid, bool mute)=0
 
virtual int setRemoteVideoStreamType (uid_t uid, VIDEO_STREAM_TYPE streamType)=0
 
virtual int setRemoteVideoSubscriptionOptions (uid_t uid, const VideoSubscriptionOptions &options)=0
 
virtual int setRemoteDefaultVideoStreamType (VIDEO_STREAM_TYPE streamType)=0
 
virtual int setSubscribeAudioBlocklist (uid_t *uidList, int uidNumber)=0
 
virtual int setSubscribeAudioAllowlist (uid_t *uidList, int uidNumber)=0
 
virtual int setSubscribeVideoBlocklist (uid_t *uidList, int uidNumber)=0
 
virtual int setSubscribeVideoAllowlist (uid_t *uidList, int uidNumber)=0
 
virtual int enableAudioVolumeIndication (int interval, int smooth, bool reportVad)=0
 
virtual int startAudioRecording (const char *filePath, AUDIO_RECORDING_QUALITY_TYPE quality)=0
 
virtual int startAudioRecording (const char *filePath, int sampleRate, AUDIO_RECORDING_QUALITY_TYPE quality)=0
 
virtual int startAudioRecording (const AudioRecordingConfiguration &config)=0
 
virtual int registerAudioEncodedFrameObserver (const AudioEncodedFrameObserverConfig &config, IAudioEncodedFrameObserver *observer)=0
 
virtual int stopAudioRecording ()=0
 
virtual agora_refptr< IMediaPlayer > createMediaPlayer ()=0
 
virtual int destroyMediaPlayer (agora_refptr< IMediaPlayer > media_player)=0
 
virtual int startAudioMixing (const char *filePath, bool loopback, int cycle)=0
 
virtual int startAudioMixing (const char *filePath, bool loopback, int cycle, int startPos)=0
 
virtual int stopAudioMixing ()=0
 
virtual int pauseAudioMixing ()=0
 
virtual int resumeAudioMixing ()=0
 
virtual int selectAudioTrack (int index)=0
 
virtual int getAudioTrackCount ()=0
 
virtual int adjustAudioMixingVolume (int volume)=0
 
virtual int adjustAudioMixingPublishVolume (int volume)=0
 
virtual int getAudioMixingPublishVolume ()=0
 
virtual int adjustAudioMixingPlayoutVolume (int volume)=0
 
virtual int getAudioMixingPlayoutVolume ()=0
 
virtual int getAudioMixingDuration ()=0
 
virtual int getAudioMixingCurrentPosition ()=0
 
virtual int setAudioMixingPosition (int pos)=0
 
virtual int setAudioMixingDualMonoMode (media::AUDIO_MIXING_DUAL_MONO_MODE mode)=0
 
virtual int setAudioMixingPitch (int pitch)=0
 
virtual int getEffectsVolume ()=0
 
virtual int setEffectsVolume (int volume)=0
 
virtual int preloadEffect (int soundId, const char *filePath, int startPos=0)=0
 
virtual int playEffect (int soundId, const char *filePath, int loopCount, double pitch, double pan, int gain, bool publish=false, int startPos=0)=0
 
virtual int playAllEffects (int loopCount, double pitch, double pan, int gain, bool publish=false)=0
 
virtual int getVolumeOfEffect (int soundId)=0
 
virtual int setVolumeOfEffect (int soundId, int volume)=0
 
virtual int pauseEffect (int soundId)=0
 
virtual int pauseAllEffects ()=0
 
virtual int resumeEffect (int soundId)=0
 
virtual int resumeAllEffects ()=0
 
virtual int stopEffect (int soundId)=0
 
virtual int stopAllEffects ()=0
 
virtual int unloadEffect (int soundId)=0
 
virtual int unloadAllEffects ()=0
 
virtual int getEffectDuration (const char *filePath)=0
 
virtual int setEffectPosition (int soundId, int pos)=0
 
virtual int getEffectCurrentPosition (int soundId)=0
 
virtual int enableSoundPositionIndication (bool enabled)=0
 
virtual int setRemoteVoicePosition (uid_t uid, double pan, double gain)=0
 
virtual int enableSpatialAudio (bool enabled)=0
 
virtual int setRemoteUserSpatialAudioParams (uid_t uid, const agora::SpatialAudioParams &params)=0
 
virtual int setVoiceBeautifierPreset (VOICE_BEAUTIFIER_PRESET preset)=0
 
virtual int setAudioEffectPreset (AUDIO_EFFECT_PRESET preset)=0
 
virtual int setVoiceConversionPreset (VOICE_CONVERSION_PRESET preset)=0
 
virtual int setAudioEffectParameters (AUDIO_EFFECT_PRESET preset, int param1, int param2)=0
 
virtual int setVoiceBeautifierParameters (VOICE_BEAUTIFIER_PRESET preset, int param1, int param2)=0
 
virtual int setVoiceConversionParameters (VOICE_CONVERSION_PRESET preset, int param1, int param2)=0
 
virtual int setLocalVoicePitch (double pitch)=0
 
virtual int setLocalVoiceEqualization (AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, int bandGain)=0
 
virtual int setLocalVoiceReverb (AUDIO_REVERB_TYPE reverbKey, int value)=0
 
virtual int setHeadphoneEQPreset (HEADPHONE_EQUALIZER_PRESET preset)=0
 
virtual int setHeadphoneEQParameters (int lowGain, int highGain)=0
 
virtual int setLogFile (const char *filePath)=0
 
virtual int setLogFilter (unsigned int filter)=0
 
virtual int setLogLevel (commons::LOG_LEVEL level)=0
 
virtual int setLogFileSize (unsigned int fileSizeInKBytes)=0
 
virtual int uploadLogFile (agora::util::AString &requestId)=0
 
virtual int setLocalRenderMode (media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode)=0
 
virtual int setRemoteRenderMode (uid_t uid, media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode)=0
 
virtual int setLocalRenderMode (media::base::RENDER_MODE_TYPE renderMode)=0
 
virtual int setLocalVideoMirrorMode (VIDEO_MIRROR_MODE_TYPE mirrorMode)=0
 
virtual int enableDualStreamMode (bool enabled)=0
 
virtual int enableDualStreamMode (bool enabled, const SimulcastStreamConfig &streamConfig)=0
 
virtual int setDualStreamMode (SIMULCAST_STREAM_MODE mode)=0
 
virtual int setDualStreamMode (SIMULCAST_STREAM_MODE mode, const SimulcastStreamConfig &streamConfig)=0
 
virtual int enableEchoCancellationExternal (bool enabled, int audioSourceDelay)=0
 
virtual int enableCustomAudioLocalPlayback (int sourceId, bool enabled)=0
 
virtual int startPrimaryCustomAudioTrack (const AudioTrackConfig &config)=0
 
virtual int stopPrimaryCustomAudioTrack ()=0
 
virtual int startSecondaryCustomAudioTrack (const AudioTrackConfig &config)=0
 
virtual int stopSecondaryCustomAudioTrack ()=0
 
virtual int setRecordingAudioFrameParameters (int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall)=0
 
virtual int setPlaybackAudioFrameParameters (int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall)=0
 
virtual int setMixedAudioFrameParameters (int sampleRate, int channel, int samplesPerCall)=0
 
virtual int setEarMonitoringAudioFrameParameters (int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall)=0
 
virtual int setPlaybackAudioFrameBeforeMixingParameters (int sampleRate, int channel)=0
 
virtual int enableAudioSpectrumMonitor (int intervalInMS=100)=0
 
virtual int disableAudioSpectrumMonitor ()=0
 
virtual int registerAudioSpectrumObserver (agora::media::IAudioSpectrumObserver *observer)=0
 
virtual int unregisterAudioSpectrumObserver (agora::media::IAudioSpectrumObserver *observer)=0
 
virtual int adjustRecordingSignalVolume (int volume)=0
 
virtual int muteRecordingSignal (bool mute)=0
 
virtual int adjustPlaybackSignalVolume (int volume)=0
 
virtual int adjustUserPlaybackSignalVolume (unsigned int uid, int volume)=0
 
virtual int setLocalPublishFallbackOption (STREAM_FALLBACK_OPTIONS option)=0
 
virtual int setRemoteSubscribeFallbackOption (STREAM_FALLBACK_OPTIONS option)=0
 
virtual int enableLoopbackRecording (bool enabled, const char *deviceName=NULL)=0
 
virtual int adjustLoopbackSignalVolume (int volume)=0
 
virtual int getLoopbackRecordingVolume ()=0
 
virtual int enableInEarMonitoring (bool enabled, int includeAudioFilters)=0
 
virtual int setInEarMonitoringVolume (int volume)=0
 
virtual int loadExtensionProvider (const char *path, bool unload_after_use=false)=0
 
virtual int setExtensionProviderProperty (const char *provider, const char *key, const char *value)=0
 
virtual int registerExtension (const char *provider, const char *extension, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0
 
virtual int enableExtension (const char *provider, const char *extension, bool enable=true, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0
 
virtual int setExtensionProperty (const char *provider, const char *extension, const char *key, const char *value, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0
 
virtual int getExtensionProperty (const char *provider, const char *extension, const char *key, char *value, int buf_len, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0
 
virtual int enableExtension (const char *provider, const char *extension, const ExtensionInfo &extensionInfo, bool enable=true)=0
 
virtual int setExtensionProperty (const char *provider, const char *extension, const ExtensionInfo &extensionInfo, const char *key, const char *value)=0
 
virtual int getExtensionProperty (const char *provider, const char *extension, const ExtensionInfo &extensionInfo, const char *key, char *value, int buf_len)=0
 
virtual int setCameraCapturerConfiguration (const CameraCapturerConfiguration &config)=0
 
virtual video_track_id_t createCustomVideoTrack ()=0
 
virtual video_track_id_t createCustomEncodedVideoTrack (const SenderOptions &sender_option)=0
 
virtual int destroyCustomVideoTrack (video_track_id_t video_track_id)=0
 
virtual int destroyCustomEncodedVideoTrack (video_track_id_t video_track_id)=0
 
virtual int switchCamera ()=0
 
virtual bool isCameraZoomSupported ()=0
 
virtual bool isCameraFaceDetectSupported ()=0
 
virtual bool isCameraTorchSupported ()=0
 
virtual bool isCameraFocusSupported ()=0
 
virtual bool isCameraAutoFocusFaceModeSupported ()=0
 
virtual int setCameraZoomFactor (float factor)=0
 
virtual int enableFaceDetection (bool enabled)=0
 
virtual float getCameraMaxZoomFactor ()=0
 
virtual int setCameraFocusPositionInPreview (float positionX, float positionY)=0
 
virtual int setCameraTorchOn (bool isOn)=0
 
virtual int setCameraAutoFocusFaceModeEnabled (bool enabled)=0
 
virtual bool isCameraExposurePositionSupported ()=0
 
virtual int setCameraExposurePosition (float positionXinView, float positionYinView)=0
 
virtual bool isCameraAutoExposureFaceModeSupported ()=0
 
virtual int setCameraAutoExposureFaceModeEnabled (bool enabled)=0
 
virtual int setDefaultAudioRouteToSpeakerphone (bool defaultToSpeaker)=0
 
virtual int setEnableSpeakerphone (bool speakerOn)=0
 
virtual bool isSpeakerphoneEnabled ()=0
 
virtual IScreenCaptureSourceListgetScreenCaptureSources (const SIZE &thumbSize, const SIZE &iconSize, const bool includeScreen)=0
 
virtual int setAudioSessionOperationRestriction (AUDIO_SESSION_OPERATION_RESTRICTION restriction)=0
 
virtual int startScreenCaptureByDisplayId (uint32_t displayId, const Rectangle &regionRect, const ScreenCaptureParameters &captureParams)=0
 
virtual int startScreenCaptureByScreenRect (const Rectangle &screenRect, const Rectangle &regionRect, const ScreenCaptureParameters &captureParams)=0
 
virtual int getAudioDeviceInfo (DeviceInfo &deviceInfo)=0
 
virtual int startScreenCaptureByWindowId (view_t windowId, const Rectangle &regionRect, const ScreenCaptureParameters &captureParams)=0
 
virtual int setScreenCaptureContentHint (VIDEO_CONTENT_HINT contentHint)=0
 
virtual int setScreenCaptureScenario (SCREEN_SCENARIO_TYPE screenScenario)=0
 
virtual int updateScreenCaptureRegion (const Rectangle &regionRect)=0
 
virtual int updateScreenCaptureParameters (const ScreenCaptureParameters &captureParams)=0
 
virtual int startScreenCapture (const ScreenCaptureParameters2 &captureParams)=0
 
virtual int updateScreenCapture (const ScreenCaptureParameters2 &captureParams)=0
 
virtual int stopScreenCapture ()=0
 
virtual int getCallId (agora::util::AString &callId)=0
 
virtual int rate (const char *callId, int rating, const char *description)=0
 
virtual int complain (const char *callId, const char *description)=0
 
virtual int startRtmpStreamWithoutTranscoding (const char *url)=0
 
virtual int startRtmpStreamWithTranscoding (const char *url, const LiveTranscoding &transcoding)=0
 
virtual int updateRtmpTranscoding (const LiveTranscoding &transcoding)=0
 
virtual int stopRtmpStream (const char *url)=0
 
virtual int startLocalVideoTranscoder (const LocalTranscoderConfiguration &config)=0
 
virtual int updateLocalTranscoderConfiguration (const LocalTranscoderConfiguration &config)=0
 
virtual int stopLocalVideoTranscoder ()=0
 
virtual int startPrimaryCameraCapture (const CameraCapturerConfiguration &config)=0
 
virtual int startSecondaryCameraCapture (const CameraCapturerConfiguration &config)=0
 
virtual int stopPrimaryCameraCapture ()=0
 
virtual int stopSecondaryCameraCapture ()=0
 
virtual int setCameraDeviceOrientation (VIDEO_SOURCE_TYPE type, VIDEO_ORIENTATION orientation)=0
 
virtual int setScreenCaptureOrientation (VIDEO_SOURCE_TYPE type, VIDEO_ORIENTATION orientation)=0
 
virtual int startPrimaryScreenCapture (const ScreenCaptureConfiguration &config)=0
 
virtual int startSecondaryScreenCapture (const ScreenCaptureConfiguration &config)=0
 
virtual int stopPrimaryScreenCapture ()=0
 
virtual int stopSecondaryScreenCapture ()=0
 
virtual CONNECTION_STATE_TYPE getConnectionState ()=0
 
virtual bool registerEventHandler (IRtcEngineEventHandler *eventHandler)=0
 
virtual bool unregisterEventHandler (IRtcEngineEventHandler *eventHandler)=0
 
virtual int setRemoteUserPriority (uid_t uid, PRIORITY_TYPE userPriority)=0
 
virtual int registerPacketObserver (IPacketObserver *observer)=0
 
virtual int setEncryptionMode (const char *encryptionMode) __deprecated=0
 
virtual int setEncryptionSecret (const char *secret) __deprecated=0
 
virtual int enableEncryption (bool enabled, const EncryptionConfig &config)=0
 
virtual int createDataStream (int *streamId, bool reliable, bool ordered)=0
 
virtual int createDataStream (int *streamId, DataStreamConfig &config)=0
 
virtual int sendStreamMessage (int streamId, const char *data, size_t length)=0
 
virtual int addVideoWatermark (const RtcImage &watermark)=0
 
virtual int addVideoWatermark (const char *watermarkUrl, const WatermarkOptions &options)=0
 
virtual int clearVideoWatermarks ()=0
 
virtual int pauseAudio () __deprecated=0
 
virtual int resumeAudio () __deprecated=0
 
virtual int enableWebSdkInteroperability (bool enabled) __deprecated=0
 
virtual int sendCustomReportMessage (const char *id, const char *category, const char *event, const char *label, int value)=0
 
virtual int registerMediaMetadataObserver (IMetadataObserver *observer, IMetadataObserver::METADATA_TYPE type)=0
 
virtual int unregisterMediaMetadataObserver (IMetadataObserver *observer, IMetadataObserver::METADATA_TYPE type)=0
 
virtual int startAudioFrameDump (const char *channel_id, uid_t user_id, const char *location, const char *uuid, const char *passwd, long duration_ms, bool auto_upload)=0
 
virtual int stopAudioFrameDump (const char *channel_id, uid_t user_id, const char *location)=0
 
virtual int registerLocalUserAccount (const char *appId, const char *userAccount)=0
 
virtual int joinChannelWithUserAccount (const char *token, const char *channelId, const char *userAccount)=0
 
virtual int joinChannelWithUserAccount (const char *token, const char *channelId, const char *userAccount, const ChannelMediaOptions &options)=0
 
virtual int joinChannelWithUserAccountEx (const char *token, const char *channelId, const char *userAccount, const ChannelMediaOptions &options, IRtcEngineEventHandler *eventHandler)=0
 
virtual int getUserInfoByUserAccount (const char *userAccount, rtc::UserInfo *userInfo)=0
 
virtual int getUserInfoByUid (uid_t uid, rtc::UserInfo *userInfo)=0
 
virtual int startChannelMediaRelay (const ChannelMediaRelayConfiguration &configuration)=0
 
virtual int updateChannelMediaRelay (const ChannelMediaRelayConfiguration &configuration)=0
 
virtual int stopChannelMediaRelay ()=0
 
virtual int pauseAllChannelMediaRelay ()=0
 
virtual int resumeAllChannelMediaRelay ()=0
 
virtual int setDirectCdnStreamingAudioConfiguration (AUDIO_PROFILE_TYPE profile)=0
 
virtual int setDirectCdnStreamingVideoConfiguration (const VideoEncoderConfiguration &config)=0
 
virtual int startDirectCdnStreaming (IDirectCdnStreamingEventHandler *eventHandler, const char *publishUrl, const DirectCdnStreamingMediaOptions &options)=0
 
virtual int stopDirectCdnStreaming ()=0
 
virtual int updateDirectCdnStreamingMediaOptions (const DirectCdnStreamingMediaOptions &options)=0
 
virtual int startRhythmPlayer (const char *sound1, const char *sound2, const AgoraRhythmPlayerConfig &config)=0
 
virtual int stopRhythmPlayer ()=0
 
virtual int configRhythmPlayer (const AgoraRhythmPlayerConfig &config)=0
 
virtual int takeSnapshot (uid_t uid, const char *filePath)=0
 
virtual int enableContentInspect (bool enabled, const media::ContentInspectConfig &config)=0
 
virtual int adjustCustomAudioPublishVolume (int32_t sourceId, int volume)=0
 
virtual int adjustCustomAudioPlayoutVolume (int32_t sourceId, int volume)=0
 
virtual int setCloudProxy (CLOUD_PROXY_TYPE proxyType)=0
 
virtual int setLocalAccessPoint (const LocalAccessPointConfiguration &config)=0
 
virtual int setAdvancedAudioOptions (AdvancedAudioOptions &options, int sourceType=0)=0
 
virtual int setAVSyncSource (const char *channelId, uid_t uid)=0
 
virtual int enableVideoImageSource (bool enable, const ImageTrackOptions &options)=0
 
virtual int64_t getCurrentMonotonicTimeInMs ()=0
 
virtual int getNetworkType ()=0
 
virtual int setParameters (const char *parameters)=0
 
- Public Member Functions inherited from agora::base::IEngineBase
virtual ~IEngineBase ()
 

Member Function Documentation

◆ joinChannelEx()

virtual int agora::rtc::IRtcEngineEx::joinChannelEx ( const char *  token,
const RtcConnection connection,
const ChannelMediaOptions options,
IRtcEngineEventHandler eventHandler 
)
pure virtual

Joins a channel with media options.

This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other.

A successful call of this method triggers the following callbacks:

  • The local client: The onJoinChannelSuccess and onConnectionStateChanged callbacks.
  • The remote client: onUserJoined, if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile.

When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess callback on the local client.

Compared to joinChannel, this method adds the options parameter to configure whether to automatically subscribe to all remote audio and video streams in the channel when the user joins the channel. By default, the user subscribes to the audio and video streams of all the other users in the channel, giving rise to usage and billings. To unsubscribe, set the options parameter or call the mute methods accordingly.

Note
  • This method allows users to join only one channel at a time.
  • Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token.
Parameters
connectionThe RtcConnection object.
tokenThe token generated on your server for authentication.
optionsThe channel media options: ChannelMediaOptions.
eventHandlerThe event handler: IRtcEngineEventHandler.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in the ChannelMediaOptions structure is invalid. You need to pass in a valid parameter and join the channel again.
    • -3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.
    • -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.
    • -8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling stopEchoTest to stop the test after calling startEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.
    • -17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recommends using the onConnectionStateChanged callback to get whether the user is in the channel. Do not call this method to join the channel unless you receive the CONNECTION_STATE_DISCONNECTED(1) state.
    • -102: The channel name is invalid. You need to pass in a valid channel name in channelId to rejoin the channel.
    • -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel.

◆ leaveChannelEx() [1/2]

virtual int agora::rtc::IRtcEngineEx::leaveChannelEx ( const RtcConnection connection)
pure virtual

Leaves the channel.

This method allows a user to leave the channel, for example, by hanging up or exiting a call.

This method is an asynchronous call, which means that the result of this method returns even before the user has not actually left the channel. Once the user successfully leaves the channel, the SDK triggers the onLeaveChannel callback.

Parameters
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ leaveChannelEx() [2/2]

virtual int agora::rtc::IRtcEngineEx::leaveChannelEx ( const RtcConnection connection,
const LeaveChannelOptions options 
)
pure virtual

Leaves the channel with the connection ID.

Parameters
connectionconnection.
optionsThe options for leaving the channel. See #LeaveChannelOptions.
Returns
int
  • 0: Success.
  • < 0: Failure.

◆ updateChannelMediaOptionsEx()

virtual int agora::rtc::IRtcEngineEx::updateChannelMediaOptionsEx ( const ChannelMediaOptions options,
const RtcConnection connection 
)
pure virtual

Updates the channel media options after joining the channel.

Parameters
optionsThe channel media options: ChannelMediaOptions.
connectionThe RtcConnection object.
Returns
int
  • 0: Success.
  • < 0: Failure.

◆ setVideoEncoderConfigurationEx()

virtual int agora::rtc::IRtcEngineEx::setVideoEncoderConfigurationEx ( const VideoEncoderConfiguration config,
const RtcConnection connection 
)
pure virtual

Sets the video encoder configuration.

Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.

The parameters specified in this method are the maximum values under ideal network conditions. If the video engine cannot render the video using the specified parameters due to poor network conditions, the parameters further down the list are considered until a successful configuration is found.

Parameters
configThe local video encoder configuration: VideoEncoderConfiguration.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setupRemoteVideoEx()

virtual int agora::rtc::IRtcEngineEx::setupRemoteVideoEx ( const VideoCanvas canvas,
const RtcConnection connection 
)
pure virtual

Initializes the video view of a remote user.

This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees.

Usually the app should specify the uid of the remote video in the method call before the remote user joins the channel. If the remote uid is unknown to the app, set it later when the app receives the onUserJoined callback.

To unbind the remote user from the view, set view in VideoCanvas as null.

Note
Ensure that you call this method in the UI thread.
Parameters
canvasThe remote video view settings: VideoCanvas.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteRemoteAudioStreamEx()

virtual int agora::rtc::IRtcEngineEx::muteRemoteAudioStreamEx ( uid_t  uid,
bool  mute,
const RtcConnection connection 
)
pure virtual

Stops or resumes receiving the audio stream of a specified user.

Note
You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
Parameters
uidThe ID of the specified user.
muteWhether to stop receiving the audio stream of the specified user:
  • true: Stop receiving the audio stream of the specified user.
  • false: (Default) Resume receiving the audio stream of the specified user.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteRemoteVideoStreamEx()

virtual int agora::rtc::IRtcEngineEx::muteRemoteVideoStreamEx ( uid_t  uid,
bool  mute,
const RtcConnection connection 
)
pure virtual

Stops or resumes receiving the video stream of a specified user.

Note
You can call this method before or after joining a channel. If a user leaves a channel, the settings in this method become invalid.
Parameters
uidThe ID of the specified user.
muteWhether to stop receiving the video stream of the specified user:
  • true: Stop receiving the video stream of the specified user.
  • false: (Default) Resume receiving the video stream of the specified user.
connectionThe RtcConnetion object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVideoStreamTypeEx()

virtual int agora::rtc::IRtcEngineEx::setRemoteVideoStreamTypeEx ( uid_t  uid,
VIDEO_STREAM_TYPE  streamType,
const RtcConnection connection 
)
pure virtual

Sets the remote video stream type.

If the remote user has enabled the dual-stream mode, by default the SDK receives the high-stream video by Call this method to switch to the low-stream video.

Note
This method applies to scenarios where the remote user has enabled the dual-stream mode using enableDualStreamMode(true) before joining the channel.
Parameters
uidID of the remote user sending the video stream.
streamTypeSets the video stream type: VIDEO_STREAM_TYPE.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteLocalAudioStreamEx()

virtual int agora::rtc::IRtcEngineEx::muteLocalAudioStreamEx ( bool  mute,
const RtcConnection connection 
)
pure virtual

Stops or resumes sending the local audio stream with connection.

Parameters
muteDetermines whether to send or stop sending the local audio stream:
  • true: Stop sending the local audio stream.
  • false: Send the local audio stream.
connectionThe connection of the user ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteLocalVideoStreamEx()

virtual int agora::rtc::IRtcEngineEx::muteLocalVideoStreamEx ( bool  mute,
const RtcConnection connection 
)
pure virtual

Stops or resumes sending the local video stream with connection.

Parameters
muteDetermines whether to send or stop sending the local video stream:
  • true: Stop sending the local video stream.
  • false: Send the local video stream.
connectionThe connection of the user ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteAllRemoteAudioStreamsEx()

virtual int agora::rtc::IRtcEngineEx::muteAllRemoteAudioStreamsEx ( bool  mute,
const RtcConnection connection 
)
pure virtual

Stops or resumes receiving all remote audio stream with connection.

Parameters
muteWhether to stop receiving remote audio streams:
  • true: Stop receiving any remote audio stream.
  • false: Resume receiving all remote audio streams.
connectionThe connection of the user ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ muteAllRemoteVideoStreamsEx()

virtual int agora::rtc::IRtcEngineEx::muteAllRemoteVideoStreamsEx ( bool  mute,
const RtcConnection connection 
)
pure virtual

Stops or resumes receiving all remote video stream with connection.

Parameters
muteWhether to stop receiving remote audio streams:
  • true: Stop receiving any remote audio stream.
  • false: Resume receiving all remote audio streams.
connectionThe connection of the user ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeAudioBlocklistEx()

virtual int agora::rtc::IRtcEngineEx::setSubscribeAudioBlocklistEx ( uid_t uidList,
int  uidNumber,
const RtcConnection connection 
)
pure virtual

Sets the blocklist of subscribe remote stream audio.

Note
If uid is in uidList, the remote user's audio will not be subscribed, even if muteRemoteAudioStream(uid, false) and muteAllRemoteAudioStreams(false) are operated.
Parameters
uidListThe id list of users who do not subscribe to audio.
uidNumberThe number of uid in uidList.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeAudioAllowlistEx()

virtual int agora::rtc::IRtcEngineEx::setSubscribeAudioAllowlistEx ( uid_t uidList,
int  uidNumber,
const RtcConnection connection 
)
pure virtual

Sets the allowlist of subscribe remote stream audio.

Note
  • If uid is in uidList, the remote user's audio will be subscribed, even if muteRemoteAudioStream(uid, true) and muteAllRemoteAudioStreams(true) are operated.
  • If a user is in the blacklist and whitelist at the same time, the user will not subscribe to audio.
Parameters
uidListThe id list of users who do subscribe to audio.
uidNumberThe number of uid in uidList.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeVideoBlocklistEx()

virtual int agora::rtc::IRtcEngineEx::setSubscribeVideoBlocklistEx ( uid_t uidList,
int  uidNumber,
const RtcConnection connection 
)
pure virtual

Sets the blocklist of subscribe remote stream video.

Note
If uid is in uidList, the remote user's video will not be subscribed, even if muteRemoteVideoStream(uid, false) and muteAllRemoteVideoStreams(false) are operated.
Parameters
uidListThe id list of users who do not subscribe to video.
uidNumberThe number of uid in uidList.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setSubscribeVideoAllowlistEx()

virtual int agora::rtc::IRtcEngineEx::setSubscribeVideoAllowlistEx ( uid_t uidList,
int  uidNumber,
const RtcConnection connection 
)
pure virtual

Sets the allowlist of subscribe remote stream video.

Note
  • If uid is in uidList, the remote user's video will be subscribed, even if muteRemoteVideoStream(uid, true) and muteAllRemoteVideoStreams(true) are operated.
  • If a user is in the blacklist and whitelist at the same time, the user will not subscribe to video.
Parameters
uidListThe id list of users who do subscribe to video.
uidNumberThe number of uid in uidList.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVideoSubscriptionOptionsEx()

virtual int agora::rtc::IRtcEngineEx::setRemoteVideoSubscriptionOptionsEx ( uid_t  uid,
const VideoSubscriptionOptions options,
const RtcConnection connection 
)
pure virtual

Sets the remote video subscription options

Parameters
uidID of the remote user sending the video stream.
optionsSets the video subscription options: VideoSubscriptionOptions.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteVoicePositionEx()

virtual int agora::rtc::IRtcEngineEx::setRemoteVoicePositionEx ( uid_t  uid,
double  pan,
double  gain,
const RtcConnection connection 
)
pure virtual

Sets the sound position and gain of a remote user.

When the local user calls this method to set the sound position of a remote user, the sound difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a real sense of space. This method applies to massively multiplayer online games, such as Battle Royale games.

Note
  • For this method to work, enable stereo panning for remote users by calling the enableSoundPositionIndication method before joining a channel.
  • This method requires hardware support. For the best sound positioning, we recommend using a wired headset.
  • Ensure that you call this method after joining a channel.
Parameters
uidThe ID of the remote user.
panThe sound position of the remote user. The value ranges from -1.0 to 1.0:
  • 0.0: the remote sound comes from the front.
  • -1.0: the remote sound comes from the left.
  • 1.0: the remote sound comes from the right.
gainGain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setRemoteUserSpatialAudioParamsEx()

virtual int agora::rtc::IRtcEngineEx::setRemoteUserSpatialAudioParamsEx ( uid_t  uid,
const agora::SpatialAudioParams params,
const RtcConnection connection 
)
pure virtual

Sets remote user parameters for spatial audio

Parameters
uidThe ID of the remote user.
paramspatial audio parameters: SpatialAudioParams.
connectionThe RtcConnection object.
Returns
int
  • 0: Success.
  • < 0: Failure.

◆ setRemoteRenderModeEx()

virtual int agora::rtc::IRtcEngineEx::setRemoteRenderModeEx ( uid_t  uid,
media::base::RENDER_MODE_TYPE  renderMode,
VIDEO_MIRROR_MODE_TYPE  mirrorMode,
const RtcConnection connection 
)
pure virtual

Updates the display mode of the video view of a remote user.

After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.

Note
  • Ensure that you have called setupRemoteVideo to initialize the remote video view before calling this method.
  • During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
Parameters
uidID of the remote user.
renderModeSets the remote display mode. See #RENDER_MODE_TYPE.
mirrorModeSets the mirror type. See VIDEO_MIRROR_MODE_TYPE.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ enableLoopbackRecordingEx()

virtual int agora::rtc::IRtcEngineEx::enableLoopbackRecordingEx ( const RtcConnection connection,
bool  enabled,
const char *  deviceName = NULL 
)
pure virtual

Enables loopback recording.

If you enable loopback recording, the output of the default sound card is mixed into the audio stream sent to the other end.

Note
This method is for Windows only.
Parameters
connectionThe RtcConnection object.
enabledSets whether to enable/disable loopback recording.
  • true: Enable loopback recording.
  • false: (Default) Disable loopback recording.
deviceNamePointer to the device name of the sound card. The default value is NULL (the default sound card).
  • This method is for macOS and Windows only.
  • macOS does not support loopback capturing of the default sound card. If you need to use this method, please use a virtual sound card and pass its name to the deviceName parameter. Agora has tested and recommends using soundflower.
Returns
  • 0: Success.
  • < 0: Failure.

◆ adjustUserPlaybackSignalVolumeEx()

virtual int agora::rtc::IRtcEngineEx::adjustUserPlaybackSignalVolumeEx ( unsigned int  uid,
int  volume,
const RtcConnection connection 
)
pure virtual

Adjust the playback signal volume of a specified remote user. You can call this method as many times as necessary to adjust the playback volume of different remote users, or to repeatedly adjust the playback volume of the same remote user.

Note
The playback volume here refers to the mixed volume of a specified remote user. This method can only adjust the playback volume of one specified remote user at a time. To adjust the playback volume of different remote users, call the method as many times, once for each remote user.
Parameters
uidThe ID of the remote user.
volumeThe playback volume of the specified remote user. The value ranges between 0 and 400, including the following:
  • 0: Mute.
  • 100: (Default) Original volume.
    Parameters
    connectionRtcConnection
    Returns
  • 0: Success.
  • < 0: Failure.

◆ getConnectionStateEx()

virtual CONNECTION_STATE_TYPE agora::rtc::IRtcEngineEx::getConnectionStateEx ( const RtcConnection connection)
pure virtual

Gets the current connection state of the SDK.

Parameters
connectionThe RtcConnection object.
Returns
CONNECTION_STATE_TYPE.

◆ enableEncryptionEx()

virtual int agora::rtc::IRtcEngineEx::enableEncryptionEx ( const RtcConnection connection,
bool  enabled,
const EncryptionConfig config 
)
pure virtual

Enables/Disables the built-in encryption.

In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel.

All users in the same channel must use the same encryption mode and encryption key. Once all users leave the channel, the encryption key of this channel is automatically cleared.

Note
  • If you enable the built-in encryption, you cannot use the RTMP streaming function.
Parameters
connectionThe RtcConnection object.
enabledWhether to enable the built-in encryption:
  • true: Enable the built-in encryption.
  • false: Disable the built-in encryption.
configConfigurations of built-in encryption schemas. See EncryptionConfig.
Returns
  • 0: Success.
  • < 0: Failure.
    • -2(ERR_INVALID_ARGUMENT): An invalid parameter is used. Set the parameter with a valid value.
    • -4(ERR_NOT_SUPPORTED): The encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library.
    • -7(ERR_NOT_INITIALIZED): The SDK is not initialized. Initialize the IRtcEngine instance before calling this method.

◆ createDataStreamEx() [1/2]

virtual int agora::rtc::IRtcEngineEx::createDataStreamEx ( int *  streamId,
bool  reliable,
bool  ordered,
const RtcConnection connection 
)
pure virtual

Creates a data stream.

You can call this method to create a data stream and improve the reliability and ordering of data tranmission.

Note
  • Ensure that you set the same value for reliable and ordered.
  • Each user can only create a maximum of 5 data streams during a RtcEngine lifecycle.
  • The data channel allows a data delay of up to 5 seconds. If the receiver does not receive the data stream within 5 seconds, the data channel reports an error.
Parameters
[out]streamIdThe ID of the stream data.
reliableSets whether the recipients are guaranteed to receive the data stream from the sender within five seconds:
  • true: The recipients receive the data stream from the sender within five seconds. If the recipient does not receive the data stream within five seconds, an error is reported to the application.
  • false: There is no guarantee that the recipients receive the data stream within five seconds and no error message is reported for any delay or missing data stream.
orderedSets whether the recipients receive the data stream in the sent order:
  • true: The recipients receive the data stream in the sent order.
  • false: The recipients do not receive the data stream in the sent order.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ createDataStreamEx() [2/2]

virtual int agora::rtc::IRtcEngineEx::createDataStreamEx ( int *  streamId,
DataStreamConfig config,
const RtcConnection connection 
)
pure virtual

Creates a data stream.

Each user can create up to five data streams during the lifecycle of the IChannel.

Parameters
streamIdThe ID of the created data stream.
configThe config of data stream.
connectionThe RtcConnection object.
Returns
int
  • Returns 0: Success.
  • < 0: Failure.

◆ sendStreamMessageEx()

virtual int agora::rtc::IRtcEngineEx::sendStreamMessageEx ( int  streamId,
const char *  data,
size_t  length,
const RtcConnection connection 
)
pure virtual

Sends a data stream.

After calling createDataStream, you can call this method to send a data stream to all users in the channel.

The SDK has the following restrictions on this method:

  • Up to 60 packets can be sent per second in a channel with each packet having a maximum size of 1 KB.
  • Each client can send up to 30 KB of data per second.
  • Each user can have up to five data streams simultaneously.

After the remote user receives the data stream within 5 seconds, the SDK triggers the onStreamMessage callback on the remote client. After the remote user does not receive the data stream within 5 seconds, the SDK triggers the onStreamMessageError callback on the remote client.

Note
  • Call this method after calling createDataStream.
  • This method applies only to the COMMUNICATION profile or to the hosts in the LIVE_BROADCASTING profile. If an audience in the LIVE_BROADCASTING profile calls this method, the audience may be switched to a host.
Parameters
streamIdThe ID of the stream data.
dataThe data stream.
lengthThe length (byte) of the data stream.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ addVideoWatermarkEx()

virtual int agora::rtc::IRtcEngineEx::addVideoWatermarkEx ( const char *  watermarkUrl,
const WatermarkOptions options,
const RtcConnection connection 
)
pure virtual

Adds a watermark image to the local video.

This method adds a PNG watermark image to the local video in a live broadcast. Once the watermark image is added, all the audience in the channel (CDN audience included), and the recording device can see and capture it. Agora supports adding only one watermark image onto the local video, and the newly watermark image replaces the previous one.

The watermark position depends on the settings in the setVideoEncoderConfiguration method:

Note
  • Ensure that you have called the enableVideo method to enable the video module before calling this method.
  • If you only want to add a watermark image to the local video for the audience in the CDN live broadcast channel to see and capture, you can call this method or the setLiveTranscoding method.
  • This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray.
  • If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings.
  • If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member in the WatermarkOptions class to set whether or not the watermark is visible in preview.
  • If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer.
Parameters
watermarkUrlThe local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path.
optionsPointer to the watermark's options to be added. See WatermarkOptions for more infomation.
connectionThe RtcConnection object.
Returns
int
  • 0: Success.
  • < 0: Failure.

◆ clearVideoWatermarkEx()

virtual int agora::rtc::IRtcEngineEx::clearVideoWatermarkEx ( const RtcConnection connection)
pure virtual

Removes the watermark image on the video stream added by addVideoWatermark().

Parameters
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ sendCustomReportMessageEx()

virtual int agora::rtc::IRtcEngineEx::sendCustomReportMessageEx ( const char *  id,
const char *  category,
const char *  event,
const char *  label,
int  value,
const RtcConnection connection 
)
pure virtual

Agora supports reporting and analyzing customized messages.

This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes.

To try out this function, contact support@agora.io and discuss the format of customized messages with us.

◆ enableAudioVolumeIndicationEx()

virtual int agora::rtc::IRtcEngineEx::enableAudioVolumeIndicationEx ( int  interval,
int  smooth,
bool  reportVad,
const RtcConnection connection 
)
pure virtual

Enables the onAudioVolumeIndication callback to report on which users are speaking and the speakers' volume.

Once the onAudioVolumeIndication callback is enabled, the SDK returns the volume indication in the at the time interval set in enableAudioVolumeIndication, regardless of whether any user is speaking in the channel.

Parameters
intervalSets the time interval between two consecutive volume indications:
  • <= 0: Disables the volume indication.
  • > 0: Time interval (ms) between two consecutive volume indications, and should be integral multiple of 200 (less than 200 will be set to 200).
smoothThe smoothing factor that sets the sensitivity of the audio volume indicator. The value range is [0, 10]. The greater the value, the more sensitive the indicator. The recommended value is 3.
reportVad
  • true: Enable the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user.
  • false: (Default) Disable the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startRtmpStreamWithoutTranscodingEx()

virtual int agora::rtc::IRtcEngineEx::startRtmpStreamWithoutTranscodingEx ( const char *  url,
const RtcConnection connection 
)
pure virtual

Publishes the local stream without transcoding to a specified CDN live RTMP address. (CDN live only.)

Parameters
urlThe CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes.
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startRtmpStreamWithTranscodingEx()

virtual int agora::rtc::IRtcEngineEx::startRtmpStreamWithTranscodingEx ( const char *  url,
const LiveTranscoding transcoding,
const RtcConnection connection 
)
pure virtual

Publishes the local stream with transcoding to a specified CDN live RTMP address. (CDN live only.)

Parameters
urlThe CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes.
transcodingSets the CDN live audio/video transcoding settings. See LiveTranscoding.
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ updateRtmpTranscodingEx()

virtual int agora::rtc::IRtcEngineEx::updateRtmpTranscodingEx ( const LiveTranscoding transcoding,
const RtcConnection connection 
)
pure virtual

Update the video layout and audio settings for CDN live. (CDN live only.)

Note
This method applies to Live Broadcast only.
Parameters
transcodingSets the CDN live audio/video transcoding settings. See LiveTranscoding.
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ stopRtmpStreamEx()

virtual int agora::rtc::IRtcEngineEx::stopRtmpStreamEx ( const char *  url,
const RtcConnection connection 
)
pure virtual

Stop an RTMP stream with transcoding or without transcoding from the CDN. (CDN live only.)

Parameters
urlThe RTMP URL address to be removed. The maximum length of this parameter is 1024 bytes.
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ startChannelMediaRelayEx()

virtual int agora::rtc::IRtcEngineEx::startChannelMediaRelayEx ( const ChannelMediaRelayConfiguration configuration,
const RtcConnection connection 
)
pure virtual

Starts to relay media streams across channels.

Parameters
configurationThe configuration of the media stream relay:ChannelMediaRelayConfiguration.
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ updateChannelMediaRelayEx()

virtual int agora::rtc::IRtcEngineEx::updateChannelMediaRelayEx ( const ChannelMediaRelayConfiguration configuration,
const RtcConnection connection 
)
pure virtual

Updates the channels for media stream relay

Parameters
configurationThe media stream relay configuration: ChannelMediaRelayConfiguration.
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ stopChannelMediaRelayEx()

virtual int agora::rtc::IRtcEngineEx::stopChannelMediaRelayEx ( const RtcConnection connection)
pure virtual

Stops the media stream relay.

Once the relay stops, the host quits all the destination channels.

Parameters
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ pauseAllChannelMediaRelayEx()

virtual int agora::rtc::IRtcEngineEx::pauseAllChannelMediaRelayEx ( const RtcConnection connection)
pure virtual

pause the channels for media stream relay.

Parameters
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ resumeAllChannelMediaRelayEx()

virtual int agora::rtc::IRtcEngineEx::resumeAllChannelMediaRelayEx ( const RtcConnection connection)
pure virtual

resume the channels for media stream relay.

Parameters
connectionRtcConnection.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getUserInfoByUserAccountEx()

virtual int agora::rtc::IRtcEngineEx::getUserInfoByUserAccountEx ( const char *  userAccount,
rtc::UserInfo userInfo,
const RtcConnection connection 
)
pure virtual

Gets the user information by passing in the user account. It is same as agora::rtc::IRtcEngine::getUserInfoByUserAccount.

Parameters
userAccountThe user account of the user. Ensure that you set this parameter.
[in,out]userInfoA userInfo object that identifies the user:
  • Input: A userInfo object.
  • Output: A userInfo object that contains the user account and user ID of the user.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getUserInfoByUidEx()

virtual int agora::rtc::IRtcEngineEx::getUserInfoByUidEx ( uid_t  uid,
rtc::UserInfo userInfo,
const RtcConnection connection 
)
pure virtual

Gets the user information by passing in the user ID. It is same as agora::rtc::IRtcEngine::getUserInfoByUid.

Parameters
uidThe user ID of the remote user. Ensure that you set this parameter.
[in,out]userInfoA userInfo object that identifies the user:
  • Input: A userInfo object.
  • Output: A userInfo object that contains the user account and user ID of the user.
connectionThe RtcConnection object.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setVideoProfileEx()

virtual int agora::rtc::IRtcEngineEx::setVideoProfileEx ( int  width,
int  height,
int  frameRate,
int  bitrate 
)
pure virtual

Specify video stream parameters based on video profile

Parameters
[in]widthwidth of video resolution in pixel
[in]heightheight of video resolution in pixel
[in]frameRateframe rate in fps
[in]bitratebit rate in kbps
Returns
return 0 if success or an error code

◆ enableDualStreamModeEx()

virtual int agora::rtc::IRtcEngineEx::enableDualStreamModeEx ( bool  enabled,
const SimulcastStreamConfig streamConfig,
const RtcConnection connection 
)
pure virtual

Enables or disables the dual video stream mode.

If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.

Parameters
enabled
  • true: Enable the dual-stream mode.
  • false: (default) Disable the dual-stream mode.
streamConfigThe minor stream config
connectionThe RtcConnection object.

◆ setDualStreamModeEx()

virtual int agora::rtc::IRtcEngineEx::setDualStreamModeEx ( SIMULCAST_STREAM_MODE  mode,
const SimulcastStreamConfig streamConfig,
const RtcConnection connection 
)
pure virtual

Enables, disables or auto enable the dual video stream mode.

If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.

Parameters
modeThe dual stream mode: SIMULCAST_STREAM_MODE.
streamConfigThe configuration of the low stream: SimulcastStreamConfig.
connectionThe RtcConnection object.

◆ enableWirelessAccelerate()

virtual int agora::rtc::IRtcEngineEx::enableWirelessAccelerate ( bool  enabled)
pure virtual

Turns WIFI acceleration on or off.

Note
  • This method is called before and after joining a channel.
  • Users check the WIFI router app for information about acceleration. Therefore, if this interface is invoked, the caller accepts that the caller's name will be displayed to the user in the WIFI router application on behalf of the caller.
Parameters
enabled
  • true:Turn WIFI acceleration on.
  • false:Turn WIFI acceleration off.
Returns
  • 0: Success.
  • < 0: Failure.

Implements agora::rtc::IRtcEngine.

◆ takeSnapshotEx()

virtual int agora::rtc::IRtcEngineEx::takeSnapshotEx ( const RtcConnection connection,
uid_t  uid,
const char *  filePath 
)
pure virtual

Takes a snapshot of a video stream.

This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.

The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.

Note
  • Call this method after joining a channel.
  • This method takes a snapshot of the published video stream specified in ChannelMediaOptions.
  • If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect.
Parameters
connectionThe RtcConnection object.
uidThe user ID. Set uid as 0 if you want to take a snapshot of the local user's video.
filePathThe local path (including filename extensions) of the snapshot. For example:
  • Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
  • iOS: /App Sandbox/Library/Caches/example.jpg
  • macOS: ~/Library/Logs/example.jpg
  • Android: /storage/emulated/0/Android/data/<package name>/files/example.jpg

Ensure that the path you specify exists and is writable.

Returns
  • 0 : Success.
  • < 0 : Failure.