17struct TConnectionInfo;
18struct RtcConnectionConfiguration;
19struct RtmpConnectionConfiguration;
20class ILocalAudioTrack;
21class IAudioPcmDataSender;
22class IAudioEncodedFrameSender;
23class IVideoFrameSender;
24class IVideoEncodedImageSender;
25class IVideoSourceNode;
26class IVideoMixerSource;
27class ILocalVideoTrack;
28class IMediaNodeFactory;
50class ISignalingEngine;
55class IServiceObserver;
124 IServiceObserver* serviceObserver;
135 bool useExternalEglContext;
157 serviceObserver(NULL),
158 useExternalEglContext(false){}
164struct AudioSessionConfiguration {
260 void SetAll(AudioSessionConfiguration& change) {
261 SetFrom(&playbackAndRecord, change.playbackAndRecord);
262 SetFrom(&chatMode, change.chatMode);
263 SetFrom(&defaultToSpeaker, change.defaultToSpeaker);
264 SetFrom(&overrideSpeaker, change.overrideSpeaker);
265 SetFrom(&allowMixWithOthers, change.allowMixWithOthers);
266 SetFrom(&allowBluetooth, change.allowBluetooth);
267 SetFrom(&allowBluetoothA2DP, change.allowBluetoothA2DP);
268 SetFrom(&sampleRate, change.sampleRate);
269 SetFrom(&ioBufferDuration, change.ioBufferDuration);
270 SetFrom(&inputNumberOfChannels, change.inputNumberOfChannels);
271 SetFrom(&outputNumberOfChannels, change.outputNumberOfChannels);
274 bool operator==(
const AudioSessionConfiguration& o)
const {
275 return playbackAndRecord == o.playbackAndRecord && chatMode == o.chatMode &&
276 defaultToSpeaker == o.defaultToSpeaker && overrideSpeaker == o.overrideSpeaker &&
277 allowMixWithOthers == o.allowMixWithOthers && allowBluetooth == o.allowBluetooth &&
278 allowBluetoothA2DP == o.allowBluetoothA2DP && sampleRate == o.sampleRate &&
279 ioBufferDuration == o.ioBufferDuration &&
280 inputNumberOfChannels == o.inputNumberOfChannels &&
281 outputNumberOfChannels == o.outputNumberOfChannels;
283 bool operator!=(
const AudioSessionConfiguration& o)
const {
return !(*
this == o); }
286 template <
typename T>
287 static void SetFrom(Optional<T>* s,
const Optional<T>& o) {
335class IServiceObserver {
337 virtual ~IServiceObserver() {}
343 virtual void onPermissionError(agora::rtc::PERMISSION_TYPE permissionType) {}
348 virtual void onAudioDeviceError(ERROR_CODE_TYPE error,
const char* description) {}
377 virtual void atExit() = 0;
409 virtual int setAudioSessionConfiguration(
const AudioSessionConfiguration& config) = 0;
419 virtual int getAudioSessionConfiguration(AudioSessionConfiguration* config) = 0;
440 virtual int setLogFile(
const char* filePath,
unsigned int fileSize) = 0;
510 agora_refptr<rtc::IAudioPcmDataSender> audioSource) = 0;
525 agora_refptr<rtc::IAudioPcmDataSender> audioSource) = 0;
541 agora_refptr<rtc::IAudioPcmDataSender> audioSource,
bool enableAec) = 0;
559 agora_refptr<rtc::IAudioPcmDataSender> audioSource,
560 agora_refptr<rtc::IAudioPcmDataSender> audioReverseSource,
int audioSourceDelay) = 0;
575 agora_refptr<rtc::IAudioEncodedFrameSender> audioSource,
TMixMode mixMode) = 0;
613 agora_refptr<rtc::IVideoFrameSender> videoSource,
const char*
id =
OPTIONAL_NULLPTR) = 0;
629 agora_refptr<rtc::IVideoEncodedImageSender> videoSource,
630 const rtc::SenderOptions& options,
#define AGORA_CALL
Definition: AgoraBase.h:65
#define AGORA_API
Definition: AgoraBase.h:64
#define OPTIONAL_NULLPTR
Definition: AgoraBase.h:81
Definition: AgoraOptional.h:413
Definition: IAgoraService.h:361
virtual agora_refptr< rtc::ILocalAudioTrack > createDirectCustomAudioTrack(agora_refptr< rtc::IAudioPcmDataSender > audioSource)=0
virtual int setAudioSessionPreset(agora::rtc::AUDIO_SCENARIO_TYPE scenario)=0
virtual agora_refptr< rtc::ILocalVideoTrack > createCustomVideoTrack(agora_refptr< rtc::IVideoFrameSender > videoSource, const char *id=OPTIONAL_NULLPTR)=0
virtual agora_refptr< rtc::ILocalAudioTrack > createCustomAudioTrack(agora_refptr< rtc::IAudioPcmDataSender > audioSource)=0
virtual int setLogFilter(unsigned int filters)=0
virtual agora_refptr< rtc::ILocalVideoTrack > createMixedVideoTrack(agora_refptr< rtc::IVideoMixerSource > videoSource, const char *id=OPTIONAL_NULLPTR)=0
virtual int setLogFile(const char *filePath, unsigned int fileSize)=0
virtual int initialize(const AgoraServiceConfiguration &config)=0
virtual agora_refptr< rtc::ILocalVideoTrack > createCustomVideoTrack(agora_refptr< rtc::IVideoEncodedImageSender > videoSource, const rtc::SenderOptions &options, const char *id=OPTIONAL_NULLPTR)=0
virtual agora_refptr< rtc::IMediaNodeFactory > createMediaNodeFactory()=0
virtual agora_refptr< rtc::ILocalAudioTrack > createLocalAudioTrack()=0
virtual ~IAgoraService()
Definition: IAgoraService.h:634
virtual agora_refptr< rtc::ILocalAudioTrack > createCustomAudioTrack(agora_refptr< rtc::IAudioEncodedFrameSender > audioSource, TMixMode mixMode)=0
virtual agora_refptr< rtc::IRtcConnection > createRtcConnection(const rtc::RtcConnectionConfiguration &cfg)=0
virtual agora_refptr< rtc::IRtmpConnection > createRtmpConnection(const rtc::RtmpConnectionConfiguration &cfg)=0
AGORA_API agora::base::IAgoraService *AGORA_CALL createAgoraService()
TMixMode
Definition: IAgoraService.h:297
@ MIX_ENABLED
Definition: IAgoraService.h:301
@ MIX_DISABLED
Definition: IAgoraService.h:305
AUDIO_SCENARIO_TYPE
Definition: AgoraBase.h:2634
@ AUDIO_SCENARIO_DEFAULT
Definition: AgoraBase.h:2604
TCcMode
Definition: AgoraBase.h:4974
@ CC_ENABLED
Definition: AgoraBase.h:4978
AUDIO_PROFILE_TYPE
Definition: AgoraBase.h:2599
VIDEO_CODEC_TYPE
Definition: AgoraBase.h:1552
@ VIDEO_CODEC_H264
Definition: AgoraBase.h:1564
@ AREA_CODE_GLOB
Definition: AgoraBase.h:4372
Definition: AgoraBase.h:86
bool operator!=(const Optional< T > &lhs, const Optional< U > &rhs)
Definition: AgoraOptional.h:692
bool operator==(const Optional< T > &lhs, const Optional< U > &rhs)
Definition: AgoraOptional.h:683
CHANNEL_PROFILE_TYPE
Definition: AgoraBase.h:306
@ CHANNEL_PROFILE_LIVE_BROADCASTING
Definition: AgoraBase.h:318
Definition: IAgoraService.h:62
agora::CHANNEL_PROFILE_TYPE channelProfile
Definition: IAgoraService.h:107
commons::LogConfig logConfig
Definition: IAgoraService.h:115
bool domainLimit
Definition: IAgoraService.h:146
unsigned int areaCode
Definition: IAgoraService.h:103
bool useStringUid
Definition: IAgoraService.h:119
bool enableAudioDevice
Definition: IAgoraService.h:79
const char * appId
Definition: IAgoraService.h:96
bool enableAudioProcessor
Definition: IAgoraService.h:68
rtc::AUDIO_SCENARIO_TYPE audioScenario
Definition: IAgoraService.h:111
bool enableVideo
Definition: IAgoraService.h:85
AgoraServiceConfiguration()
Definition: IAgoraService.h:148
Definition: IAgoraService.h:311
rtc::VIDEO_CODEC_TYPE codecType
Definition: IAgoraService.h:319
rtc::TCcMode ccMode
Definition: IAgoraService.h:315
SenderOptions()
Definition: IAgoraService.h:326
int targetBitrate
Definition: IAgoraService.h:324
Definition: IAgoraLog.h:123
Definition: IAgoraService.h:33
AudioEncoderConfiguration()
Definition: IAgoraService.h:44
AUDIO_PROFILE_TYPE audioProfile
Definition: IAgoraService.h:37
Definition: NGIAgoraRtcConnection.h:55
Definition: NGIAgoraRtmpConnection.h:208