Re: [RFC] Video events, version 2

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

 



Laurent Pinchart wrote:
On Friday 16 October 2009 09:36:51 Sakari Ailus wrote:
Hans Verkuil wrote:
On Thursday 15 October 2009 23:11:33 Laurent Pinchart wrote:
For efficiency reasons a V4L2_G_EVENTS ioctl could also be provided to
retrieve multiple events.

struct v4l2_events {
	__u32 count;
	struct v4l2_event __user *events;
};

#define VIDIOC_G_EVENTS _IOW('V', xx, struct v4l2_events)
Hmm. Premature optimization. Perhaps as a future extension.
That *could* save one ioctl sometimes --- then you'd no there are no
more events coming right now. But just one should be supported IMO,
VIDIOC_G_EVENT or VIDIOC_G_EVENTS.

I forgot to mention in my last mail that we should add a flag to the v4l2_event structure to report if more events are pending (or even possible a pending event count).

Then the V4L (or driver) would have to check the queue for that type of events. OTOH, the queue size could be quite small and it'd never overflow since the maximum size is number of different event types.

Can there be situations when the first or last event timestamp of certain event would be necessary? If we put count there, then we need to make a decision which one is useful for the userspace. The last one is obviously useful for the AF/AEWB algorightms. I currently see no use for the first one, but that doesn't mean there couldn't be use for it.

--
Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxxxxxxxxxxxxx
--
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