mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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.
This commit is contained in:
parent
13b90ff2c1
commit
325e56479f
3219
compat/nvenc/nvEncodeAPI.h
Normal file
3219
compat/nvenc/nvEncodeAPI.h
Normal file
File diff suppressed because it is too large
Load Diff
22
configure
vendored
22
configure
vendored
@ -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
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef AVCODEC_NVENC_H
|
||||
#define AVCODEC_NVENC_H
|
||||
|
||||
#include <nvEncodeAPI.h>
|
||||
#include "compat/nvenc/nvEncodeAPI.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
@ -26,3 +26,4 @@ compat/avisynth/windowsPorts/basicDataTypeConversions.h
|
||||
compat/avisynth/windowsPorts/windows2linux.h
|
||||
compat/float/float.h
|
||||
compat/float/limits.h
|
||||
compat/nvenc/nvEncodeAPI.h
|
||||
|
Loading…
Reference in New Issue
Block a user