[Kwintv] [PATCH] VIDIOCGUNIT support in BTTV

Neil Macvicar blackmogu at vfemail.net
Mon Jan 19 18:33:22 CET 2004


> From the v4l2 spec:
>
> ---
> 6.1.11. Miscellaneous
>
> V4L2 has no equivalent of the VIDIOCGUNIT ioctl. Applications can find the
> VBI device associated with a video capture device (or vice versa) by
> reopening the device and requesting VBI data. For details see Section 1.1.

I spoke to the maintainer of BTTV, who pointed this out, and the fact that 
most of V4L2 has been merged into the V4L tree under kernel 2.6.

> I don't think it makes sense to write _BTTV_ patches to add autodetection
> to the driver. This is clearly out of scope for QtVision. 

Agreed - the patch was never meant to be part of qtvision. I submitted it to 
the maintainer of bttv to add the 'never implemented' functionality. Gerd's 
response was that 'having this feature was pretty useless' and anyways, 'you 
can use v4l2_capability->bus_info'. 

> They surely had their reasons to remove the IOCTL, supporting that 
functionality is likely not as easy as your patch suggests.

Actually, it is that easy. Each time a card is claimed by the BTTV driver, the 
video_unit fields are populated. Hardly rocket science to return these values 
from a given device handle. Like I mentioned previously, it seems that Gerd 
just didn't bother because he never saw the point. It's pretty moot now, and 
at least I have some sort of angle to work on autodetection now.

The annoying thing is, when the bttv driver initialises, it collects all the 
info we require in it's internal structures, but it's just not accessible 
from userland. Seems like initial design didn't think it important that 
devices be associated.

--Neil.


More information about the kwintv mailing list