Agora RTC Objective-C API Reference Refactor

Public Member Functions
INGVideoDeviceManager Class Referenceabstract

Inherits RefCountInterface.

## 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

## Detailed Description

The INGVideoDeviceManager class.

## Constructor & Destructor Documentation

## ◆ ~INGVideoDeviceManager()

~INGVideoDeviceManager | ( |  | ) |
| inline protected

## Member Function Documentation

## ◆ registerObserver()

virtual int registerObserver | ( | IVideoDeviceManagerObserver * | observer,
|  | void(*)(IVideoDeviceManagerObserver *) | safeDeleter = `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 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 getNumberOfDevices | ( |  | ) |
| pure virtual

Gets the number of video devices.

Returns
  - The number of video devices.

## ◆ getNumberOfCapabilities()

virtual int getNumberOfCapabilities | ( | const char * | deviceId | ) |
| pure virtual

Gets the number of capabilities.

Parameters

  deviceId | The device ID.

Returns
  - The number of capabilities.

## ◆ getCapability()

virtual int 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 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.

## ◆ AddRef()

virtual void AddRef | ( |  | ) | const
| pure virtual inherited

## ◆ Release()

virtual RefCountReleaseStatus Release | ( |  | ) | const
| pure virtual inherited

## ◆ HasOneRef()

virtual bool HasOneRef | ( |  | ) | const
| pure virtual inherited