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

Public Member Functions

virtual ~IVideoDeviceCollection ()
 
virtual int getCount ()=0
 
virtual int setDevice (const char deviceIdUTF8[MAX_DEVICE_ID_LENGTH])=0
 
virtual int getDevice (int index, char deviceNameUTF8[MAX_DEVICE_ID_LENGTH], char deviceIdUTF8[MAX_DEVICE_ID_LENGTH])=0
 
virtual void release ()=0
 

Detailed Description

The IVideoDeviceCollection class. You can get information related to video devices through this interface.

Constructor & Destructor Documentation

◆ ~IVideoDeviceCollection()

virtual agora::rtc::IVideoDeviceCollection::~IVideoDeviceCollection ( )
inlinevirtual

Member Function Documentation

◆ getCount()

virtual int agora::rtc::IVideoDeviceCollection::getCount ( )
pure virtual

Gets the total number of the indexed video capture devices in the system.

Returns
The total number of the indexed video capture devices.

◆ setDevice()

virtual int agora::rtc::IVideoDeviceCollection::setDevice ( const char  deviceIdUTF8[MAX_DEVICE_ID_LENGTH])
pure virtual

Specifies a device with the device ID.

Parameters
deviceIdUTF8The device ID. The maximum length is #MAX_DEVICE_ID_LENGTH_TYPE. Plugging or unplugging the audio device does not change the value of deviceId.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getDevice()

virtual int agora::rtc::IVideoDeviceCollection::getDevice ( int  index,
char  deviceNameUTF8[MAX_DEVICE_ID_LENGTH],
char  deviceIdUTF8[MAX_DEVICE_ID_LENGTH] 
)
pure virtual

Gets a specified piece of information about an indexed video device.

Parameters
indexThe index value of the video device. The value of this parameter must be less than the value returned in getCount.
deviceNameUTF8The name of the device. The maximum length is #MAX_DEVICE_ID_LENGTH.
deviceIdUTF8The device ID of the video device. The maximum length is #MAX_DEVICE_ID_LENGTH.
Returns
  • 0: Success.
  • < 0: Failure.

◆ release()

virtual void agora::rtc::IVideoDeviceCollection::release ( )
pure virtual

Releases all the resources occupied by the IVideoDeviceCollection object.