From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
"Zutshi Vimarsh (Nokia-D-MSW/Helsinki)"
<vimarsh.zutshi@nokia.com>, Ivan Ivanov <iivanov@mm-sol.com>,
Cohen David Abraham <david.cohen@nokia.com>,
Guru Raj <gururaj.nagendra@intel.com>,
Mike Krufky <mkrufky@linuxtv.org>,
Devin Heitmueller <dheitmueller@kernellabs.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [RFC] Video events, version 2.2
Date: Fri, 23 Oct 2009 13:18:05 +0300 [thread overview]
Message-ID: <4AE182DD.6060103@maxwell.research.nokia.com> (raw)
Hi,
Here's the version 2.2 of the video events RFC. It's based on Laurent
Pinchart's original RFC and versions 2 and 2.1 which I wrote. The old
RFC is available here:
<URL:http://www.spinics.net/lists/linux-media/msg11056.html>
Added Mauro to Cc.
Changes to version 2.1
--------------------
V4L2_EVENT_ALL is now 0 instead 0x07ffffff.
V4L2_EVENT_RESERVED is gone. A note will be added not to use four
topmost bits.
It's V4L2_EVENT_PRIVATE_START, not V4L2_EVENT_PRIVATE.
Interface description
---------------------
Event type is either a standard event or private event. Standard events
will be defined in videodev2.h. Private event types begin from
V4L2_EVENT_PRIVATE_START. The four topmost bits of the type should not
be used for the moment.
#define V4L2_EVENT_ALL 0
#define V4L2_EVENT_PRIVATE_START 0x08000000
VIDIOC_DQEVENT is used to get events. count is number of pending events
after the current one. sequence is the event type sequence number and
the data is specific to event type.
The user will get the information that there's an event through
exception file descriptors by using select(2). When an event is
available the poll handler sets POLLPRI which wakes up select. -EINVAL
will be returned if there are no pending events.
VIDIOC_SUBSCRIBE_EVENT and VIDIOC_UNSUBSCRIBE_EVENT are used to
subscribe and unsubscribe from events. The argument is struct
v4l2_event_subscription which now only contains the type field for the
event type. Every event can be subscribed or unsubscribed by one ioctl
by using special type V4L2_EVENT_ALL.
struct v4l2_event {
__u32 count;
__u32 type;
__u32 sequence;
struct timeval timestamp;
__u32 reserved[8];
__u8 data[64];
};
struct v4l2_event_subscription {
__u32 type;
__u32 reserved[8];
};
#define VIDIOC_DQEVENT _IOR('V', 84, struct v4l2_event)
#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 85, struct
v4l2_event_subscription)
#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 86, struct
v4l2_event_subscription)
The size of the event queue is decided by the driver. Which events will
be discarded on queue overflow depends on the implementation.
Questions
---------
None on my side.
Comments and questions are still very very welcome.
--
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com
next reply other threads:[~2009-10-23 10:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 10:18 Sakari Ailus [this message]
2009-10-23 12:59 ` [RFC] Video events, version 2.2 Ivan T. Ivanov
2009-10-24 21:56 ` Sakari Ailus
2009-11-11 7:19 ` Hans Verkuil
2009-11-11 17:29 ` Sakari Ailus
2009-11-11 17:59 ` Hans Verkuil
2009-11-13 15:29 ` Mauro Carvalho Chehab
2009-11-13 16:00 ` Hans Verkuil
2009-11-13 17:30 ` Eino-Ville Talvala
2009-11-13 19:05 ` Sakari Ailus
2009-11-14 20:11 ` Eino-Ville Talvala
2009-11-13 17:44 ` Sakari Ailus
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=4AE182DD.6060103@maxwell.research.nokia.com \
--to=sakari.ailus@maxwell.research.nokia.com \
--cc=david.cohen@nokia.com \
--cc=dheitmueller@kernellabs.com \
--cc=gururaj.nagendra@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=iivanov@mm-sol.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mkrufky@linuxtv.org \
--cc=vimarsh.zutshi@nokia.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