FScreenCaptureConfiguration

The configuration of the captured screen.

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);
	}
};

Attributes

isCaptureWindow
Whether to capture the window on the screen:
  • true: Capture the window.
  • false: (Default) Capture the screen, not the window.
displayId
(macOS only) The display ID of the screen.
Attention: This parameter takes effect only when you want to capture the screen on macOS.
screenRect
(Windows only) The relative position of the shared screen to the virtual screen.
Attention: This parameter takes effect only when you want to capture the screen on Windows.
windowId
(For Windows and macOS only) Window ID.
Attention: This parameter takes effect only when you want to capture the window.
params
(For Windows and macOS only) The screen capture configuration. See FScreenCaptureParameters.
regionRect
(For Windows and macOS only) The relative position of the shared region to the whole screen. See FRectangle. If you do not set this parameter, the SDK shares the whole screen. If the region you set exceeds the boundary of the screen, only the region within in the screen is shared. If you set width or height in FRectangle as 0, the whole screen is shared.