FScreenCaptureSourceInfo

The information about the specified shareable window or screen. The information is returned in IScreenCaptureSourceList.

USTRUCT(BlueprintType)
struct FScreenCaptureSourceInfo {
	GENERATED_BODY()
public:
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FENUMWRAP_ScreenCaptureSourceType type = FENUMWRAP_ScreenCaptureSourceType();
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	int64 sourceId = 0;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FString sourceName = "";
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FThumbImageBuffer thumbImage = FThumbImageBuffer();
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FThumbImageBuffer iconImage = FThumbImageBuffer();
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FString processPath = "";
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FString sourceTitle = "";
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	bool primaryMonitor = false;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	bool isOccluded = false;
	
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FRectangle position = FRectangle();
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	bool minimizeWindow = false;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	int64 sourceDisplayId = 0;
#if defined(_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
	FScreenCaptureSourceInfo(){}
	FScreenCaptureSourceInfo(const agora::rtc::ScreenCaptureSourceInfo & AgoraData){
		type = AgoraData.type;
		sourceId = UABT::FromViewToInt(AgoraData.sourceId);
		sourceName = UTF8_TO_TCHAR(AgoraData.sourceName);
		thumbImage = FThumbImageBuffer(AgoraData.thumbImage);
		iconImage = FThumbImageBuffer(AgoraData.iconImage);
		processPath = UTF8_TO_TCHAR(AgoraData.processPath);
		sourceTitle = UTF8_TO_TCHAR(AgoraData.sourceTitle);
		primaryMonitor = AgoraData.primaryMonitor;
		isOccluded = AgoraData.isOccluded;
		position = FRectangle(AgoraData.position);
#if defined(_WIN32)
		minimizeWindow = AgoraData.minimizeWindow;
		sourceDisplayId = UABT::FromViewToInt(AgoraData.sourceDisplayId);
#endif
	}
	agora::rtc::ScreenCaptureSourceInfo CreateAgoraData() const {
		agora::rtc::ScreenCaptureSourceInfo AgoraData;
		AgoraData.type = static_cast<agora::rtc::ScreenCaptureSourceType>(type.GetRawValue());
		AgoraData.sourceId = UABT::ToView(sourceId);
		SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.sourceName, sourceName)
		AgoraData.thumbImage = thumbImage.CreateAgoraData();
		AgoraData.iconImage = iconImage.CreateAgoraData();
		SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.processPath, processPath)
		SET_UABT_FSTRING_TO_CONST_CHAR___MEMALLOC(AgoraData.sourceTitle, sourceTitle)
		AgoraData.primaryMonitor = primaryMonitor;
		AgoraData.isOccluded = isOccluded;
		AgoraData.position = position.CreateAgoraData();
#if defined(_WIN32)
		AgoraData.minimizeWindow = minimizeWindow;
		AgoraData.sourceDisplayId = UABT::ToView(sourceDisplayId);
#endif
		return AgoraData;
	}
	void FreeAgoraData(agora::rtc::ScreenCaptureSourceInfo & AgoraData) const {
		SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.sourceName)
		thumbImage.FreeAgoraData(AgoraData.thumbImage);
		thumbImage.FreeAgoraData(AgoraData.iconImage);
		SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.processPath)
		SET_UABT_FSTRING_TO_CONST_CHAR___MEMFREE(AgoraData.sourceTitle)
		position.FreeAgoraData(AgoraData.position);
	}
#endif
};

Attributes

type
The type of the shared target. See FENUMWRAP_ScreenCaptureSourceType.
sourceId
The window ID for a window or the display ID for a screen.
sourceName
The name of the window or screen. UTF-8 encoding.
thumbImage
The image content of the thumbnail. See FThumbImageBuffer.
iconImage
The image content of the icon. See FThumbImageBuffer.
processPath
The process to which the window belongs. UTF-8 encoding.
sourceTitle
The title of the window. UTF-8 encoding.
primaryMonitor
Determines whether the screen is the primary display:
  • true: The screen is the primary display.
  • false: The screen is not the primary display.
position
The position of a window relative to the entire screen space (including all shareable screens). See FRectangle.
minimizeWindow
(For Windows only) Whether the window is minimized:
  • true: The window is minimized.
  • false: The window is not minimized.
sourceDisplayId
(For Windows only) Screen ID where the window is located. If the window is displayed across multiple screens, this parameter indicates the ID of the screen with which the window has the largest intersection area. If the window is located outside of the visible screens, the value of this member is -2.