fixed build under MacOS (disabled video decoding, it's not supported)
This commit is contained in:
parent
91e312958b
commit
2dafc9a853
@ -50,21 +50,27 @@ if (HAVE_CUDA)
|
|||||||
OCV_CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
|
OCV_CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
|
||||||
#CUDA_BUILD_CLEAN_TARGET()
|
#CUDA_BUILD_CLEAN_TARGET()
|
||||||
|
|
||||||
unset(CUDA_nvcuvid_LIBRARY CACHE)
|
if(NOT APPLE)
|
||||||
find_cuda_helper_libs(nvcuvid)
|
unset(CUDA_nvcuvid_LIBRARY CACHE)
|
||||||
|
find_cuda_helper_libs(nvcuvid)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
unset(CUDA_nvcuvenc_LIBRARY CACHE)
|
unset(CUDA_nvcuvenc_LIBRARY CACHE)
|
||||||
find_cuda_helper_libs(nvcuvenc)
|
find_cuda_helper_libs(nvcuvenc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY} ${CUDA_nvcuvid_LIBRARY})
|
set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
||||||
|
|
||||||
|
if(NOT APPLE)
|
||||||
|
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvid_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY})
|
set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_FFMPEG)
|
if(NOT APPLE AND WITH_FFMPEG)
|
||||||
set(cuda_link_libs ${cuda_link_libs} ${HIGHGUI_LIBRARIES})
|
set(cuda_link_libs ${cuda_link_libs} ${HIGHGUI_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "ffmpeg_video_source.h"
|
#include "ffmpeg_video_source.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
#ifdef HAVE_FFMPEG
|
#ifdef HAVE_FFMPEG
|
||||||
#include "cap_ffmpeg_impl.hpp"
|
#include "cap_ffmpeg_impl.hpp"
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "thread_wrappers.h"
|
#include "thread_wrappers.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
struct InputMediaStream_FFMPEG;
|
struct InputMediaStream_FFMPEG;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "frame_queue.h"
|
#include "frame_queue.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
cv::gpu::detail::FrameQueue::FrameQueue() :
|
cv::gpu::detail::FrameQueue::FrameQueue() :
|
||||||
endOfDecode_(0),
|
endOfDecode_(0),
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "thread_wrappers.h"
|
#include "thread_wrappers.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
namespace cv { namespace gpu
|
namespace cv { namespace gpu
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,9 @@
|
|||||||
#include <cublas.h>
|
#include <cublas.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <nvcuvid.h>
|
#ifndef __APPLE__
|
||||||
|
#include <nvcuvid.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <NVEncoderAPI.h>
|
#include <NVEncoderAPI.h>
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "thread_wrappers.h"
|
#include "thread_wrappers.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
namespace cv { namespace gpu
|
namespace cv { namespace gpu
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include "video_decoder.h"
|
#include "video_decoder.h"
|
||||||
#include "frame_queue.h"
|
#include "frame_queue.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& videoFormat)
|
void cv::gpu::detail::VideoDecoder::create(const VideoReader_GPU::FormatInfo& videoFormat)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "cu_safe_call.h"
|
#include "cu_safe_call.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
namespace cv { namespace gpu
|
namespace cv { namespace gpu
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include "video_parser.h"
|
#include "video_parser.h"
|
||||||
#include "cu_safe_call.h"
|
#include "cu_safe_call.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
cv::gpu::detail::VideoParser::VideoParser(VideoDecoder* videoDecoder, FrameQueue* frameQueue) :
|
cv::gpu::detail::VideoParser::VideoParser(VideoDecoder* videoDecoder, FrameQueue* frameQueue) :
|
||||||
videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false)
|
videoDecoder_(videoDecoder), frameQueue_(frameQueue), unparsedPackets_(0), hasError_(false)
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#include "frame_queue.h"
|
#include "frame_queue.h"
|
||||||
#include "video_decoder.h"
|
#include "video_decoder.h"
|
||||||
|
|
||||||
#ifdef HAVE_CUDA
|
#if defined(HAVE_CUDA) && !defined(__APPLE__)
|
||||||
|
|
||||||
namespace cv { namespace gpu
|
namespace cv { namespace gpu
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
#ifndef HAVE_CUDA
|
#if !defined(HAVE_CUDA) || defined(__APPLE__)
|
||||||
|
|
||||||
class cv::gpu::VideoReader_GPU::Impl
|
class cv::gpu::VideoReader_GPU::Impl
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
#if !defined HAVE_CUDA || !defined WIN32
|
#if !defined(HAVE_CUDA) || !defined(WIN32)
|
||||||
|
|
||||||
class cv::gpu::VideoWriter_GPU::Impl
|
class cv::gpu::VideoWriter_GPU::Impl
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user