示例#1
0
        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));
        }
示例#2
0
        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);
        }
示例#3
0
 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;
 }
示例#4
0
		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);
		}