From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Tomasz Fujak <t.fujak@samsung.com>
Cc: linux-media@vger.kernel.org,
"'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>
Subject: Re: [RFC] Video events, version 2.1
Date: Tue, 20 Oct 2009 00:08:06 +0300 [thread overview]
Message-ID: <4ADCD536.6020105@maxwell.research.nokia.com> (raw)
In-Reply-To: <004301ca50b7$0a02e6c0$1e08b440$%fujak@samsung.com>
Tomasz Fujak wrote:
> Hi,
Hi, Tomasz!
> The event count may be useful for the reason Laurent mentioned. In case we
> don't have dequeue multiple (DQEVENT_MULTIPLE?) a flag should be enough,
> saying if there are any events immediately available. That'd be just one bit
> we could mash into the 'type' field.
We could have also another field for flags. It's nicer to do that than
use the type field for that --- we're not short of bits here.
> On the other hand I can imagine an event type that come swarming once a
> client registers to them (i.e.: VSYNC). In such a case they may overflow a
> queue and discard potentially useful events (i.e.: a cable detached from the
> output). We could do one of the following:
> - nothing (let the above happen if the application is not fast enough to
> retrieve events),
> - suggest using separate event feed for periodic events,
> - compress periodic events (provide 'compressed' flag, and stamp the event
> with the timestamp of the last of the kind) - thus at most one of a periodic
> event type would reside in the queue,
> - let the client define the window size,
> - define event priorities (low, normal, high) and discard overflowing
> events starting with the lowest priorities. I.e.: low for VSYNC, normal for
> picture decoding error and high for cable attach
I think it's up to the driver to define the queue size. Then the queue
can just overflow when it becomes full. If the client isn't fast enough
to handle the events buffering them won't help in the end... for
temporary scheduling delays a deeper queue should do the trick.
Another ioctl would probably be required for queue size setting if it's
ever needed. This is IMO more or less equivalent to setting the maximum
allocatable memory for video buffers, which is indeed fixed to video
drivers themselves.
> Third, the event subscription scheme. What does a subscription call mean:
> "Add these new events to what I already collect" or "Discard whatever I have
> subscribed for and now give me this"?
Add this one / remove this one. The type is a 32-number so we should
have enough different kind of events. :)
> In the latter use, there are just 27 event types available; can't tell if
> that's enough till we try to enumerate the event types we currently have.
> I've just seen a few of them (DVB, UVC, ACPI), but I think the list would
> grow once people start using the v4l2 events. How big is it going to be?
Let's hope people start using this once it's available...
--
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com
prev parent reply other threads:[~2009-10-19 21:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 13:39 [RFC] Video events, version 2.1 Sakari Ailus
2009-10-16 14:16 ` Michael Krufky
2009-10-16 20:43 ` Hans Verkuil
2009-10-19 21:47 ` Sakari Ailus
2009-10-20 21:48 ` Hans Verkuil
2009-10-19 12:24 ` Tomasz Fujak
2009-10-19 21:08 ` Sakari Ailus [this message]
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=4ADCD536.6020105@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=mkrufky@linuxtv.org \
--cc=t.fujak@samsung.com \
--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