]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] v4l2-event: add optional merge and replace callbacks
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 18 Jun 2011 10:02:20 +0000 (07:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 1 Jul 2011 23:46:15 +0000 (20:46 -0300)
commitf93fb7571145f24534494c1281485a9869429d44
tree8692e79ff1831d12ed7281f05832d52083815f51
parentc8acd2fd0ba528d0a644d32a2d68da88f692cb07
[media] v4l2-event: add optional merge and replace callbacks

When the event queue for a subscribed event is full, then the oldest
event is dropped. It would be nice if the contents of that oldest
event could be merged with the next-oldest. That way no information is
lost, only intermediate steps are lost.

This patch adds optional replace() (called when only one kevent was allocated)
and merge() (called when more than one kevent was allocated) callbacks that
will be called to do this job.

These two callbacks are implemented for the V4L2_EVENT_CTRL event.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-event.c
include/media/v4l2-event.h