diff --git a/modules/gpu/CMakeLists.txt b/modules/gpu/CMakeLists.txt index 2a4e6e3f86..f458409573 100644 --- a/modules/gpu/CMakeLists.txt +++ b/modules/gpu/CMakeLists.txt @@ -58,7 +58,7 @@ if (HAVE_CUDA) find_cuda_helper_libs(nvcuvenc) endif() - set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY} ${CUDA_nvcuvid_LIBRARY}) + set(cuda_link_libs ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY} ${CUDA_nvcuvid_LIBRARY} ${HIGHGUI_LIBRARIES}) if (WIN32) set(cuda_link_libs ${cuda_link_libs} ${CUDA_nvcuvenc_LIBRARY}) @@ -75,7 +75,7 @@ ocv_set_module_sources( SOURCES ${lib_int_hdrs} ${lib_cuda_hdrs} ${lib_device_hdrs} ${lib_device_hdrs_detail} ${lib_srcs} ${lib_cuda} ${ncv_files} ${cuda_objs} ) -ocv_create_module(${cuda_link_libs} ${HIGHGUI_LIBRARIES}) +ocv_create_module(${cuda_link_libs}) if(HAVE_CUDA) if(HAVE_CUFFT) diff --git a/modules/gpu/src/video_reader.cpp b/modules/gpu/src/video_reader.cpp index fc2843c01a..df66fce7a4 100644 --- a/modules/gpu/src/video_reader.cpp +++ b/modules/gpu/src/video_reader.cpp @@ -44,6 +44,10 @@ #ifndef HAVE_CUDA +class cv::gpu::VideoReader_GPU::Impl +{ +}; + cv::gpu::VideoReader_GPU::VideoReader_GPU() { throw_nogpu(); } cv::gpu::VideoReader_GPU::VideoReader_GPU(const std::string&) { throw_nogpu(); } cv::gpu::VideoReader_GPU::VideoReader_GPU(const cv::Ptr&) { throw_nogpu(); } @@ -53,7 +57,7 @@ void cv::gpu::VideoReader_GPU::open(const cv::Ptr&) { throw_nogpu() bool cv::gpu::VideoReader_GPU::isOpened() const { return false; } void cv::gpu::VideoReader_GPU::close() { } bool cv::gpu::VideoReader_GPU::read(GpuMat&) { throw_nogpu(); return false; } -cv::gpu::VideoReader_GPU::FormatInfo cv::gpu::VideoReader_GPU::format() const { throw_nogpu(); FormatInfo format; return format; } +cv::gpu::VideoReader_GPU::FormatInfo cv::gpu::VideoReader_GPU::format() const { throw_nogpu(); FormatInfo format = {MPEG1,Monochrome,0,0}; return format; } bool cv::gpu::VideoReader_GPU::VideoSource::parseVideoData(const unsigned char*, size_t, bool) { throw_nogpu(); return false; } void cv::gpu::VideoReader_GPU::dumpFormat(std::ostream&) { throw_nogpu(); } diff --git a/modules/gpu/src/video_writer.cpp b/modules/gpu/src/video_writer.cpp index 2a71c51b34..b6ed3298ad 100644 --- a/modules/gpu/src/video_writer.cpp +++ b/modules/gpu/src/video_writer.cpp @@ -44,6 +44,10 @@ #if !defined HAVE_CUDA || !defined WIN32 +class cv::gpu::VideoWriter_GPU::Impl +{ +}; + cv::gpu::VideoWriter_GPU::VideoWriter_GPU() { throw_nogpu(); } cv::gpu::VideoWriter_GPU::VideoWriter_GPU(const std::string&, cv::Size, double, SurfaceFormat) { throw_nogpu(); } cv::gpu::VideoWriter_GPU::VideoWriter_GPU(const std::string&, cv::Size, double, const EncoderParams&, SurfaceFormat) { throw_nogpu(); }