]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure: add --enable-nvenc for static ffmpeg build, fixes #3438
authorJaroslav Kysela <perex@perex.cz>
Sat, 26 Dec 2015 18:05:29 +0000 (19:05 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 26 Dec 2015 18:06:58 +0000 (19:06 +0100)
Makefile.ffmpeg
configure

index 54919a09060d338889ff36ed3bb386b45a42121b..ba7fdfe3c12db60ee332fb71e16e859de3788939 100644 (file)
@@ -138,6 +138,18 @@ DECODERS += h264_vdpau
 
 endif
 
+#
+# NVENC
+#
+
+ifeq (yes,$(CONFIG_NVENC))
+
+EXTRAARG += --enable-nvenc --enable-nonfree
+
+ENCODERS += nvenc_h264 nvenc_hevc
+
+endif
+
 #
 # MFX Dispatcher (libmfx)
 #
index 4e8517553bfb4c7f27542951358b04135b420f67..f90d18b3ec9a0f7cc6008795375152ae5878c2d1 100755 (executable)
--- a/configure
+++ b/configure
@@ -39,6 +39,7 @@ OPTIONS=(
   "libx265:no"
   "libx265_static:yes"
   "vdpau:auto"
+  "nvenc:auto"
   "libmfx:no"
   "libmfx_static:yes"
   "inotify:auto"
@@ -426,6 +427,15 @@ if enabled libffmpeg_static; then
     fi
   fi
 
+  # nvenc
+  if enabled_or_auto nvenc; then
+    if check_cc_header nvEncodeAPI; then
+      enable nvenc
+    elif enabled nvenc; then
+      die "NVENC library (https://developer.nvidia.com/nvidia-video-codec-sdk) not found"
+    fi
+  fi
+
   # libmfx
   if enabled libmfx; then
     check_cc_lib va || die "libva not found"