Hi Hans, On Mon, Jan 20, 2014 at 01:45:59PM +0100, Hans Verkuil wrote: > From: Hans Verkuil <hans.verkuil@xxxxxxxxx> > > This patch implements initial support for complex types. > > For the most part the changes are fairly obvious (basic support for is_ptr > types, the type_is_int function is replaced by a is_int bitfield, and > v4l2_query_ext_ctrl is added), but one change needs more explanation: > > The v4l2_ctrl struct adds a 'new' field and a 'stores' array at the end > of the struct. This is in preparation for future patches where each control > can have multiple configuration stores. The idea is that stores[0] is the current > control value, stores[1] etc. are the control values for each configuration store > and the 'new' value can be accessed through 'stores[-1]', i.e. the 'new' field. > However, for now only stores[-1] and stores[0] is used. Could we use zero or positive indices only, e.g. the new being zero and current 1, or the other way? Or make the "new" value special, i.e. using a different field name. I think accessing the previous struct member by index -1 looks a little bit hackish. > These new fields use the v4l2_ctrl_ptr union, which is a pointer to a control > value. > > Note that these two new fields are not yet actually used. Should they be then added yet in the first place? :-) -- Kind regards, Sakari Ailus e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html