Gabriele | 26 May 2012 02:12
Picon
Favicon

Problem capturing frames

Hi, i just started using this library and i can't figure out how to grab 
video frames. After initializing library, camera and everything i try 
a cycle to grab frames continuously, but after a while the camera 
just stop working, sometimes the i++ count arrives at 200 
sometimes just stop at 10, i tried modifying framrates,
video modes, etc. but is always the same... 
here there is the chunk of code i use to read video frames, 
do you know where i am doing wrong?
Thank you
Gabriele

/*-----------------------------------------------------------------------
*  have the camera start sending us data
*-----------------------------------------------------------------------*/

err=dc1394_video_set_transmission(camera, DC1394_ON);
DC1394_ERR_CLN_RTN(err,cleanup_and_exit(camera),
"Couldn't start iso transmission\n");

/*-----------------------------------------------------------------------
*  capture one frame
*-----------------------------------------------------------------------*/

unsigned int i =0;

while (1) {

printf("%d\n", i);
err=dc1394_capture_dequeue(camera, DC1394_CAPTURE_POLICY_WAIT, &frame);
DC1394_ERR_CLN_RTN(err,cleanup_and_exit(camera),"Could not capture a frame\n");
(Continue reading)


Gmane