Agora Java API Reference for Android
Public Member Functions | List of all members
agora::streaming::IVideoDeviceManager Class Referenceabstract

#include <IAgoraStreamingKit.h>

Public Member Functions

virtual IVideoDeviceCollectionenumerateVideoDevices ()=0
 
virtual int setDevice (const char deviceId[MAX_DEVICE_ID_LENGTH])=0
 
virtual int getDeviceInUse (char deviceId[MAX_DEVICE_ID_LENGTH], char deviceName[MAX_DEVICE_ID_LENGTH])=0
 
virtual void release ()=0
 

Detailed Description

The IVideoDeviceManager class.

Member Function Documentation

◆ enumerateVideoDevices()

virtual IVideoDeviceCollection* agora::streaming::IVideoDeviceManager::enumerateVideoDevices ( )
pure virtual

Enumerates the video capture devices.

This method returns an IVideoDeviceCollection object that includes all the video capture devices in the system. With the IVideoDeviceCollection object, the application can enumerate the video capture devices. The application must call the IVideoDeviceCollection::release() method to release the returned object after using it.

Returns
  • Returns an IVideoDeviceCollection object that includes all the video capture devices in the system when the method call succeeds.
  • Returns NULL when the method call fails.

◆ setDevice()

virtual int agora::streaming::IVideoDeviceManager::setDevice ( const char  deviceId[MAX_DEVICE_ID_LENGTH])
pure virtual

Specifies a device with the device ID.

Parameters
deviceIdID of the video capture device. You can call enumerateVideoDevices() to retrieve it. Plugging or unplugging the device does not change the device ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getDeviceInUse()

virtual int agora::streaming::IVideoDeviceManager::getDeviceInUse ( char  deviceId[MAX_DEVICE_ID_LENGTH],
char  deviceName[MAX_DEVICE_ID_LENGTH] 
)
pure virtual

Gets the video capture device that is in use.

Parameters
deviceIdAn Output parameter that specifies the ID of the video capture device.
Returns
  • 0: Success.
  • < 0: Failure.

◆ release()

virtual void agora::streaming::IVideoDeviceManager::release ( )
pure virtual

Releases all IVideoDeviceManager resources.