Re: [RFCv2 PATCH 05/21] videodev2.h: add struct v4l2_query_ext_ctrl and VIDIOC_QUERY_EXT_CTRL.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

On 01/24/2014 12:28 PM, Sakari Ailus wrote:
> Hi Hans,
> 
> On Mon, Jan 20, 2014 at 01:45:58PM +0100, Hans Verkuil wrote:
>> +	union {
>> +		__u64 val;
>> +		__u32 reserved[4];
>> +	} step;
> 
> While I do not question that step is obviously always a positive value (or
> zero), using a different type from the value (and min and max) does add
> slight complications every time it is being used. I don't think there's a
> use case for using values over 2^62 for step either.

What sort of complications? The reason I changed it is to avoid having to
check for step < 0. It also makes it clear that it has to be positive.

> 
> Speaking of which --- do you think we should continue to have step in the
> interface? This has been proven to be slightly painful when the step is not
> an integer. Using a step of one in that case has been the only feasible
> solution. Step could be naturally be used as a hint but enforcing it often
> forces setting it to one.

Step is used quite often, so we can't remove it. If the step for a particular
control isn't fixed over the range of possible values (at least, I think that
is what you mean), then I don't see any solution that isn't painful. Not to
mention that GUIs will have a hard time.

Suggestions are welcome, though.

Regards,

	Hans
--
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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux