questions about v4l2 spec

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



Hi,

after reading the v4l2 specs there are some questions remaining.

To capture some frames, I have to code the following from the 
application side (ioctls in CAPITALS, else system calls )

// after open(), setting the format etc. do this

VIDIOC_REQBUFS  - to request some buffers for grabbing

VIDIOC_QUERYBUF - query evry buffer and do the appropriate (enque for 
example)

mmap - map driver buffers to user space

VIDIOC_QBUF -enque every buffer for the driver if necessary

VIDIOC_STREAMON - begin to grab in enqued buffers 
Q: What if no buffers are enqued by the app ?

VIDIOC_DQBUF -deque buffer to do some user space operations
Q1: Does DQBUF block, when the hardware is just capturing in this 
buffer, until capturing has finished ?
Q2: Is there any way to get the last captured buffer (and skip the other 
buffers)?
Q3: What should the driver do, if the application wants to deque the 
last buffer ? If streaming is going on, the hardware need at least one 
buffer, or the streaming has to be stopped.

VIDIOC_QBUF - enque again

// If enough frames are captured finally do this

VIDIOC_STREAMOFF - stop to grab

munmap
Q: To restart capturing, do I have to start @ VIDIOC_REQBUFS again ?


TIA,

Franz

 




[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