PDA

View Full Version : Re: Video from three USB cameras simultaneously on an SDI application



gaurav
June 2, 2005, 14:18:24
Hello Stefan,
following is the code that I am putting in the OnInitialUpdate method of the application.

DShowLib::Grabber pGrabber[3];

for (int i = 0;i< 3; i++)
{

// Check if there is a valid device.
if( pGrabber[i].isDevValid() )
{
// Start the live video.
pGrabber[i].startLive();
pGrabber[i].setPauseLive(true);
}
}


However, it doesnot display the three videos. The screen is clear. Can u tell me what is missing in this?? More so, is it possible to capture frames simultaneously from three cameras and save it to three video files like AVi. The cameras are USB.

Regards,
Gaurav

Stefan Geissler
June 2, 2005, 15:30:56
Gaurav,

you should open the devices with opendev:
pGrabber[0].openDev("Camera1")
pGrabber[1].openDev("Camera2")
pGrabber[2].openDev("Camera3")

"Cameran" must be replaced by the names of your cameras. You can use some of the demo application to get the names of the cameras.