Click here to Skip to main content
15,887,988 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi, i am programming directshow and wrote enumvideodevices function to enumerate all video devices that are connected to the computer but unfortunately it points to the first device but i need to work with the second device, what should i do?
Posted
Updated 18-Nov-09 22:02pm
v2

It would be best if you posted some code to show us how you're currently getting the first video device. Although there is a project to get DirectShow working in .Net. Look at question 8 ("can I work with multiple video devices at the same time?") on this page, which shows how you would work with extra video devices, at least using that library (if that's what you're looking for, you could download their code and see how they implement that call to DirectShow).
 
Share this answer
 
yes there is a function or lines of code to calculate all camera which are connected to the computer. i used it and of course changed it to work with my project. but it has a problem and it is that each time you use this code it binds the last video device to the program. although it suffers from some capability but it the best that i could find!!!.

if you want i can post it here.
 
Share this answer
 
Comments
christmars 17-Dec-12 6:19am    
Hi, you need to select a capture device. See: http://msdn.microsoft.com/en-us/library/windows/desktop/dd377566(v=vs.85).aspx I'm intreasted to see how you get the video preview stream. Because I want to see what others are coding dor that. My codes have error when I captur several devices at the same time. Could you post it to let me see?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900