I have written a Qt program for Linux that controls a Hauppaugge winpvr2 USB box and records what is streaming in from the box to a user defined file. But, the user has to be root to do this for two reasons:
1. You have to be able to write to files in /sys/class/pvrusb2 subdirectories. Problem is, they are group readable, so you can see what values the box is set to, but they are not group writeable, so you can't change the values (for channel, volume etc). (I can't even give group write access because these directories are created on the fly when the box is plugged in and then disappears when it is unplugged.)
2. The hauppaugge device comes up as /dev/video0 and unless you're root, it will not allow you to stream either to a file or to mplayer. (What I don't understand about this is that when a webcam's plugged in and appears as /dev/video0 you can stream that as user...)
I don't think the idea of having to be root to run a program, so does anyone have any idea about how to solve these issues please? Many thanks.