Hi, > To allow v4l2 clients to "play nice" too, I'd like to propose a concept > which is based on a numeric "priority" level: by default all device > users are assigned a middle priority when opening the device. By means > of a new ioctl VIDIOC_S_CHNPRIO users can freely manipulate their level. > Channel, frequency or norm changes would only succeed if there is no > user with a higher priority, else the change is rejected and error EBUSY > is returned (coordination of users at the same level is outside of the > scope of this proposal, as it is dealt with differently between levels.) In my opinion, this concept can be implemented completely in user space, without any kernel changes. Any process can find out which processes are using /dev/video (check how 'fuser' does it). [If you have such processes running with different uid's (possibly including root), you would need a daemon which can enter /proc/<pid>/fd for all such processes. I would expect that code for a daemon like that already exists, perhaps in desktop file managers.] Once you have a list of the processes, you could check a text file or database or whatever which maps the process names (OK this is a small restriction compared to your proposal) to priorities. All processes that don't appear in the list get the default priority. If one of the other processes has a higher priority, you don't even attempt the channel change. Of course, some effort would be required to cast this into some sort of 'standard'. Again, I would take a look at desktop implementations where similar problems surely have surfaced as well. Regards, Wolfram.