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

#include <IAgoraRtcEngine.h>

Public Member Functions

virtual IVideoDeviceCollectionenumerateVideoDevices ()=0
 
virtual int setDevice (const char deviceIdUTF8[MAX_DEVICE_ID_LENGTH])=0
 
virtual int getDevice (char deviceIdUTF8[MAX_DEVICE_ID_LENGTH])=0
 
virtual int startDeviceTest (view_t hwnd)=0
 
virtual int stopDeviceTest ()=0
 
virtual void release ()=0
 

Detailed Description

The IVideoDeviceManager class.

Member Function Documentation

◆ enumerateVideoDevices()

virtual IVideoDeviceCollection* agora::rtc::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 app can enumerate the video capture devices. Ensure that you call the IVideoDeviceCollection::release method to release the returned object after using it.

Returns
  • A pointer to the IVideoDeviceCollection object that includes all the video capture devices in the system, if the method call succeeds.
  • The empty pointed NULL, if the method call fails.

◆ setDevice()

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

Specifies a device with the device ID.

Parameters
deviceIdUTF8ID of the video capture device. Plugging or unplugging the device does not change the device ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getDevice()

virtual int agora::rtc::IVideoDeviceManager::getDevice ( char  deviceIdUTF8[MAX_DEVICE_ID_LENGTH])
pure virtual

Gets the video capture device that is in use.

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

◆ startDeviceTest()

virtual int agora::rtc::IVideoDeviceManager::startDeviceTest ( view_t  hwnd)
pure virtual

Starts the video capture device test.

This method tests whether the video capture device works properly. Before calling this method, ensure that you have already called enableVideo, and the HWND window handle of the incoming parameter is valid.

Parameters
hwndAn Output parameter that specifies the window handle to display the video.
Returns
  • 0: Success.
  • < 0: Failure.

◆ stopDeviceTest()

virtual int agora::rtc::IVideoDeviceManager::stopDeviceTest ( )
pure virtual

Stops the video capture device test.

Returns
  • 0: Success.
  • < 0: Failure.

◆ release()

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

Releases all IVideoDeviceManager resources.