FChannelMediaRelayConfiguration

Configuration of cross channel media relay.

USTRUCT(BlueprintType)
struct FChannelMediaRelayConfiguration
{
	GENERATED_BODY()
public:
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ChannelMediaRelayConfiguration")
	FChannelMediaInfo srcInfo = FChannelMediaInfo();
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ChannelMediaRelayConfiguration")
	TArray<FChannelMediaInfo> destInfos;
	
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ChannelMediaRelayConfiguration")
	int destCount = 0;
	FChannelMediaRelayConfiguration(){}
	FChannelMediaRelayConfiguration(const agora::rtc::ChannelMediaRelayConfiguration & AgoraData){
		srcInfo = FChannelMediaInfo(*(AgoraData.srcInfo));
		destCount = AgoraData.destCount;
		for(int i = 0; i< destCount; i++){
			destInfos.Add(FChannelMediaInfo(AgoraData.destInfos[i]));
		}
	}
	agora::rtc::ChannelMediaRelayConfiguration CreateAgoraData() const {
		agora::rtc::ChannelMediaRelayConfiguration AgoraData;
		
		SET_UABT_UECUSTOMDATA_TO_AGORA_PTR_1_ENTRY___MEMALLOC(AgoraData.srcInfo,agora::rtc::ChannelMediaInfo, this->srcInfo)
		AgoraData.destCount = destCount;
		SET_UABT_TARRARY_CUSTOMDATA_TO_AGORA_ARRAY___MEMALLOC(AgoraData.destInfos, agora::rtc::ChannelMediaInfo, destCount, this->destInfos)
		return AgoraData;
	}
	void FreeAgoraData(agora::rtc::ChannelMediaRelayConfiguration & AgoraData) const {
		SET_UABT_UECUSTOMDATA_TO_AGORA_PTR_1_ENTRY___MEMFREE(AgoraData.srcInfo, FChannelMediaInfo)
		SET_UABT_TARRARY_CUSTOMDATA_TO_AGORA_ARRAY___MEMFREE(AgoraData.destInfos, destCount, FChannelMediaInfo)
	}
};

Attributes

srcInfo
The information of the source channel. See FChannelMediaInfo. It contains the following members:
  • channelName: The name of the source channel. The default value is NULL, which means the SDK applies the name of the current channel.
  • token: The token for joining the source channel. This token is generated with the channelName and uid you set in srcInfo.
    • If you have not enabled the App Certificate, set this parameter as the default value NULL, which means the SDK applies the App ID.
    • If you have enabled the App Certificate, you must use the token generated with the channelName and uid, and the uid must be set as 0.
  • uid: The unique user ID to identify the relay stream in the source channel. Agora recommends leaving the default value of 0 unchanged.
destInfos
The information of the target channel FChannelMediaInfo. It contains the following members:
  • channelName: The name of the target channel.
  • token: The token for joining the target channel. It is generated with the channelName and uid you set in destInfos.
    • If you have not enabled the App Certificate, set this parameter as the default value NULL, which means the SDK applies the App ID.
    • If you have enabled the App Certificate, you must use the token generated with the channelName and uid.
    Attention:

    If the token of any target channel expires, the whole media relay stops; hence Agora recommends that you specify the same expiration time for the tokens of all the target channels.

  • uid: The unique user ID to identify the relay stream in the target channel. The value ranges from 0 to (2 32-1). To avoid user ID conflicts, this user ID must be different from any other user ID in the target channel. The default value is 0, which means the SDK generates a random user ID.
destCount
The number of target channels. The default value is 0, and the value range is from 0 to 6. Ensure that the value of this parameter corresponds to the number of FChannelMediaInfo structs you define in destInfo.