Review Request: Distinguish between v4l1 and v4l2 devices in Solid::Video

Kevin Ottens ervin at kde.org
Mon Aug 3 18:13:36 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1188/#review1894
-----------------------------------------------------------

Ship it!


One small nitpick, once addressed you can commit right away.


trunk/KDE/kdelibs/solid/solid/backends/hal/halvideo.cpp
<http://reviewboard.kde.org/r/1188/#comment1240>

    This one should be:
    if ( driver=="video4linux" || driver=="video4linux2" ) {
    
    Just to be extra sure we won't accept anything else which might start with "video4linux".


- Kevin


On 2009-07-31 15:19:11, George Kiagiadakis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1188/
> -----------------------------------------------------------
> 
> (Updated 2009-07-31 15:19:11)
> 
> 
> 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