IAgoraRtcVideoDeviceManager
Video device management methods.
IAgoraRtcVideoDeviceManager provides the methods related to testing video devices. You can get an IAgoraRtcVideoDeviceManager interface by instantiating the IAgoraRtcVideoDeviceManager class.
EnumerateVideoDevices
Enumerates the video devices.
public abstract DeviceInfo[] EnumerateVideoDevices();
Returns
- Success: Returns a DeviceInfo array that contains all the video devices.
- Failure: NULL.
GetDevice
Retrieves the current video capture device.
public abstract string GetDevice();
Returns
The video capture device.
SetDevice
Specifies the video capture device with the device ID.
public abstract int SetDevice(string deviceId);
Parameters
- deviceId
-
The device ID. You can get the device ID by calling EnumerateVideoDevices.
Returns
- 0: Success.
- < 0: Failure.
StartDeviceTest
Starts the video capture device test.
public abstract int StartDeviceTest(view_t hwnd);
This method tests whether the video-capture device is working properly. Before calling this method, ensure that you have already called the EnableVideo method, and the window handle (hwnd) parameter is valid.
Parameters
- hwnd
- The window handle used to display the screen.
Returns
- 0: Success.
- < 0: Failure.
StopDeviceTest
Stops the video capture device test.
public abstract int StopDeviceTest();
Returns
- 0: Success.
- < 0: Failure.