Jiri Slaby a écrit :
Luca Risolia napsal(a):
On Thursday 05 July 2007 09:06:15 Jiri Slaby wrote:
Luca Risolia napsal(a):
Another minor issue at this stage of development is namespace for device entries. I think we should make clear to the users whether a given device node is related to the extend functionalities or not. A possible solution is to name the nodes with the pairs "/dev/extvideoX" and "/dev/videoX" (as opposite to "/dev/videoX" and "/dev/basevideoX").
The problem with this is that most applications try to open/stat only /dev/videoX, nothing else and this will break the transparency.
Hmm.. what do you think about "/dev/videoX", "/dev/video(X+32)", with X ranging from 1 to 32 reserved for real devices only.
Sounds good to me. (But will reduce number of possible real video devices by half.)
Well, I don't know if it is possible to do that without interferring with the v4l framework.
The problem is to identify a virtual, extended device corresponding to a real device _before_ opening it. Actually, unless the user always knows how to properly configure the system, associations of real and virtual devices with minor numbers would be casual in a dynamic context with multiple drivers and devices.
I also thought about different device naming, i.e. adding " (extended)" to the device name (video_device.name) when it's opened through v4l2-lib.
Maybe we might also involve udev somehow (providing .rules with the daemon, which must be packaged and distributed too).
Yes, by creating a specific rule for the v4l2_extension module, we can create symlinks that would be more explicit if needed. In fact I to differentiate a base v4l driver from the extended v4l driver by extending the VIDIOC_QUERYCAP ioctl. Most applications get the device name by calling this ioctl to get the struct v4l2_capability, that contains the char *card field (assumption). This field contains "Syntek USB Video Camera" for example. The extended driver would prefix with "Extended" to this name: "Extended Syntek USB Video Camera" The application would show 2 different devices to the user.
regards,
Cheers, Thierry