using System; namespace Agora.Rtc { /// /// /// Video device management methods. /// /// public abstract class IVideoDeviceManager { /// /// /// Enumerates the video devices. /// /// /// /// Success: A DeviceInfo array including all video devices in the system.Failure: NULL. /// /// public abstract DeviceInfo[] EnumerateVideoDevices(); /// /// /// Specifies the video capture device with the device ID. /// Plugging or unplugging a device does not change its device ID. /// /// /// The device ID. You can get the device ID by calling EnumerateVideoDevices . /// /// /// 0: Success.< 0: Failure. /// /// public abstract int SetDevice(string deviceIdUTF8); /// /// /// Retrieves the current video capture device. /// /// /// Output parameter. The device ID. /// /// /// 0: Success.< 0: Failure. /// /// public abstract int GetDevice(ref string deviceIdUTF8); /// /// @ignore /// public abstract int StartDeviceTest(IntPtr hwnd); /// /// @ignore /// public abstract int StopDeviceTest(); /// /// /// Gets the detailed video frame information of the video capture device in the specified video format. /// After calling NumberOfCapabilities to get the number of video formats supported by the video capture device, you can call this method to get the specific video frame information supported by the specified index number. /// /// /// The ID of the video capture device. /// /// The index number of the video format. If NumberOfCapabilities the return value of is i, the value range of this parameter is [0,i). /// /// Output parameter. Indicates the specific information of the specified video format, including width (px), height (px), and frame rate (fps). See VideoFormat . /// /// /// 0: Success.< 0: Failure. /// /// public abstract int GetCapability(string deviceIdUTF8, uint deviceCapabilityNumber, out VideoFormat capability); /// /// /// Gets the number of video formats supported by the specified video capture device. /// Video capture devices may support multiple video formats, and each format supports different combinations of video frame width, video frame height, and frame rate.You can call this method to get how many video formats the specified video capture device can support, and then call GetCapability to get the specific video frame information in the specified video format. /// /// /// The ID of the video capture device. /// /// /// 0: Success. Returns the number of video formats supported by this device. For example: If the specified camera supports 10 different video formats, the return value is 10.< 0: Failure. /// /// public abstract int NumberOfCapabilities(string deviceIdUTF8); } }