diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.ac | 75 | ||||
-rw-r--r-- | sys/Makefile.am | 14 |
3 files changed, 89 insertions, 7 deletions
@@ -1,3 +1,10 @@ +2006-10-03 Thomas Vander Stichele <thomas at apestaart dot org> + + * configure.ac: + * sys/Makefile.am: + add build stuff for v4l2, needs --enable-experimental until + the last bits are resolved + 2006-09-29 Tim-Philipp Müller <tim at centricular dot net> * tests/check/Makefile.am: diff --git a/configure.ac b/configure.ac index 6662a8af8..2b7edd4f6 100644 --- a/configure.ac +++ b/configure.ac @@ -155,6 +155,18 @@ GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],, ]) AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes") +dnl experimental plug-ins; stuff that hasn't had the dust settle yet +GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],, +[HAVE_EXPERIMENTAL=yes],disabled, +[ + AC_MSG_WARN(building experimental plug-ins) + USE_GST_V4L2="yes" +],[ + AC_MSG_NOTICE(not building experimental plug-ins) + USE_GST_V4L2="no" +]) + + dnl *** checks for platform *** dnl * hardware/architecture * @@ -353,6 +365,61 @@ GST_CHECK_FEATURE(SUNAUDIO, [Sun Audio], sunaudio, [ AC_CHECK_HEADER(sys/audioio.h, HAVE_SUNAUDIO="yes", HAVE_SUNAUDIO="no") ]) +dnl *** Video 4 Linux 2 *** +dnl for information about the header/define, see sys/v4l2/gstv4l2element.h +dnl renamed to GST_V4L2 because of some conflict with kernel headers +translit(dnm, m, l) AM_CONDITIONAL(USE_GST_V4L2, true) +GST_CHECK_FEATURE(GST_V4L2, [Video 4 Linux 2], v4l2src, [ + AC_MSG_CHECKING([Checking for uptodate v4l2 installation]) + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <linux/types.h> +#define _LINUX_TIME_H +#define __user +#include <linux/videodev2.h> +#if defined(V4L2_MAJOR_VERSION) || defined(V4L2_MINOR_VERSION) +#error too early v4l2 version or no v4l2 at all +#endif + ], [ +return 0; + ], [ + HAVE_GST_V4L2="yes" + AC_MSG_RESULT(yes) + ], [ + HAVE_GST_V4L2="no" + AC_MSG_RESULT(no) + AC_CHECK_HEADER(linux/videodev2.h, + [ + AC_MSG_WARN([video4linux2 headers were found, but they're old.]) + AC_MSG_WARN([Please update v4l2 to compile the v4l2 plugins]) + ], [ + AC_MSG_WARN([video4linux2 was not found]) + ]) + ]) + + if [ test x$HAVE_GST_V4L2 = xyes ]; then + dnl check for missing v4l2_buffer declaration (see #135919) + MISSING_DECL=0 + AC_MSG_CHECKING(struct v4l2_buffer declaration) + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <linux/types.h> +#define _LINUX_TIME_H +#define __user +#include <linux/videodev2.h> + ],[ +struct v4l2_buffer buf; +buf.index = 0; +return 0; + ], [ AC_MSG_RESULT(yes) ], [ MISSING_DECL=1 && AC_MSG_RESULT(no) ]) + if [ test x$MISSING_DECL = x1 ]; then + AC_DEFINE(GST_V4L2_MISSING_BUFDECL, 1, [struct v4l2_buffer missing]) + fi + + dnl check for XOverlay libraries + GST_CHECK_XV + fi +]) dnl Check for X11 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true) @@ -429,6 +496,13 @@ GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [ AC_SUBST(XSHM_LIBS) ]) +dnl for V4L2, we also need to know if we have XVIDEO +translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true) +GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], + [], [ + GST_CHECK_XV +]) + dnl *** ext plug-ins *** dnl keep this list sorted alphabetically ! @@ -808,6 +882,7 @@ ext/taglib/Makefile sys/Makefile sys/oss/Makefile sys/sunaudio/Makefile +sys/v4l2/Makefile sys/ximage/Makefile po/Makefile.in tests/Makefile diff --git a/sys/Makefile.am b/sys/Makefile.am index 50028bc2e..8662114fb 100644 --- a/sys/Makefile.am +++ b/sys/Makefile.am @@ -34,11 +34,11 @@ endif # QCAM_DIR= # endif -# if USE_GST_V4L2 -# V4L2_DIR=v4l2 -# else -# V4L2_DIR= -# endif +if USE_GST_V4L2 +V4L2_DIR=v4l2 +else +V4L2_DIR= +endif # if USE_VCD # VCD_DIR=vcd @@ -64,6 +64,6 @@ else XIMAGE_DIR= endif -SUBDIRS=$(OSS_DIR) $(SUNAUDIO_DIR) $(XIMAGE_DIR) +SUBDIRS=$(OSS_DIR) $(SUNAUDIO_DIR) $(V4L2_DIR) $(XIMAGE_DIR) -DIST_SUBDIRS=oss sunaudio ximage +DIST_SUBDIRS=oss sunaudio v4l2 ximage |