GNOME Bugzilla – Bug 701540
v4l2: iterate controls with V4L2_CTRL_FLAG_NEXT_CTRL
Last modified: 2013-06-05 11:01:12 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?
Please keep the old code as fallback
Created attachment 246048 [details] [review] new patch with fallback to old behavior better?
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