aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-08-27 14:39:35 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-08-28 16:47:54 +0200
commit325e56479ff64c884f3bcccf922a7f7163488b89 (patch)
tree638898bc897039dab3ac3e71579a314e78a3a712 /configure
parent13b90ff2c12749aac58d22da4cb47c24b7a37b04 (diff)
downloadffmpeg-325e56479ff64c884f3bcccf922a7f7163488b89.tar.gz
avcodec/nvenc: include nvEncodeAPI v7 SDK header
As Nvidia has put the most recent Video Codec SDK behind a double registration wall, of which one needs manual approval of a lenghty application, bundling this header saves everyone trying to use NVENC from that headache. The header is still MIT licensed and thus fine to bundle with ffmpeg. Not bundling this header would get ffmpeg stuck at SDK v6, which is still freely available, holding back future development of the NVENC encoder.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 17 insertions, 5 deletions
diff --git a/configure b/configure
index 5c11040f77..52931c34bd 100755
--- a/configure
+++ b/configure
@@ -307,7 +307,7 @@ External library support:
--enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]
--enable-libnpp enable Nvidia Performance Primitives-based code [no]
--enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no]
- --enable-nvenc enable Nvidia video encoding code [no]
+ --disable-nvenc disable Nvidia video encoding code [autodetect]
--enable-omx enable OpenMAX IL code [no]
--enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no]
--disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect]
@@ -5777,10 +5777,6 @@ enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect
enabled mmal && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"
enabled netcdf && require_pkg_config netcdf netcdf.h nc_inq_libvers
-enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } &&
- { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" ||
- die "ERROR: NVENC API version 5 or older is not supported"; } &&
- { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; }
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
die "ERROR: openal not found"; } &&
@@ -5996,6 +5992,22 @@ enabled vdpau && enabled xlib &&
check_lib2 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau &&
enable vdpau_x11
+case $target_os in
+ mingw32*|mingw64*|win32|win64|linux|cygwin*)
+ disabled nvenc || enable nvenc
+ ;;
+ *)
+ disable nvenc
+ ;;
+esac
+
+if enabled nvenc; then
+ {
+ echo '#include "compat/nvenc/nvEncodeAPI.h"'
+ echo 'int main(void) { return 0; }'
+ } | check_cc -I$source_path || disable nvenc
+fi
+
# Funny iconv installations are not unusual, so check it after all flags have been set
disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv