FScreenCaptureConfiguration
屏幕采集配置。
C++
USTRUCT(BlueprintType)
struct FScreenCaptureConfiguration
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureConfiguration")
bool isCaptureWindow = false;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureConfiguration")
int displayId = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureConfiguration")
FRectangle screenRect = FRectangle();
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureConfiguration")
int64 windowId = 0;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureConfiguration")
FScreenCaptureParameters params = FScreenCaptureParameters();
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|ScreenCaptureConfiguration")
FRectangle regionRect = FRectangle();
FScreenCaptureConfiguration(){}
FScreenCaptureConfiguration(const agora::rtc::ScreenCaptureConfiguration & AgoraData){
isCaptureWindow = AgoraData.isCaptureWindow;
displayId = AgoraData.displayId;
screenRect = FRectangle(AgoraData.screenRect);
params = FScreenCaptureParameters(AgoraData.params);
regionRect = FRectangle(AgoraData.regionRect);
}
agora::rtc::ScreenCaptureConfiguration CreateAgoraData() const {
agora::rtc::ScreenCaptureConfiguration AgoraData;
AgoraData.isCaptureWindow = isCaptureWindow;
AgoraData.displayId = displayId;
AgoraData.screenRect = screenRect.CreateAgoraData();
AgoraData.params = params.CreateAgoraData();
AgoraData.regionRect = regionRect.CreateAgoraData();
return AgoraData;
}
void FreeAgoraData(agora::rtc::ScreenCaptureConfiguration & AgoraData) const {
screenRect.FreeAgoraData(AgoraData.screenRect);
params.FreeAgoraData(AgoraData.params);
regionRect.FreeAgoraData(AgoraData.regionRect);
}
};
isCaptureWindow
是否采集屏幕上的窗口:
true
:采集窗口。false
:(默认)采集屏幕,不采集窗口。
displayId
(仅适用于 macOS 平台)屏幕的 display ID。
注意
请仅在 Mac 设备上采集屏幕时使用该参数。
screenRect
(仅适用于 Windows 平台)待共享的屏幕相对于虚拟屏的位置。
注意
请仅在 Windows 设备上采集屏幕时使用该参数。
windowId
(仅适用于 Windows 和 macOS 平台)窗口 ID。
注意
请仅在采集窗口时使用该参数。
params
(仅适用于 Windows 和 macOS 平台)屏幕共享流的编码参数配置。详见 FScreenCaptureParameters。
regionRect
(仅适用于 Windows 和 macOS 平台)待共享区域相对于整个屏幕的位置。详见 FRectangle。如不填,则表示共享整个屏幕。如果设置的共享区域超出了屏幕的边界,则只共享屏幕内的内容。 如果将 FRectangle 中的 width 或 height 设为 0 ,则共享整个屏幕。