add configure --with vaapi/vdpau
authorGood Guy <good1.2guy@gmail.com>
Thu, 9 May 2019 14:57:47 +0000 (08:57 -0600)
committerGood Guy <good1.2guy@gmail.com>
Thu, 9 May 2019 14:57:47 +0000 (08:57 -0600)
cinelerra-5.1/configure.ac
cinelerra-5.1/thirdparty/Makefile

index 408ed8e73c702c6cb5d078dd701c436030f612be..90048a290fa23a145c91eb07be2dfb6cf1988edf 100644 (file)
@@ -56,6 +56,8 @@ CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
 CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[yes])
 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
 CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
+CHECK_WITH([vaapi],[video acceleration api],[VAAPI],[yes])
+CHECK_WITH([vdpau],[video decode+presentation api for unix],[VDPAU],[yes])
 
 if test "x$WANT_LV2" != "xno"; then
   GTK2_LIBS=`pkg-config --libs gtk+-2.0`
@@ -494,15 +496,19 @@ if test "x$HAVE_$1" != "xno"; then
  if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno" -a "x$PKG_$1" = "xauto"; then
   AC_CHECK_LIB([$2], [$3], [HAVE_$1=yes], [HAVE_$1=no], [$4])
   AC_SUBST([HAVE_$1])
-  if test "x$HAVE_$1" = "xyes"; then
-   if test "x$PKG_$1" = "x"; then
-    SYSTEM_LIBS+=" -l[$2]"
-    for lib in [$4]; do SYSTEM_LIBS+=" $lib"; done
-   else
-    SHARED_$1+=" -l[$2]"
-    for lib in [$4]; do SHARED_LIBS+=" $lib"; done
+  if test "x$WANT_$1" != "xno"; then
+   if test "x$HAVE_$1" = "xyes"; then
+    if test "x$PKG_$1" = "x"; then
+     SYSTEM_LIBS+=" -l[$2]"
+     for lib in [$4]; do SYSTEM_LIBS+=" $lib"; done
+    else
+     SHARED_$1+=" -l[$2]"
+     for lib in [$4]; do SHARED_LIBS+=" $lib"; done
+    fi
+   elif test "x$PKG_$1" = "x"; then
+    RESULT=no
    fi
-  elif test "x$PKG_$1" = "x"; then RESULT=no; fi
+  fi
  fi
 fi
 ])
@@ -575,9 +581,9 @@ CHECK_HEADERS([encore], [encore headers], [encore.h])
 CHECK_LIB([giflib], [gif], [DGifOpen])
 CHECK_HEADERS([giflib], [gif lib headers], [gif_lib.h])
 CHECK_LIB([jbig], [jbig], [jbg_dec_init])
-CHECK_LIB([vdpau], [vdpau], [vdp_device_create_x11])
-CHECK_LIB([vaapi], [va], [vaInitialize])
-if test "x$HAVE_vaapi" = "xyes"; then
+CHECK_LIB([VDPAU], [vdpau], [vdp_device_create_x11])
+CHECK_LIB([VAAPI], [va], [vaInitialize])
+if test "x$WANT_VAAPI" != "xno" -a "x$HAVE_VAAPI" = "xyes"; then
   CHECK_HEADERS([vaapi_x11], [va x11 headers], [va/va_x11.h])
   CHECK_LIB([vaapi_x11], [va-x11], [vaGetDisplay])
   CHECK_HEADERS([vaapi_drm], [va drm headers], [va/va_drm.h])
@@ -876,6 +882,8 @@ echo "  using: with-noelision = $WANT_NOELISION"
 echo "  using: with-booby = $WANT_BOOBY"
 echo "  using: with-libzmpeg = $WANT_LIBZMPEG"
 echo "  using: with-commerical = $WANT_COMMERCIAL"
+echo "  using: with-vaapi = $WANT_VAAPI"
+echo "  using: with-vdpau = $WANT_VDPAU"
 echo ""
 echo "  using: thirdparty build = $WANT_CIN_3RDPARTY"
 echo "  using: single-user  = $WANT_CINBIN_BUILD"
@@ -894,10 +902,10 @@ if test "x$HAVE_NUMA" = "xyes"; then
 fi
 
 FFMPEG_EXTRA_LDFLAGS=""
-if test "x$HAVE_vaapi" = "xyes"; then
+if test "x$WANT_VAAPI" != "xno" -a "x$HAVE_VAAPI" = "xyes"; then
   FFMPEG_EXTRA_LDFLAGS+=' -lva'
   EXTRA_LIBS+=' -lva'
-  WANT_VAAPI='yes'
+  WANT_VAPPI="yes"
   CFG_WANTS+=" VAAPI"
   if test "x$HAVE_vaapi_x11" = "xyes"; then
     FFMPEG_EXTRA_LDFLAGS+=' -lva-x11'
@@ -908,6 +916,11 @@ if test "x$HAVE_vaapi" = "xyes"; then
     EXTRA_LIBS+=' -lva-drm'
   fi
 fi
+if test "x$WANT_VDPAU" != "xno" -a "x$HAVE_VDPAU" = "xyes"; then
+  WANT_VDPAU="yes"
+  CFG_WANTS+=" VDPAU"
+fi
+
 if test "x$HAVE_DL" = "xyes"; then
   EXTRA_LIBS+=' -ldl'
   FFMPEG_EXTRA_LDFLAGS+=' -ldl'
index 74ce4eaf3ac1d681aec1f3c6aaf6af341d672b70..39d93f6ad52065cdc4cafc3f717da626890bde81 100644 (file)
@@ -111,6 +111,7 @@ fftw.cfg_params= --disable-fortran --enable-shared=no
 ffmpeg.cfg_params= \
        --enable-pthreads --enable-gpl --disable-ffplay \
        $(if $(WANT_VAAPI),--enable-vaapi,--disable-vaapi) \
+       $(if $(WANT_VDPAU),--enable-vdpau,--disable-vdpau) \
        $(call if_pkg,twolame,--enable-libtwolame) \
        $(call if_pkg,openjpeg,--enable-libopenjpeg) \
        $(call if_pkg,lame,--enable-libmp3lame) \