IScreenCaptureSourceList
The IScreenCaptureSourceList class. This class is returned in the getScreenCaptureSources method.
getCount
Gets the number of shareable windows and screens.
virtual unsigned int getCount() = 0;
Returns
The number of shareable windows and screens.
getSourceInfo
Gets information about the specified shareable window or screen.
virtual ScreenCaptureSourceInfo getSourceInfo(unsigned int index) = 0;
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 ScreenCaptureSourceInfo.
Parameters
- index
- The index of the specified shareable window or screen. The value range is [0, getCount
()
).
Returns
ScreenCaptureSourceInforelease
Releases IScreenCaptureSourceList.
virtual void release() = 0;
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.
ScreenCaptureSourceInfo
The information about the specified shareable window or screen. It is returned in IScreenCaptureSourceList.
struct ScreenCaptureSourceInfo { ScreenCaptureSourceType type; view_t sourceId; const char* sourceName; ThumbImageBuffer thumbImage; ThumbImageBuffer iconImage; const char* processPath; const char* sourceTitle; bool primaryMonitor; bool isOccluded; #if defined(_WIN32) bool minimizeWindow; ScreenCaptureSourceInfo() : type(ScreenCaptureSourceType_Unknown), sourceId(nullptr), sourceName(nullptr), processPath(nullptr), sourceTitle(nullptr), primaryMonitor(false), isOccluded(false), minimizeWindow(false) {} #else ScreenCaptureSourceInfo() : type(ScreenCaptureSourceType_Unknown), sourceId(nullptr), sourceName(nullptr), processPath(nullptr), sourceTitle(nullptr), primaryMonitor(false), isOccluded(false) {} #endif };
Attributes
- type
- The type of the shared target. See 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 ThumbImageBuffer.
- iconImage
- The image content of the icon. See ThumbImageBuffer.
- 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.
- minimizeWindow
- (For Windows only) Whether the window is minimized:
true
: The window is minimized.false
: The window is not minimized.