Very soon we are going to work on a project with open source s/w that does many things and one of the modules concerns with capturing live feed from a usb based camera for upto 48 hours and overwriting it in a nonstop loop. This would be going on in parallel with other operations in the application. We also have to display the captured feed of the least 48 hours to the user as a menu option.

I would like you all to suggest a suitable open source technology stack taking into account the audio/video part of the module, without this feature I can definitely use Qt to do my stuff but with this feature that becomes a difficult proposition. I have developed GUI applications with Qt on Linux platform but haven't been able to come up with something that can record and display video in an application. Qt has phonon but setting it up is a nightmare. Earlier some of you had suggest v4linux. I tried to compile the sample program [capture.c](http://v4l2spec.bytesex.org/spec/capture-example.html) on RHEL 4 machine and it gave the following errors.

```
usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:436: warning: no semicolon at end of struct or union

/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:436: error: syntax error before '*' token

/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:438: error: syntax error before '*' token

/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:438: warning: data definition has no type or storage class

/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:439: error: syntax error before '}' token

/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:810: error: field `win' has incomplete type

```

So hit a dead end, besides I haven't come up with concrete workable examples for the same. Also the [website](http://linux.bytesex.org/v4l2/) isn't being updated frequently suggesting a stagnancy in development process.

Since the application will be graphical with menu based user interaction, it would need to use Qt or something similar to it for the graphical part. The headache is I haven't been able to figure out, how I can implement/integrate the video capture/display feature in a dummy application (my try was with Qt may be some of you have done it with some other library or language).

EDIT:
Was able to compile the program by importing a local copy of videodev2.h and adding define statement to include a \_\_user macro. But now it won't run as it cannot find /dev/video device. So again stuck at a dead end in video4linux