[Kwintv] [PATCH] devfs support for VBI decoder plugin
Dirk Ziegelmeier
dziegel at gmx.de
Thu Jan 15 08:17:13 CET 2004
On Wednesday 14 January 2004 22:07, Richard Moore wrote:
> I think this is a good start towards devfs support, but a few comments:
I'll of course add the devs support. Does anyone know whether udev (devs is
deprecated) uses the same naming scheme?
Additionally, AFAIK there's only one distro that uses devs as _default_:
Gentoo. Stating that most people do NOT use vanilla /dev is certainly wrong.
> 1. I disagree with not defaulting to /dev/vbi because (as you mention) this
> works for most people. Putting some sanity checking to see if it will work
> is a good idea however.
I'll leave that in. The what /dev/vbi is there for - it's a symlink to your
default vbi device, and IMO it works for >90% of the people. If you want to
improve autodetection, you can put QString::null as default, but at the time
of openeing the vbi device, you can iterate through a list, starting
with /dev/vbi, /dev/vbi0 ... to find the first working device. So only a few
people have to interact manually.
A better autodetection would be to ask the bttv driver for the vbi device.
But keep in mind that only v4l2 AFAIK has the necessary call, and the Xv
interface (XVIDEO plugin) does does not support that function, so it will not
have much effect at the moment.
You could add a vbiDeviceChanged(const QString&) signal to the source manager,
a getVbiDevice() call to the video plugins and connect the signal in a
similar way to the vbi plugin (via the vbimanager).
> 2. It is better to use QFile::encodeName() than local8Bit() to convert a
> QString to a filename.
> 3. It might be better to use the Qt classes rather than calling access
> directly. This is probably a matter of opinion though.
You are right, that's much cleaner. I'll fix it (hopefully this evening).
Dirk
More information about the kwintv
mailing list