Agora C++ API Reference for All Platforms
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::IScreenCapturer2 Class Referenceabstract

Inherits agora::RefCountInterface.

Inherited by agora::rtc::IScreenCapturerEx2.

Public Member Functions

virtual int setScreenCaptureDimensions (const VideoDimensions &dimensions)=0
 
virtual int updateScreenCaptureRegion (const Rectangle &regionRect)=0
 
virtual int setFrameRate (int rate)=0
 
virtual int setAudioRecordConfig (int channels, int sampleRate)=0
 
virtual int setAudioVolume (uint32_t volume)=0
 
- Public Member Functions inherited from agora::RefCountInterface
virtual void AddRef () const =0
 
virtual RefCountReleaseStatus Release () const =0
 
virtual bool HasOneRef () const =0
 

Protected Member Functions

virtual ~IScreenCapturer2 ()
 
- Protected Member Functions inherited from agora::RefCountInterface
virtual ~RefCountInterface ()
 

Constructor & Destructor Documentation

◆ ~IScreenCapturer2()

virtual agora::rtc::IScreenCapturer2::~IScreenCapturer2 ( )
inlineprotectedvirtual

Member Function Documentation

◆ setScreenCaptureDimensions()

virtual int agora::rtc::IScreenCapturer2::setScreenCaptureDimensions ( const VideoDimensions dimensions)
pure virtual

Screen capture's resolution.

Parameters
dimensionsThe reference to the captured screen's resolution in terms of width × height.
  • If you set width or height as 0, the dimensions will be the screen's width × height.
Returns
  • 0: Success.
  • < 0: Failure.
    • ERR_INVALID_ARGUMENT if data is null.

◆ updateScreenCaptureRegion()

virtual int agora::rtc::IScreenCapturer2::updateScreenCaptureRegion ( const Rectangle regionRect)
pure virtual

Updates the screen capture region.

Parameters
regionRectThe reference to the relative location of the region to the screen or window. See Rectangle.
  • If the specified region overruns the screen or window, the screen capturer captures only the region within it.
  • If you set width or height as 0, the SDK shares the whole screen or window.
Returns
  • 0: Success.
  • < 0: Failure.
    • No screen or window is being shared.

◆ setFrameRate()

virtual int agora::rtc::IScreenCapturer2::setFrameRate ( int  rate)
pure virtual

Set frame rate of the screen capture source

Parameters
rateframe rate (in fps)

◆ setAudioRecordConfig()

virtual int agora::rtc::IScreenCapturer2::setAudioRecordConfig ( int  channels,
int  sampleRate 
)
pure virtual

Set channels and sample rate of screen audio capturing

Parameters
channelschannels of system audio capture
sampleRatesample rate of system audio capture
Returns
  • 0: Sucess.
  • < 0: Failure

◆ setAudioVolume()

virtual int agora::rtc::IScreenCapturer2::setAudioVolume ( uint32_t  volume)
pure virtual

Set volume of screen audio capturing

Parameters
volumevolume of system audio capture
Returns
  • 0: Sucess.
  • < 0: Failure