Agora C++ API Reference for All Platforms
agora::rtc::IVideoDeviceCollection Class Referenceabstract

#include <IAgoraRtcEngine.h>

Public Member Functions

virtual int getCount ()=0
virtual int getDevice (int index, char deviceName[MAX_DEVICE_ID_LENGTH], char deviceId[MAX_DEVICE_ID_LENGTH])=0
virtual int setDevice (const char deviceId[MAX_DEVICE_ID_LENGTH])=0
virtual void release ()=0

Protected Member Functions

virtual ~IVideoDeviceCollection ()

Detailed Description

Video device collection methods.

The IVideoDeviceCollection interface class gets the video device information.

Constructor & Destructor Documentation

◆ ~IVideoDeviceCollection()

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

Member Function Documentation

◆ getCount()

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

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

Total number of the indexed video devices:

◆ getDevice()

virtual int agora::rtc::IVideoDeviceCollection::getDevice ( int  index,
char  deviceName[MAX_DEVICE_ID_LENGTH],
char  deviceId[MAX_DEVICE_ID_LENGTH] 
pure virtual

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

indexThe specified index of the video device that must be less than the return value of getCount.
deviceNamePointer to the video device name.
deviceIdPointer to the video device ID.
  • 0: Success.
  • < 0: Failure.

◆ setDevice()

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

Sets the device with the device ID.

deviceIdDevice ID of the device.
  • 0: Success.
  • < 0: Failure.

◆ release()

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

Releases all IVideoDeviceCollection resources.