FRtcEngineContext
Configurations for the FRtcEngineContext instance.
USTRUCT(BlueprintType) struct FRtcEngineContext { GENERATED_BODY() UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") EAgoraBPuEventHandlerType EventHandlerCreationType = EAgoraBPuEventHandlerType::EventHandler; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") FString appId = ""; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") ECHANNEL_PROFILE_TYPE channelProfile = ECHANNEL_PROFILE_TYPE::CHANNEL_PROFILE_LIVE_BROADCASTING; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") FString license = ""; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") EAUDIO_SCENARIO_TYPE audioScenario = EAUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_DEFAULT; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") FENUMWRAP_AREA_CODE areaCode = EENUMCUSTOM_AREA_CODE::AREA_CODE_GLOB; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") FLogConfig logConfig; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") bool threadPriority_SetValue = false; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") ETHREAD_PRIORITY_TYPE threadPriority = ETHREAD_PRIORITY_TYPE::NORMAL; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") bool useExternalEglContext = false; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") bool domainLimit = false; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|RtcEngineContext") bool autoRegisterAgoraExtensions = true; FRtcEngineContext() {} agora::rtc::RtcEngineContext CreateAgoraData() const { agora::rtc::RtcEngineContext AgoraData; SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.appId, this->appId) AgoraData.channelProfile = (agora::CHANNEL_PROFILE_TYPE)channelProfile; SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.license, this->license) AgoraData.audioScenario = (agora::rtc::AUDIO_SCENARIO_TYPE)audioScenario; AgoraData.areaCode = areaCode.GetRawValue(); AgoraData.logConfig = logConfig.CreateAgoraData(); SET_AGORA_OPTIONAL_VAL_ASSIGN_VAL(AgoraData.threadPriority, this->threadPriority, static_cast<agora::rtc::THREAD_PRIORITY_TYPE>(this->threadPriority)) AgoraData.useExternalEglContext = useExternalEglContext; AgoraData.domainLimit = domainLimit; AgoraData.autoRegisterAgoraExtensions = autoRegisterAgoraExtensions; return AgoraData; } void FreeAgoraData(agora::rtc::RtcEngineContext& AgoraData) const { SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.appId) SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.license) logConfig.FreeAgoraData(AgoraData.logConfig); } };
Attributes
- eventHandler
- The event handler for IRtcEngine. See IRtcEngineEventHandler.
- appId
- The App ID issued by Agora for your project. Only users in apps with the same App ID can join the same channel and communicate with each other. An App ID can only be used to create one IRtcEngine instance. To change your App ID, call Release to destroy the current IRtcEngine instance, and then create a new one.
- channelProfile
-
The channel profile. See ECHANNEL_PROFILE_TYPE.
- audioScenario
- The audio scenarios. Under different audio scenarios, the device uses different volume types. See EAUDIO_SCENARIO_TYPE.
- areaCode
- The region for connection. This is an advanced feature and applies to scenarios that have regional restrictions. For details on supported regions, see FENUMWRAP_AREA_CODE. The area codes support bitwise operation.
- logConfig
-
Sets the log file size. See FLogConfig.
By default, the SDK generates five SDK log files and five API call log files with the following rules:
- The SDK log files are:
agorasdk.log
,agorasdk.1.log
,agorasdk.2.log
,agorasdk.3.log
, andagorasdk.4.log
. - The API call log files are:
agoraapi.log
,agoraapi.1.log
,agoraapi.2.log
,agoraapi.3.log
, andagoraapi.4.log
. - The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8.
- The SDK writes the latest logs in
agorasdk.log
oragoraapi.log
. - When
agorasdk.log
is full, the SDK processes the log files in the following order:- Delete the
agorasdk.4.log
file (if any). - Rename
agorasdk.3.log
toagorasdk.4.log
. - Rename
agorasdk.2.log
toagorasdk.3.log
. - Rename
agorasdk.1.log
toagorasdk.2.log
. - Create a new
agorasdk.log
file.
- Delete the
- The overwrite rules for the
agoraapi.log
file are the same as foragorasdk.log
.
- The SDK log files are:
- domainLimit
-
Whether to enable domain name restriction:
true
: Enables the domain name restriction. This value is suitable for scenarios where IoT devices use IoT cards for network access. The SDK will only connect to servers in the domain name or IP whitelist that has been reported to the operator.false
: (Default) Disables the domain name restriction. This value is suitable for most common scenarios.
- autoRegisterAgoraExtensions
-
Whether to automatically register the Agora extensions when initializing IRtcEngine:
true
: (Default) Automatically register the Agora extensions when initializing IRtcEngine.false
: Do not register the Agora extensions when initializing IRtcEngine. You need to call EnableExtension to register the Agora extensions.