libv4l2: Add plugin support to libv4l
authorYordan Kamenov <ykamenov@mm-sol.com>
Thu, 19 May 2011 12:35:59 +0000 (15:35 +0300)
committerHans de Goede <hdegoede@redhat.com>
Sun, 17 Jul 2011 20:43:57 +0000 (22:43 +0200)
commita8f8d389e2a26576693cdc777f28ba857d380479
tree28376c3cbeae8635cf19b2645e1ea7cbe50adeb7
parentc34bb0e9b02e3aa9fe056eadf0f914302413b6e3
libv4l2: Add plugin support to libv4l

A libv4l2 plugin will sit in between libv4l2 itself and the actual
/dev/video device node a fd refers to. It will be called each time
libv4l2 wants to do an operation (read/write/ioctl) on the actual
/dev/video node in question.

Changes before merge by Hans de Goede:
-export libv4l2_default_dev_ops for apps which directly use libv4lconvert
-use libv4l2_default_dev_ops in qv4l2 rather then defining our own there
-swap 1st 2 arguments to v4l2_plugin_cleanup to match v4l2_plugin_init order
-v4l2_plugin_init: return the address of the plugins devops, rather then
 always returning the address of the default dev_ops and overriding the
 individual default dev_ops with those of the plugin. The latter is a bad idea
 when multiple /dev/video devices are opened in the same process space as
 they may use different plugins
-use $LIBDIR/libv4l/plugins as pluginsdir instead of hardcoded
 /usr/lib/libv4l/plugins

Signed-off-by: Yordan Kamenov <ykamenov@mm-sol.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
14 files changed:
lib/include/libv4l2-plugin.h [new file with mode: 0644]
lib/include/libv4l2.h
lib/include/libv4lconvert.h
lib/libv4l2/Makefile
lib/libv4l2/libv4l2-priv.h
lib/libv4l2/libv4l2.c
lib/libv4l2/v4l2-plugin.c [new file with mode: 0644]
lib/libv4l2/v4l2convert.c
lib/libv4lconvert/control/libv4lcontrol-priv.h
lib/libv4lconvert/control/libv4lcontrol.c
lib/libv4lconvert/control/libv4lcontrol.h
lib/libv4lconvert/libv4lconvert-priv.h
lib/libv4lconvert/libv4lconvert.c
utils/qv4l2/qv4l2.cpp