Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Timo Rothenpieler authored on 2015/03/24 18:26:57... | ... |
@@ -4998,6 +4998,8 @@ enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore |
4998 | 4998 |
enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new |
4999 | 4999 |
enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi |
5000 | 5000 |
enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } && |
5001 |
+ { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" || |
|
5002 |
+ die "ERROR: NVENC API version 4 or older is not supported"; } && |
|
5001 | 5003 |
{ [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; } |
5002 | 5004 |
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do |
5003 | 5005 |
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || |
... | ... |
@@ -67,10 +67,6 @@ typedef CUresult(CUDAAPI *PCUCTXDESTROY)(CUcontext ctx); |
67 | 67 |
|
68 | 68 |
typedef NVENCSTATUS (NVENCAPI* PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTION_LIST *functionList); |
69 | 69 |
|
70 |
-#if NVENCAPI_MAJOR_VERSION < 5 |
|
71 |
-static const GUID dummy_license = { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }; |
|
72 |
-#endif |
|
73 |
- |
|
74 | 70 |
typedef struct NvencInputSurface |
75 | 71 |
{ |
76 | 72 |
NV_ENC_INPUT_PTR input_surface; |
... | ... |
@@ -474,10 +470,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) |
474 | 474 |
int res = 0; |
475 | 475 |
int dw, dh; |
476 | 476 |
|
477 |
-#if NVENCAPI_MAJOR_VERSION < 5 |
|
478 |
- GUID license = dummy_license; |
|
479 |
-#endif |
|
480 |
- |
|
481 | 477 |
NvencContext *ctx = avctx->priv_data; |
482 | 478 |
NvencDynLoadFunctions *dl_fn = &ctx->nvenc_dload_funcs; |
483 | 479 |
NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &dl_fn->nvenc_funcs; |
... | ... |
@@ -500,10 +492,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) |
500 | 500 |
encode_session_params.version = NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER; |
501 | 501 |
encode_session_params.apiVersion = NVENCAPI_VERSION; |
502 | 502 |
|
503 |
-#if NVENCAPI_MAJOR_VERSION < 5 |
|
504 |
- encode_session_params.clientKeyPtr = &license; |
|
505 |
-#endif |
|
506 |
- |
|
507 | 503 |
if (ctx->gpu >= dl_fn->nvenc_device_count) { |
508 | 504 |
av_log(avctx, AV_LOG_FATAL, "Requested GPU %d, but only %d GPUs are available!\n", ctx->gpu, dl_fn->nvenc_device_count); |
509 | 505 |
res = AVERROR(EINVAL); |
... | ... |
@@ -1108,10 +1096,6 @@ static int nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
1108 | 1108 |
pic_params.codecPicParams.h264PicParams.sliceMode = ctx->encode_config.encodeCodecConfig.h264Config.sliceMode; |
1109 | 1109 |
pic_params.codecPicParams.h264PicParams.sliceModeData = ctx->encode_config.encodeCodecConfig.h264Config.sliceModeData; |
1110 | 1110 |
|
1111 |
-#if NVENCAPI_MAJOR_VERSION < 5 |
|
1112 |
- memcpy(&pic_params.rcParams, &ctx->encode_config.rcParams, sizeof(NV_ENC_RC_PARAMS)); |
|
1113 |
-#endif |
|
1114 |
- |
|
1115 | 1111 |
res = timestamp_queue_enqueue(&ctx->timestamp_list, frame->pts); |
1116 | 1112 |
|
1117 | 1113 |
if (res) |
... | ... |
@@ -30,7 +30,7 @@ |
30 | 30 |
|
31 | 31 |
#define LIBAVCODEC_VERSION_MAJOR 56 |
32 | 32 |
#define LIBAVCODEC_VERSION_MINOR 29 |
33 |
-#define LIBAVCODEC_VERSION_MICRO 100 |
|
33 |
+#define LIBAVCODEC_VERSION_MICRO 101 |
|
34 | 34 |
|
35 | 35 |
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
36 | 36 |
LIBAVCODEC_VERSION_MINOR, \ |