Skip to content

Commit bab3d66

Browse files
committed
[moved from opencv] fix corner case of libnvcuvid
* detect header automatically and not based on version number original commit: opencv/opencv@d4af897
1 parent 522a062 commit bab3d66

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

modules/cudacodec/src/cuvid_video_source.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
#ifndef __CUVID_VIDEO_SOURCE_HPP__
4545
#define __CUVID_VIDEO_SOURCE_HPP__
4646

47-
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
47+
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
4848
#include <dynlink_nvcuvid.h>
49-
#else
49+
#elif defined(HAVE_NVCUVID_HEADER)
5050
#include <nvcuvid.h>
5151
#endif
5252
#include "opencv2/core/private.cuda.hpp"

modules/cudacodec/src/frame_queue.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
#include "opencv2/core/utility.hpp"
4848
#include "opencv2/core/private.cuda.hpp"
4949

50-
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
50+
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
5151
#include <dynlink_nvcuvid.h>
52-
#else
52+
#elif defined(HAVE_NVCUVID_HEADER)
5353
#include <nvcuvid.h>
5454
#endif
5555

modules/cudacodec/src/precomp.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
#include <opencv2/core/utils/logger.hpp>
5959

6060
#ifdef HAVE_NVCUVID
61-
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
61+
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
6262
#include <dynlink_nvcuvid.h>
63-
#else
63+
#elif defined(HAVE_NVCUVID_HEADER)
6464
#include <nvcuvid.h>
6565
#endif
6666

modules/cudacodec/src/video_decoder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
#ifndef __VIDEO_DECODER_HPP__
4545
#define __VIDEO_DECODER_HPP__
4646

47-
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
47+
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
4848
#include <dynlink_nvcuvid.h>
49-
#else
49+
#elif defined(HAVE_NVCUVID_HEADER)
5050
#include <nvcuvid.h>
5151
#endif
5252

modules/cudacodec/src/video_parser.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
#ifndef __VIDEO_PARSER_HPP__
4545
#define __VIDEO_PARSER_HPP__
4646

47-
#if CUDA_VERSION >= 9000 && CUDA_VERSION < 10000
47+
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
4848
#include <dynlink_nvcuvid.h>
49-
#else
49+
#elif defined(HAVE_NVCUVID_HEADER)
5050
#include <nvcuvid.h>
5151
#endif
5252

0 commit comments

Comments
 (0)