public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Ismael Luceno <ismael.luceno@corp.bluecherry.net>,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Pete Eberlein <pete@sensoray.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFC PATCH 4/5] v4l2: add a motion detection event.
Date: Thu, 18 Jul 2013 02:14:28 +0200	[thread overview]
Message-ID: <2083405.s15EBXhjSd@avalon> (raw)
In-Reply-To: <1372422454-13752-5-git-send-email-hverkuil@xs4all.nl>

Hi Hans,

Thanks for the patch.

On Friday 28 June 2013 14:27:33 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  include/uapi/linux/videodev2.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 5cbe815..f926209 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -1721,6 +1721,7 @@ struct v4l2_streamparm {
>  #define V4L2_EVENT_EOS				2
>  #define V4L2_EVENT_CTRL				3
>  #define V4L2_EVENT_FRAME_SYNC			4
> +#define V4L2_EVENT_MOTION_DET			5
>  #define V4L2_EVENT_PRIVATE_START		0x08000000
> 
>  /* Payload for V4L2_EVENT_VSYNC */
> @@ -1752,12 +1753,28 @@ struct v4l2_event_frame_sync {
>  	__u32 frame_sequence;
>  };
> 
> +#define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ	(1 << 0)
> +
> +/**
> + * struct v4l2_event_motion_det - motion detection event
> + * @flags:             if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the
> + *                     frame_sequence field is valid.
> + * @frame_sequence:    the frame sequence number associated with this
> event.
> + * @region_mask:       which regions detected motion.
> + */
> +struct v4l2_event_motion_det {
> +	__u32 flags;
> +	__u32 frame_sequence;
> +	__u32 region_mask;

Will a 32-bit region mask be extensible enough ? What about hardware that 
could report motion detection as a (possibly low resolution) binary image ?

> +};
> +
>  struct v4l2_event {
>  	__u32				type;
>  	union {
>  		struct v4l2_event_vsync		vsync;
>  		struct v4l2_event_ctrl		ctrl;
>  		struct v4l2_event_frame_sync	frame_sync;
> +		struct v4l2_event_motion_det	motion_det;
>  		__u8				data[64];
>  	} u;
>  	__u32				pending;
-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-07-18  0:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 12:27 [RFC PATCH 0/5] Matrix and Motion Detection support Hans Verkuil
2013-06-28 12:27 ` [RFC PATCH 1/5] v4l2: add matrix support Hans Verkuil
2013-07-07 21:50   ` Sylwester Nawrocki
2013-07-08  7:15     ` Hans Verkuil
2013-07-09  9:18       ` Sylwester Nawrocki
2013-07-10 20:59   ` Sakari Ailus
2013-06-28 12:27 ` [RFC PATCH 2/5] v4l2-compat-ioctl32: add g/s_matrix support Hans Verkuil
2013-07-18  0:22   ` Laurent Pinchart
2013-07-18  8:20     ` Hans Verkuil
2013-06-28 12:27 ` [RFC PATCH 3/5] solo: implement the new matrix ioctls instead of the custom ones Hans Verkuil
2013-06-28 12:27 ` [RFC PATCH 4/5] v4l2: add a motion detection event Hans Verkuil
2013-07-18  0:14   ` Laurent Pinchart [this message]
2013-07-18  8:19     ` Hans Verkuil
2013-06-28 12:27 ` [RFC PATCH 5/5] solo6x10: implement motion detection events and controls Hans Verkuil
2013-07-07 21:50 ` [RFC PATCH 0/5] Matrix and Motion Detection support Sylwester Nawrocki
2013-07-08  7:22   ` Hans Verkuil
2013-07-16 14:45     ` Sylwester Nawrocki
2013-07-18  0:12   ` Laurent Pinchart
2013-07-18  8:22     ` 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=2083405.s15EBXhjSd@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=ismael.luceno@corp.bluecherry.net \
    --cc=linux-media@vger.kernel.org \
    --cc=pete@sensoray.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sylvester.nawrocki@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