frame capturing: some questions

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



Dear all,

I am quite new to unix programming, so be tolerant with my confusion.. :-)

I am trying to write some simple code to grab frames from a v4l device. I am
using a Philips Webcam with the pwc/pwcx drivers.

I am a bit confused about the different options that I have for getting the
data from the driver: select() read() and mmap() (combined with
VIDIOCMCAPTURE and VIDIOSYNC).

Looking at some threads on this list and some examples I managed to grab
images using read and mmap(etc.), but I do not understand how to use select.
All of the examples I've found (about select) deal with multiple fds.
Can anyone help me with this? (or at least point me to some example or docs
on-line?)

In the (useful and quite clear) philips usb webcam api document it is
suggested to use select(). Why so?

Also in general what are the advantages and disadvantages of using select,
read or mmap?

I had a look at video for windows, and I have seen that there it is possible
to set a callback function so that it is called each time a frame is ready
(and the frame itself is one of the arguments of the function). is there
anything similar in video for linux?

Thank you very much in advance.

Enrico





[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