Andrew Wilson (a_wilson@xxxxxxx): > I'm running V4L (version 1) iguess I should upgrade to v4l2 to get the > speed. I'm using bttv that comes with mandrake 9.0. Can you post your entire code, not just this snippet? -Billy > > > thanks for the quick replies, > I appreciate it > Andrew > > p.s. > Here's a code snippet > VIDIOSYNC is the command that takes 100ms > > t.Start(); > ioctl(fd,VIDIOCMCAPTURE,&gb1); > t.Stop(); > cout <<"vidocapture call "; t.Print(); > > t.Start(); > ioctl(fd,VIDIOCSYNC, &gb1.frame); > t.Stop(); > cout << "vidosync time ";t.Print(); > > t.Start(); > memcpy(buffers, map_ + gb_buffers.offsets[0], width*height); > t.Stop(); > cout <<" memcopy from buffer ";t.Print(); > > > > > > > > > Billy Biggs wrote: > > >Andrew Wilson (a_wilson@xxxxxxx): > > > > > > > >>I'm trying to grab a 640x480 BW frame as fast as possible, it > >>currently takes roughly 100milliseconds per grab. The live video > >>feed straight to the monitor runs smoothly at 60fps though, shouldn't > >>a frame grab be 17 milliseconds? > >> > >> > > > > Video is interlaced, so for NTSC you'll only get 240 scanlines per > >field. If you're capturing at 640x480, you're probably capturing > >frames, so you'll only get one frame every 33ms. If you want <33ms > >delays, you'll need one of the new bttv drivers with V4L2 support that > >allows you to ask for field-rate capture, then you can get a new frame > >every 16.6ms. > > > > It shouldn't take 100ms per grab though, something sounds wrong. Post > >your code somewhere and maybe someone can take a look at it. > > > > -Billy > > > > > > > >-- > >video4linux-list mailing list > >Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe > >https://listman.redhat.com/mailman/listinfo/video4linux-list > > > > >