Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::INGVideoDeviceManager Class Referenceabstract

`#include <NGIAgoraVideoDeviceManager.h>`

Inherits agora::RefCountInterface.

Inherited by agora::rtc::INGVideoDeviceManagerEx.

## Public Member Functions
virtual int | registerObserver (IVideoDeviceManagerObserver *observer, void(*safeDeleter)(IVideoDeviceManagerObserver *)=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | unregisterObserver (IVideoDeviceManagerObserver *observer)=0
virtual int | getNumberOfDevices ()=0
virtual int | getNumberOfCapabilities (const char *deviceId)=0
virtual int | getCapability (const char *deviceId, const uint32_t capabilityIndex, VideoFormat &capability)=0
virtual int | getDeviceInfo (int index, VideoDeviceInfo &deviceInfo)=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
| ~INGVideoDeviceManager ()
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Detailed Description

The INGVideoDeviceManager class.

## Constructor & Destructor Documentation

## ◆ ~INGVideoDeviceManager()

agora::rtc::INGVideoDeviceManager::~INGVideoDeviceManager | ( |  | ) |
| inlineprotected

## Member Function Documentation

## ◆ registerObserver()

virtual int agora::rtc::INGVideoDeviceManager::registerObserver | ( | IVideoDeviceManagerObserver * | observer,
|  | void(* | safeDeleter )(IVideoDeviceManagerObserver *) = NULL,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

Registers an IVideoDeviceManagerObserver object.

You need to implement the IAudioDeviceManageObserver class in this method, and register callbacks according to your scenario.

Parameters

  observer | A pointer to the IVideoDeviceManagerObserver class.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ unregisterObserver()

virtual int agora::rtc::INGVideoDeviceManager::unregisterObserver | ( | IVideoDeviceManagerObserver * | observer | ) |
| pure virtual

Releases the IVideoDeviceManagerObserver object.

Parameters

  observer | The pointer to the IVideoDeviceManagerObserver class registered using registerObserver.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ getNumberOfDevices()

virtual int agora::rtc::INGVideoDeviceManager::getNumberOfDevices | ( |  | ) |
| pure virtual

Gets the number of video devices.

Returns
  - The number of video devices.

## ◆ getNumberOfCapabilities()

virtual int agora::rtc::INGVideoDeviceManager::getNumberOfCapabilities | ( | const char * | deviceId | ) |
| pure virtual

Gets the number of capabilities.

Parameters

  deviceId | The device ID.

Returns
  - The number of capabilities.

## ◆ getCapability()

virtual int agora::rtc::INGVideoDeviceManager::getCapability | ( | const char * | deviceId,
|  | const uint32_t | capabilityIndex,
|  | VideoFormat & | capability )
| pure virtual

Gets the capability of a specified device.

Parameters

  deviceId | The device ID.
  capabilityIndex | The capability index of the device.
  capability | The reference to the video capability. See `VideoFormat`.

Returns
  - The capability of the device.

## ◆ getDeviceInfo()

virtual int agora::rtc::INGVideoDeviceManager::getDeviceInfo | ( | int | index,
|  | VideoDeviceInfo & | deviceInfo )
| pure virtual

Gets the device information.

Parameters

  index | The index of the device.
  deviceInfo | The device information.

Returns
  - 0: Success.
  - < 0: Failure.