[Kde-hardware-devel] [PATCH] filter v4l devices from hal

Kevin Ottens ervin at kde.org
Mon Nov 19 08:40:22 CET 2007


Le dimanche 18 novembre 2007, Will Stephenson a écrit :
> Some v4l devices have non-video-source interfaces such as radio devices,
> videotext and tv tuners.  These are all reported by hal as video4linux
> devices.  The attached patch filters out all but the video sources, please
> review.

I think it would be easier and more efficient to make a call to 
FindDeviceStringMatch instead of patching the way you did. What about 
replacing line 174 with:
---
QDBusReply<QStringList> reply;
if (cap=="video4linux") {
    reply = d->manager.call("FindDeviceByCapability", cap);
} else {
    reply = 
d->manager.call("FindDeviceStringMatch", "video4linux.device", "video");
}
---

I'm not 100% sure it'd work as expected, but that worth a try if that could 
make it work by placing only one call to HAL.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20071119/fadbbe95/attachment.pgp 


More information about the Kde-hardware-devel mailing list