suggestions for usb webcam C/C++ api

Does anybody have suggestions for the best/easiest way to grab image data from a usb webcam into a C/C++ program?

I'm on Ubuntu 11.04. Some working example code would be awesome.

If its a V4L device you should be able to access through device file.
Yah, its V4L device, could you give me an example how to do it?

Sorry, cant give any examples. I've only dealt with v4l as an end user several years ago (getting tv card to work in Getoo)
But from some research gstreamer should be easier to work with. Do you ned to make the image capture in code or can you call an external ap like cheese, vlc, mplayer...
Topic archived. No new replies allowed.