Video SDK v3.7.1 API Reference for Unity
Public Member Functions | List of all members
agora_gaming_rtc.VideoDeviceManager Class Reference

Inherits agora_gaming_rtc.IVideoDeviceManager.

Public Member Functions

override bool CreateAVideoDeviceManager ()
 
override int ReleaseAVideoDeviceManager ()
 
override int StartVideoDeviceTest (IntPtr hwnd)
 
override int StopVideoDeviceTest ()
 
override int GetVideoDeviceCount ()
 
override int GetVideoDevice (int index, ref string deviceName, ref string deviceId)
 
override int GetCurrentVideoDevice (ref string deviceId)
 
override int SetVideoDevice (string deviceId)
 

Detailed Description

The definition of the VideoDeviceManager. The APIs of this class are only available on Windows and macOS.

Member Function Documentation

◆ GetInstance()

static VideoDeviceManager agora_gaming_rtc.VideoDeviceManager.GetInstance ( IRtcEngine  rtcEngine)
static

◆ ReleaseInstance()

static void agora_gaming_rtc.VideoDeviceManager.ReleaseInstance ( )
static

◆ SetEngine()

void agora_gaming_rtc.VideoDeviceManager.SetEngine ( IRtcEngine  engine)

◆ CreateAVideoDeviceManager()

override bool agora_gaming_rtc.VideoDeviceManager.CreateAVideoDeviceManager ( )
virtual

Create a VideoDeviceManager instance.

Note
Returns
  • true: Success.
  • false: Failure.

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ ReleaseAVideoDeviceManager()

override int agora_gaming_rtc.VideoDeviceManager.ReleaseAVideoDeviceManager ( )
virtual

Release a VideoDeviceManager instance.

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

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ StartVideoDeviceTest()

override int agora_gaming_rtc.VideoDeviceManager.StartVideoDeviceTest ( IntPtr  hwnd)
virtual

Starts the video capturing device test.

This method tests whether the video capturing device works properly. Before calling this method, ensure that you have already called the EnableVideo method, and the window handle (hwnd) parameter is valid.

Note
Ensure that you call StopVideoDeviceTest after calling this method.
Parameters
hwndThe window handle used to display the screen.
Returns
  • 0: Success.
  • < 0: Failure.

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ StopVideoDeviceTest()

override int agora_gaming_rtc.VideoDeviceManager.StopVideoDeviceTest ( )
virtual

Stops the video capturing device test.

Note
Ensure that you call this method to stop the test after calling StartVideoDeviceTest.
Returns
  • 0: Success.
  • < 0: Failure.

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ GetVideoDeviceCount()

override int agora_gaming_rtc.VideoDeviceManager.GetVideoDeviceCount ( )
virtual

Retrieves the total number of the indexed video capturing devices in the system.

Returns
Total number of the indexed video capturing devices.

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ GetVideoDevice()

override int agora_gaming_rtc.VideoDeviceManager.GetVideoDevice ( int  index,
ref string  deviceName,
ref string  deviceId 
)
virtual

Retrieves the video capturing device associated with the index.

After calling this method, the SDK retrieves the device name and device ID according to the index.

Note
Call GetVideoDeviceCount before this method.
Parameters
indexThe index of the capturing device in the system. The value of index is associated with the number of the capturing device which is retrieved from GetVideoDeviceCount. For example, when the number of capturing devices is 3, the value range of index is [0,2].
deviceNameThe name of the capturing device for the corresponding index.
deviceIdThe ID of the capturing device for the corresponding index.
Returns
  • 0: Success.
  • < 0: Failure.

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ GetCurrentVideoDevice()

override int agora_gaming_rtc.VideoDeviceManager.GetCurrentVideoDevice ( ref string  deviceId)
virtual

Retrieves the device ID of the current video capturing device.

Parameters
deviceIdThe device ID of the current video capturing device.
Returns
  • 0: Success.
  • < 0: Failure.

Implements agora_gaming_rtc.IVideoDeviceManager.

◆ SetVideoDevice()

override int agora_gaming_rtc.VideoDeviceManager.SetVideoDevice ( string  deviceId)
virtual

Sets the video capturing device using the device ID.

Note
  • Call GetVideoDevice before this method.
  • Plugging or unplugging the video device does not change the device ID.
Parameters
deviceIdDevice ID of the video capturing device, retrieved by calling GetVideoDevice.
Returns
  • 0: Success.
  • < 0: Failure.

Implements agora_gaming_rtc.IVideoDeviceManager.


The documentation for this class was generated from the following file: