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.

Member Function Documentation

◆ CreateAVideoDeviceManager()

override bool agora_gaming_rtc.VideoDeviceManager.CreateAVideoDeviceManager ( )

Create a VideoDeviceManager instance.

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

◆ ReleaseAVideoDeviceManager()

override int agora_gaming_rtc.VideoDeviceManager.ReleaseAVideoDeviceManager ( )

Release a VideoDeviceManager instance.

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

◆ StartVideoDeviceTest()

override int agora_gaming_rtc.VideoDeviceManager.StartVideoDeviceTest ( IntPtr  hwnd)

Starts the video recording device test.

This method tests whether the video recording 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.

◆ StopVideoDeviceTest()

override int agora_gaming_rtc.VideoDeviceManager.StopVideoDeviceTest ( )

Stops the video recording device test.

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

◆ GetVideoDeviceCount()

override int agora_gaming_rtc.VideoDeviceManager.GetVideoDeviceCount ( )

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

Returns
Total number of the indexed video recording devices.

◆ GetVideoDevice()

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

Retrieves the video recording 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 recording device in the system. The value of index is associated with the number of the recording device which is retrieved from GetVideoDeviceCount. For example, when the number of recording devices is 3, the value range of index is [0,2].
deviceNameThe name of the recording device for the corresponding index.
deviceIdThe ID of the recording device for the corresponding index.
Returns
  • 0: Success.
  • < 0: Failure.

◆ GetCurrentVideoDevice()

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

Retrieves the device ID of the current video recording device.

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

◆ SetVideoDevice()

override int agora_gaming_rtc.VideoDeviceManager.SetVideoDevice ( string  deviceId)

Sets the video recording 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 recording device, retrieved by calling GetVideoDevice.
Returns
  • 0: Success.
  • < 0: Failure.