Agora C++ API Reference for All Platforms
Public Member Functions | Public Attributes | List of all members
agora::rtc::ScreenCaptureParameters Struct Reference

Public Member Functions

 ScreenCaptureParameters ()
 
 ScreenCaptureParameters (const VideoDimensions &d, int f, int b, bool c)
 
 ScreenCaptureParameters (int width, int height, int f, int b, bool c)
 

Public Attributes

VideoDimensions dimensions
 
int frameRate
 
int bitrate
 
bool captureMouseCursor
 

Detailed Description

Screen sharing encoding parameters.

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 
)
inline

◆ ScreenCaptureParameters() [3/3]

agora::rtc::ScreenCaptureParameters::ScreenCaptureParameters ( int  width,
int  height,
int  f,
int  b,
bool  c 
)
inline

Member Data Documentation

◆ dimensions

VideoDimensions agora::rtc::ScreenCaptureParameters::dimensions

The maximum encoding dimensions of the shared region in terms of width × height.

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 frame rate (fps) of the shared region.

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

◆ bitrate

int agora::rtc::ScreenCaptureParameters::bitrate

The bitrate (Kbps) of the shared region.

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 or not to capture the mouse for screen sharing:

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