public static ReadOnlyCollection <VideoCaptureDevice> GetAvailableVideoCaptureDevices() { VideoCaptureDeviceCollection col = new VideoCaptureDeviceCollection(); NativeMethods.capture_device_configuration_get_available_video_capture_devices(col.native); return(new ReadOnlyCollection <VideoCaptureDevice> (col)); }
public static VideoCaptureDeviceCollection GetDevices() { VideoCaptureDeviceCollection c = new VideoCaptureDeviceCollection(); for (int i = 0; i < 10; i++) { StringBuilder name, version; name = new StringBuilder(128); version = new StringBuilder(128); if (capGetDriverDescription(i, name, 128, version, 128)) { c.Add(new VideoCaptureDevice(i, name.ToString(), version.ToString())); } } return(c); }
public static VideoCaptureDeviceCollection GetDevices() { VideoCaptureDeviceCollection c=new VideoCaptureDeviceCollection(); for(int i=0;i<10;i++) { StringBuilder name,version; name=new StringBuilder( 128); version=new StringBuilder(128); if(capGetDriverDescription(i,name,128,version,128)) { c.Add(new VideoCaptureDevice(i,name.ToString(),version.ToString())); } } return c; }
public static ReadOnlyCollection<VideoCaptureDevice> GetAvailableVideoCaptureDevices () { VideoCaptureDeviceCollection col = new VideoCaptureDeviceCollection (); NativeMethods.capture_device_configuration_get_available_video_capture_devices (col.native); return new ReadOnlyCollection<VideoCaptureDevice> (col); }