linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org
Cc: pawel@osciak.com, Hans Verkuil <hans.verkuil@cisco.com>,
	Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: Re: [RFC PATCH 09/11] videodev2.h: add v4l2_ctrl_selection compound control type.
Date: Fri, 17 Oct 2014 17:59:20 +0300	[thread overview]
Message-ID: <54412EC8.1080001@iki.fi> (raw)
In-Reply-To: <1411310909-32825-10-git-send-email-hverkuil@xs4all.nl>

Hi Hans,

(Cc Ricardo.)

Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> This will be used by a new selection control.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  include/media/v4l2-ctrls.h     | 2 ++
>  include/uapi/linux/videodev2.h | 8 ++++++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
> index 3005d88..c2fd050 100644
> --- a/include/media/v4l2-ctrls.h
> +++ b/include/media/v4l2-ctrls.h
> @@ -46,6 +46,7 @@ struct poll_table_struct;
>   * @p_u16:	Pointer to a 16-bit unsigned value.
>   * @p_u32:	Pointer to a 32-bit unsigned value.
>   * @p_char:	Pointer to a string.
> + * @p_sel:	Pointer to a struct v4l2_ctrl_selection.
>   * @p:		Pointer to a compound value.
>   */
>  union v4l2_ctrl_ptr {
> @@ -55,6 +56,7 @@ union v4l2_ctrl_ptr {
>  	u16 *p_u16;
>  	u32 *p_u32;
>  	char *p_char;
> +	struct v4l2_ctrl_selection *p_sel;
>  	void *p;
>  };

In order to be usable on sub-devices, pad information should be added.
That results in having a pad per rectangle, which probably doesn't make
sense. Also, other controls may benefit from being pad related.

What would you think of including the pad information in struct
v4l2_ext_control? That should be in a different patch. Would a flags
field be needed to tell whether the pad field is valid? 16 bits should
be good for both, but we anyway had just a single reserved field.

This would leave you with essentially a rectangle control, which you
still might want to call (or not) a selection control.

-- 
Kind regards,

Sakari Ailus
sakari.ailus@iki.fi


  reply	other threads:[~2014-10-17 14:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 14:48 [RFC PATCH 00/11] Add configuration store support Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 01/11] videodev2.h: add V4L2_CTRL_FLAG_CAN_STORE Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 02/11] videodev2.h: add config_store to v4l2_ext_controls Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 03/11] videodev2.h: rename reserved2 to config_store in v4l2_buffer Hans Verkuil
2014-11-14 14:42   ` Sakari Ailus
2014-11-17  8:41     ` Hans Verkuil
2014-11-14 15:35   ` Sakari Ailus
2014-11-17  8:41     ` Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 04/11] v4l2-ctrls: add config store support Hans Verkuil
2014-11-14 15:44   ` Sakari Ailus
2014-11-17  8:46     ` Hans Verkuil
2015-12-02 12:03       ` Enric Balletbo Serra
2015-12-02 12:33         ` Hans Verkuil
2015-12-02 14:09           ` Enric Balletbo Serra
2014-09-21 14:48 ` [RFC PATCH 05/11] v4l2-ctrls: add function to apply a configuration store Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 06/11] videodev2.h: add new v4l2_ext_control flags field Hans Verkuil
2014-11-15 14:18   ` Sakari Ailus
2014-11-15 17:44     ` Sakari Ailus
2014-11-17  8:57       ` Hans Verkuil
2014-11-17 14:35         ` Sakari Ailus
2014-11-17  8:48     ` Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 07/11] v4l2-ctrls: implement 'ignore after use' support Hans Verkuil
2014-11-15 21:10   ` Sakari Ailus
2014-11-17  9:02     ` Hans Verkuil
2014-11-17  9:31       ` Sakari Ailus
2014-11-17  9:46         ` Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 08/11] vivid: add test config store for the contrast control Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 09/11] videodev2.h: add v4l2_ctrl_selection compound control type Hans Verkuil
2014-10-17 14:59   ` Sakari Ailus [this message]
2014-09-21 14:48 ` [RFC PATCH 10/11] v4l2-ctrls: add multi-selection controls Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 11/11] vivid: add crop/compose selection control support Hans Verkuil
2014-10-09 11:55 ` [RFC PATCH 00/11] Add configuration store support Sakari Ailus
2014-10-09 12:46   ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54412EC8.1080001@iki.fi \
    --to=sakari.ailus@iki.fi \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=pawel@osciak.com \
    --cc=ricardo.ribalda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).