Voice 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

◆ CreateAVideoDeviceManager()

override bool agora_gaming_rtc.VideoDeviceManager.CreateAVideoDeviceManager ( )

Create a VideoDeviceManager instance.

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

◆ GetCurrentVideoDevice()

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

Retrieves the device ID of the current video capturing device.

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

◆ GetVideoDevice()

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

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
index The 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].
deviceName The name of the capturing device for the corresponding index.
deviceId The ID of the capturing device for the corresponding index.
Returns
  • 0: Success.
  • < 0: Failure.

◆ GetVideoDeviceCount()

override int agora_gaming_rtc.VideoDeviceManager.GetVideoDeviceCount ( )

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

Returns
Total number of the indexed video capturing devices.

◆ ReleaseAVideoDeviceManager()

override int agora_gaming_rtc.VideoDeviceManager.ReleaseAVideoDeviceManager ( )

Release a VideoDeviceManager instance.

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

◆ SetVideoDevice()

override int agora_gaming_rtc.VideoDeviceManager.SetVideoDevice ( string  deviceId )

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
deviceId Device ID of the video capturing device, retrieved by calling GetVideoDevice.
Returns
  • 0: Success.
  • < 0: Failure.

◆ StartVideoDeviceTest()

override int agora_gaming_rtc.VideoDeviceManager.StartVideoDeviceTest ( IntPtr  hwnd )

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
hwnd The window handle used to display the screen.
Returns
  • 0: Success.
  • < 0: Failure.

◆ StopVideoDeviceTest()

override int agora_gaming_rtc.VideoDeviceManager.StopVideoDeviceTest ( )

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.

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