IScreenCaptureSourceList

The IScreenCaptureSourceList class. This class is returned in the GetScreenCaptureSources method.

GetCount

Gets the number of shareable windows and screens.

UFUNCTION(BlueprintCallable, Category = "Agora|ScreenCaptureSourceList")
	int64 GetCount();

Details

Note: This method applies to macOS and Windows only.

Returns

The number of shareable windows and screens.

GetSourceInfo

Gets information about the specified shareable window or screen.

UFUNCTION(BlueprintCallable, Category = "Agora|ScreenCaptureSourceList")
	FScreenCaptureSourceInfo GetSourceInfo(int64 index);

Details

After you get IScreenCaptureSourceList, you can pass in the index value of the specified shareable window or screen to get information about that window or screen from FScreenCaptureSourceInfo.

Note: This method applies to macOS and Windows only.

Parameters

index
The index of the specified shareable window or screen. The value range is [0, GetCount()).

Returns

FScreenCaptureSourceInfo

Release

Releases IScreenCaptureSourceList.

UFUNCTION(BlueprintCallable, Category = "Agora|ScreenCaptureSourceList")
	void Release();

Details

After you get the list of shareable windows and screens, to avoid memory leaks, call this method to release IScreenCaptureSourceList instead of deleting IScreenCaptureSourceList directly.

Note: This method applies to macOS and Windows only.

FScreenCaptureSourceInfo

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

USTRUCT(BlueprintType)
struct FScreenCaptureSourceInfo {
	GENERATED_BODY()

	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FENUMWRAP_ScreenCaptureSourceType type;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	int64 sourceId;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FString sourceName;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FThumbImageBuffer thumbImage;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FThumbImageBuffer iconImage;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FString processPath;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	FString sourceTitle;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	bool primaryMonitor;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|FScreenCaptureSourceInfo")
	bool isOccluded;
};

Attributes

type
The type of the shared target. See EENUMCUSTOM_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.