• Hans Verkuil's avatar
    [media] v4l2-event: add optional merge and replace callbacks · 2151bdc8
    Hans Verkuil authored
    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: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    2151bdc8
v4l2-event.c 7.3 KB