After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701540 - v4l2: iterate controls with V4L2_CTRL_FLAG_NEXT_CTRL
v4l2: iterate controls with V4L2_CTRL_FLAG_NEXT_CTRL
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-03 16:44 UTC by Michael Olbrich
Modified: 2013-06-05 11:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.78 KB, patch)
2013-06-03 16:44 UTC, Michael Olbrich
none Details | Review
new patch with fallback to old behavior (3.10 KB, patch)
2013-06-05 08:37 UTC, Michael Olbrich
committed Details | Review

Description Michael Olbrich 2013-06-03 16:44:28 UTC
Created attachment 245933 [details] [review]
patch

In v2.6.18 control classes where added to the v4l2 API.
Iterating over CIDs starting with V4L2_CID_BASE will only find controls for
the first control class.
By iterating with V4L2_CTRL_FLAG_NEXT_CTRL all controls are found.

This is necessary to make controls from other control classes available in
the extra-controls property.

What's the policy on backwards compatibility here? V4L2_CTRL_FLAG_NEXT_CTRL was introduced in v2.6.18. Is this ok, or should I keep the old code as fallback if V4L2_CTRL_FLAG_NEXT_CTRL is not available?
Comment 1 Sebastian Dröge (slomo) 2013-06-04 15:39:37 UTC
Please keep the old code as fallback
Comment 2 Michael Olbrich 2013-06-05 08:37:03 UTC
Created attachment 246048 [details] [review]
new patch with fallback to old behavior

better?
Comment 3 Sebastian Dröge (slomo) 2013-06-05 11:01:07 UTC
commit 0769a78dd197145ec504f3f2f5b2d175baaac26a
Author: Michael Olbrich <m.olbrich@pengutronix.de>
Date:   Mon Jun 3 09:17:43 2013 +0200

    v4l2: iterate controls with V4L2_CTRL_FLAG_NEXT_CTRL if possible
    
    In v2.6.18 control classes where added to the v4l2 API.
    Iterating over CIDs starting with V4L2_CID_BASE will only find controls for
    the first control class.
    By iterating with V4L2_CTRL_FLAG_NEXT_CTRL all controls are found.
    
    This is necessary to make controls from other control classes available in
    the extra-controls property.
    
    If V4L2_CTRL_FLAG_NEXT_CTRL is not defined at compile time or not supported
    at runtime then the old mechanism for iterating is used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701540