Re: fast frame grab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





 this isn't your code, it's setup for 400x400 capture, and
it doesn't include your timing stuff.  it was a little difficult
for me to figure out what was going on.
ahh, you're right, sorry about that I just hacked it to get 640x480 and timing

your code currently does not check how many buffers are used by the driver. your driver likely has like 2 gbuffers or 4 or something.
basically, when you go to capture a frame, you say 'hey card, capture to
this buffer right here', then you have to wait for the card to get told
to write there, and this whole process wastes two frames of time, then
the 33ms waiting for the capture to finish.

this is the golden nugget!  thanks


 i took the code and hacked it quickly to use double buffering, and now
the call to SYNC only takes 33ms, and you correctly get the last frame
captured.  of course my hack is ridiculous and stupid but if you run the
test you'll see the numbers are acceptable:
I get the same results, I just need to hack it so that this first two frames aren't this slow
thanks for your help!
   Andrew







[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux