Merge pull request #17568 from alalek:cleanup_17527

This commit is contained in:
Alexander Alekhin 2020-06-18 07:38:16 +00:00
commit 42a4c3fba6
6 changed files with 6 additions and 43 deletions

View File

@ -53,6 +53,7 @@ if(CUDA_FOUND)
else() else()
set(${_result} 1) set(${_result} 1)
endif() endif()
unset(_header_result CACHE)
endmacro() endmacro()
SEARCH_NVCUVID_HEADER("nvcuvid.h" HAVE_NVCUVID_HEADER) SEARCH_NVCUVID_HEADER("nvcuvid.h" HAVE_NVCUVID_HEADER)
SEARCH_NVCUVID_HEADER("dynlink_nvcuvid.h" HAVE_DYNLINK_NVCUVID_HEADER) SEARCH_NVCUVID_HEADER("dynlink_nvcuvid.h" HAVE_DYNLINK_NVCUVID_HEADER)

View File

@ -44,17 +44,9 @@
#ifndef __CUVID_VIDEO_SOURCE_HPP__ #ifndef __CUVID_VIDEO_SOURCE_HPP__
#define __CUVID_VIDEO_SOURCE_HPP__ #define __CUVID_VIDEO_SOURCE_HPP__
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
#include <dynlink_nvcuvid.h>
#elif defined(HAVE_NVCUVID_HEADER)
#include <nvcuvid.h>
#endif
#include "opencv2/core/private.cuda.hpp"
#include "opencv2/cudacodec.hpp"
#include "video_source.hpp" #include "video_source.hpp"
namespace cv { namespace cudacodec { namespace detail namespace cv { namespace cudacodec { namespace detail {
{
class CuvidVideoSource : public VideoSource class CuvidVideoSource : public VideoSource
{ {

View File

@ -45,16 +45,8 @@
#define __FRAME_QUEUE_HPP__ #define __FRAME_QUEUE_HPP__
#include "opencv2/core/utility.hpp" #include "opencv2/core/utility.hpp"
#include "opencv2/core/private.cuda.hpp"
#if defined(HAVE_DYNLINK_NVCUVID_HEADER) namespace cv { namespace cudacodec { namespace detail {
#include <dynlink_nvcuvid.h>
#elif defined(HAVE_NVCUVID_HEADER)
#include <nvcuvid.h>
#endif
namespace cv { namespace cudacodec { namespace detail
{
class FrameQueue class FrameQueue
{ {

View File

@ -44,17 +44,7 @@
#ifndef __VIDEO_DECODER_HPP__ #ifndef __VIDEO_DECODER_HPP__
#define __VIDEO_DECODER_HPP__ #define __VIDEO_DECODER_HPP__
#if defined(HAVE_DYNLINK_NVCUVID_HEADER) namespace cv { namespace cudacodec { namespace detail {
#include <dynlink_nvcuvid.h>
#elif defined(HAVE_NVCUVID_HEADER)
#include <nvcuvid.h>
#endif
#include "opencv2/core/private.cuda.hpp"
#include "opencv2/cudacodec.hpp"
namespace cv { namespace cudacodec { namespace detail
{
class VideoDecoder class VideoDecoder
{ {

View File

@ -44,19 +44,10 @@
#ifndef __VIDEO_PARSER_HPP__ #ifndef __VIDEO_PARSER_HPP__
#define __VIDEO_PARSER_HPP__ #define __VIDEO_PARSER_HPP__
#if defined(HAVE_DYNLINK_NVCUVID_HEADER)
#include <dynlink_nvcuvid.h>
#elif defined(HAVE_NVCUVID_HEADER)
#include <nvcuvid.h>
#endif
#include "opencv2/core/private.cuda.hpp"
#include "opencv2/cudacodec.hpp"
#include "frame_queue.hpp" #include "frame_queue.hpp"
#include "video_decoder.hpp" #include "video_decoder.hpp"
namespace cv { namespace cudacodec { namespace detail namespace cv { namespace cudacodec { namespace detail {
{
class VideoParser class VideoParser
{ {

View File

@ -44,12 +44,9 @@
#ifndef __CUDACODEC_VIDEO_SOURCE_H__ #ifndef __CUDACODEC_VIDEO_SOURCE_H__
#define __CUDACODEC_VIDEO_SOURCE_H__ #define __CUDACODEC_VIDEO_SOURCE_H__
#include "opencv2/core/private.cuda.hpp"
#include "opencv2/cudacodec.hpp"
#include "thread.hpp" #include "thread.hpp"
namespace cv { namespace cudacodec { namespace detail namespace cv { namespace cudacodec { namespace detail {
{
class VideoParser; class VideoParser;