]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure: rework vaapi detection
authorJaroslav Kysela <perex@perex.cz>
Tue, 29 Aug 2017 16:35:39 +0000 (18:35 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 29 Aug 2017 16:35:39 +0000 (18:35 +0200)
configure

index 50b18f3080a9aa786b70acf4b29029c6bbe3afa4..231df23477bff34c33f1fdcb112b8b923ac00124 100755 (executable)
--- a/configure
+++ b/configure
@@ -53,7 +53,7 @@ OPTIONS=(
   "libopus:yes"
   "libopus_static:yes"
   "nvenc:no"
-  "vaapi:no"
+  "vaapi:auto"
   "omx:no"
   "inotify:auto"
   "epoll:auto"
@@ -539,15 +539,6 @@ if enabled ffmpeg_static; then
       die "NVENC library (https://developer.nvidia.com/nvidia-video-codec-sdk) not found"
   fi
 
-  # vaapi
-  if enabled vaapi; then
-    check_pkg libva ">=0.38.0"     || \
-      die "vaapi (Video Acceleration (VA) API for Linux) not found"
-    check_pkg libva-x11 ">=0.38.0" || die "libva-x11 not found"
-    check_pkg libva-drm ">=0.38.0" || die "libva-drm not found"
-    enable hwaccels
-  fi
-
   # omx
   if enabled omx; then
     OLDCFLAGS=$CFLAGS
@@ -590,6 +581,22 @@ else
 
 fi
 
+#
+# vaapi
+#
+if enabled_or_auto vaapi; then
+  if enabled libav; then
+    if check_pkg libva ">=0.38.0"; then
+      check_pkg libva-x11 ">=0.38.0" || die "libva-x11 not found"
+      check_pkg libva-drm ">=0.38.0" || die "libva-drm not found"
+      enable vaapi
+      enable hwaccels
+    elif enabled vaapi; then
+      die "vaapi (Video Acceleration (VA) API for Linux) not found"
+    fi
+  fi
+fi
+
 #
 # Inotify
 #