Re: great confusion in video capture please help

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



penumarthy sreenivas wrote:
> 
> Hai all!
>            I am working as research assistant at
> university o kansas . I have downloaded latest drivers
> for video for linux -2 and installed them all along
> with required packages. Got source from
> bttv-v4l2.sourceforge,net. I tested some sample
> applications and they work. I have set capture frame
> rate to 30 frames per second and this is set as
> default frame rate if capture format is  NTSC. Now i
> calculated number of frames captured per second in
> another way by keeping a loop count as:
> 
> startTime = time(NULL);
> i=0;
> while(i <= 1000)
> {
> 
> read(fd,imagesizeinbytes(for 320x240x24bpp),&buffer);
> i++
> }
> 
> endTime = time(NULL);
> 
> framerate = 1000/(endTime-startTime);
> (start , end times have been declared long ints)
> 
> But this frame rate comes out to be 10
> framespersecond.
> Why is there such discrepancy. WHats flaw in this??
> (By making ioctl call i find framerate of 30fps.)
> Help will be greatly appreciated.
> 
>                 THanks for one and all;
>                         bye,
>                                 SUNIL.

read() does not guarantee full rate capture (in fact, in bttv2 it
guarantees that you won't get full rate capture).  If you want to be
guaranteed full rate video capture use the streaming capture API.

-justin





[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