Capturing WebCams
-
Hi. I have 2 webcams connected, they are from different providers, (a Genius NB and another cam). My application must be able to capure both cams, so, I have 2 picture box and I'm using the API function capGetDriverDescription to get the descripions of the cams as the following code shows:
public static Device[] GetAllDevices() { String dName = "".PadRight(100); String dVersion = "".PadRight(100); for (short i = 0; i < 10; i++) { if (capGetDriverDescriptionA(i, ref dName, 100, ref dVersion, 100)) { Device d = new Device(i); d.Name = dName.Trim(); d.Version = dVersion.Trim(); devices.Add(d); } dName = "".PadRight(100); dVersion = "".PadRight(100); } return (Device[])devices.ToArray(typeof(Device)); }
This is code is from an article from here, CP. The problem is, that this code only get the description of 1 cam, I don't know why but capGetDriverDescriptionA always return true one time. Both cams works well, even there's a program called SKIN distributed by my Genius cam that can shows both devices and you can select which one to use. I don't how this program does that. But I need to show the video of 2 web cams at the same time. Which API could help me? Thank you.Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )