Review Request: Distinguish between v4l1 and v4l2 devices in Solid::Video
George Kiagiadakis
kiagiadakis.george at gmail.com
Fri Jul 31 16:19:11 BST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1188/
-----------------------------------------------------------
Review request for kdelibs.
Summary
-------
This patch allows applications using solid for video device detection to distinguish between video4linux1 and video4linux2 devices. This is useful to know because v4l1 and v4l2 use different API, so the application needs to know which API to use to communicate with the device. This is accomplished by returning "video4linux" for v4l1 devices and "video4linux2" for v4l2 devices as a supported driver for the "video4linux" protocol. The actual information is retrieved from HAL, using the "video4linux.version" device property field.
Existing applications that may be checking for supportedDrivers().contains("video4linux"); in addition to supportedProtocols().contains("video4linux"); to ensure that a device is a v4l device, will not completely break with this patch, but they will be unable to detect v4l2 devices; they will only detect v4l1 ones. Those applications (if any) will need to me modified to be able to detect v4l2 devices again.
Diffs
-----
trunk/KDE/kdelibs/solid/solid/backends/hal/halvideo.cpp 1005084
Diff: http://reviewboard.kde.org/r/1188/diff
Testing
-------
I have tested this successfully with kcall. I have a v4l2 TV tuner and a v4l1 web camera on my computer and kcall is now able to distinguish between those two and use the appropriate gstreamer element ("v4l2src" or "v4lsrc") to handle the device.
Thanks,
George
More information about the kde-core-devel
mailing list