Video SDK v3.7.2 API Reference for C++, all platforms
agora::rtc::ScreenCaptureParameters Struct Reference

Public Member Functions

 ScreenCaptureParameters ()
 
 ScreenCaptureParameters (const VideoDimensions &d, int f, int b, bool c, bool focus, view_t *ex=NULL, int cnt=0)
 
 ScreenCaptureParameters (int width, int height, int f, int b, bool c, bool focus, view_t *ex=NULL, int cnt=0)
 

Public Attributes

VideoDimensions dimensions
 
int frameRate
 
int bitrate
 
bool captureMouseCursor
 
bool windowFocus
 
view_texcludeWindowList
 
int excludeWindowCount
 
int highLightWidth
 
unsigned int highLightColor
 
bool enableHighLight
 

Detailed Description

Screen sharing encoding parameters.

Note
The video profiles of the shared screen stream are only set by ScreenCaptureParameters, independent of setVideoEncoderConfiguration .

Constructor & Destructor Documentation

◆ ScreenCaptureParameters() [1/3]

agora::rtc::ScreenCaptureParameters::ScreenCaptureParameters ( )
inline

◆ ScreenCaptureParameters() [2/3]

agora::rtc::ScreenCaptureParameters::ScreenCaptureParameters ( const VideoDimensions d,
int  f,
int  b,
bool  c,
bool  focus,
view_t ex = NULL,
int  cnt = 0 
)
inline

◆ ScreenCaptureParameters() [3/3]

agora::rtc::ScreenCaptureParameters::ScreenCaptureParameters ( int  width,
int  height,
int  f,
int  b,
bool  c,
bool  focus,
view_t ex = NULL,
int  cnt = 0 
)
inline

Member Data Documentation

◆ dimensions

VideoDimensions agora::rtc::ScreenCaptureParameters::dimensions

The video encoding resolution of the shared screen stream.

The default value is 1920 * 1080 pixels, that is, 2073600 pixels. Agora uses the value of this parameter to calculate the charges.

If the aspect ratio is different between the encoding dimensions and screen dimensions, Agora applies the following algorithms for encoding. Suppose the encoding dimensions are 1920 x 1080:

  • If the value of the screen dimensions is lower than that of the encoding dimensions, for example, 1000 * 1000, the SDK uses 1000 * 1000 for encoding.
  • If the value of the screen dimensions is higher than that of the encoding dimensions, for example, 2000 * 1500, the SDK uses the maximum value under 1920 * 1080 with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 * 1080.

◆ frameRate

int agora::rtc::ScreenCaptureParameters::frameRate

The video encoding frame rate (fps) of the shared screen stream

The default value is 5. We do not recommend setting this to a value greater than 15.

◆ bitrate

int agora::rtc::ScreenCaptureParameters::bitrate

The video encoding bitrate (Kbps) of the shared screen stream.

The default value is 0 (the SDK works out a bitrate according to the dimensions of the current screen).

◆ captureMouseCursor

bool agora::rtc::ScreenCaptureParameters::captureMouseCursor

Sets whether to capture the mouse for screen sharing:

  • true: (Default) Capture the mouse.
  • false: Do not capture the mouse.

◆ windowFocus

bool agora::rtc::ScreenCaptureParameters::windowFocus

Whether to bring the window to the front when calling startScreenCaptureByWindowId to share the window:

  • true: Bring the window to the front.
  • false: (Default) Do not bring the window to the front.

◆ excludeWindowList

view_t* agora::rtc::ScreenCaptureParameters::excludeWindowList

A list of IDs of windows to be blocked.

When calling startScreenCaptureByScreenRect or startScreenCaptureByDisplayId to start screen sharing, you can use this parameter to block the specified windows.

When calling updateScreenCaptureParameters to update the configuration for screen sharing, you can use this parameter to dynamically block the specified windows during screen sharing.

Note
(Windows only) The SDK does not support you to block windows on a device with multiple graphics cards. If you set excludeWindowList on such a device, the SDK reports the error code ERR_NOT_SUPPORTED_MUTI_GPU_EXCLUDE_WINDOW(1736).

◆ excludeWindowCount

int agora::rtc::ScreenCaptureParameters::excludeWindowCount

The number of windows to be blocked.

◆ highLightWidth

int agora::rtc::ScreenCaptureParameters::highLightWidth

(macOS only) The width (px) of the border. Defaults to 0, and the value range is [0,50].

Since
v3.7.0

◆ highLightColor

unsigned int agora::rtc::ScreenCaptureParameters::highLightColor

(macOS only) The color of the border in ARGB format. The default value is 0xFF8CBF26.

Since
v3.7.0

◆ enableHighLight

bool agora::rtc::ScreenCaptureParameters::enableHighLight

(macOS only) Determines whether to place a border around the shared window or screen:

  • true: Place a border.
  • false: (Default) Do not place a border.
Note
When you share a part of a window or screen, the SDK places a border around the entire window or screen if you set enableHighLight as true.
Since
v3.7.0