FTranscodingVideoStream
参与本地合图的视频流。
C++
USTRUCT(BlueprintType)
struct FTranscodingVideoStream {
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
EVIDEO_SOURCE_TYPE sourceType = EVIDEO_SOURCE_TYPE::VIDEO_SOURCE_CAMERA_PRIMARY;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int64 remoteUserUid = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
FString imageUrl = "";
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int mediaPlayerId = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int x = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int y = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int width = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int height = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
int zOrder = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
float alpha = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|TranscodingVideoStream")
bool mirror = false;
FTranscodingVideoStream(){}
FTranscodingVideoStream(const agora::rtc::TranscodingVideoStream & AgoraData){
sourceType = static_cast<EVIDEO_SOURCE_TYPE>(AgoraData.sourceType);
remoteUserUid = AgoraData.remoteUserUid;
imageUrl = UTF8_TO_TCHAR(AgoraData.imageUrl);
mediaPlayerId = AgoraData.mediaPlayerId;
x = AgoraData.x;
y = AgoraData.y;
width = AgoraData.width;
height = AgoraData.height;
zOrder = AgoraData.zOrder;
alpha = AgoraData.alpha;
mirror = AgoraData.mirror;
}
agora::rtc::TranscodingVideoStream CreateAgoraData() const{
agora::rtc::TranscodingVideoStream AgoraData;
AgoraData.sourceType = static_cast<agora::rtc::VIDEO_SOURCE_TYPE>(sourceType);
AgoraData.remoteUserUid = remoteUserUid;
SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.imageUrl,this->imageUrl)
AgoraData.mediaPlayerId = mediaPlayerId;
AgoraData.x = x;
AgoraData.y = y;
AgoraData.width = width;
AgoraData.height = height;
AgoraData.zOrder = zOrder;
AgoraData.alpha = alpha;
AgoraData.mirror = mirror;
return AgoraData;
}
void FreeAgoraData(agora::rtc::TranscodingVideoStream & AgoraData) const{
SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.imageUrl)
}
};
sourceType
参与本地合图的视频源类型。详见 EVIDEO_SOURCE_TYPE。
remoteUserUid
远端用户 ID。
注意
请仅在参与本地合图的视频源类型为 VIDEO_SOURCE_REMOTE 时,使用该参数。
imageUrl
图像的 URL。
注意
请仅在参与本地合图的视频源类型为图片时,使用该参数。
mediaPlayerId
(可选)媒体播放器 ID。当你将 sourceType 设置为 VIDEO_SOURCE_MEDIA_PLAYER 时,需要设置该参数。
x
参与本地合图的视频的左上角相对于合图画布左上角(原点)的横向位移。
y
参与本地合图的视频的左上角相对于合图画布左上角(原点)的纵向位移。
width
参与本地合图的视频的宽度 (px)。
height
参与本地合图的视频的高度 (px)。
zOrder
参与本地合图的视频所属的图层的编号。取值范围为 [0,100]。
- 0:(默认值)图层在最下层。
- 100: 图层在最上层。
alpha
参与本地合图的视频的透明度。取值范围为 [0.0,1.0]。 0.0 表示透明度为完全透明,1.0 表示透明度为完全不透明。
mirror
是否对参与本地合图的的视频进行镜像:
true
: 将参与本地合图的视频进行镜像。false
: (默认值)不将参与本地合图的视频进行镜像。
注意
该参数仅对视频源类型为摄像头的视频生效。