fixed build of gpu module without CUDA (video encoding/decoding)
authorVladislav Vinogradov <no@email>
Tue, 24 Apr 2012 07:49:55 +0000 (07:49 +0000)
committerVladislav Vinogradov <no@email>
Tue, 24 Apr 2012 07:49:55 +0000 (07:49 +0000)
modules/gpu/CMakeLists.txt
modules/gpu/src/video_reader.cpp
modules/gpu/src/video_writer.cpp

index 2a4e6e3..f458409 100644 (file)
@@ -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)
index fc2843c..df66fce 100644 (file)
 \r
 #ifndef HAVE_CUDA\r
 \r
+class cv::gpu::VideoReader_GPU::Impl\r
+{\r
+};\r
+\r
 cv::gpu::VideoReader_GPU::VideoReader_GPU() { throw_nogpu(); }\r
 cv::gpu::VideoReader_GPU::VideoReader_GPU(const std::string&) { throw_nogpu(); }\r
 cv::gpu::VideoReader_GPU::VideoReader_GPU(const cv::Ptr<VideoSource>&) { throw_nogpu(); }\r
@@ -53,7 +57,7 @@ void cv::gpu::VideoReader_GPU::open(const cv::Ptr<VideoSource>&) { throw_nogpu()
 bool cv::gpu::VideoReader_GPU::isOpened() const { return false; }\r
 void cv::gpu::VideoReader_GPU::close() { }\r
 bool cv::gpu::VideoReader_GPU::read(GpuMat&) { throw_nogpu(); return false; }\r
-cv::gpu::VideoReader_GPU::FormatInfo cv::gpu::VideoReader_GPU::format() const { throw_nogpu(); FormatInfo format; return format; }\r
+cv::gpu::VideoReader_GPU::FormatInfo cv::gpu::VideoReader_GPU::format() const { throw_nogpu(); FormatInfo format = {MPEG1,Monochrome,0,0}; return format; }\r
 bool cv::gpu::VideoReader_GPU::VideoSource::parseVideoData(const unsigned char*, size_t, bool) { throw_nogpu(); return false; }\r
 void cv::gpu::VideoReader_GPU::dumpFormat(std::ostream&) { throw_nogpu(); }\r
 \r
index 2a71c51..b6ed329 100644 (file)
 \r
 #if !defined HAVE_CUDA || !defined WIN32\r
 \r
+class cv::gpu::VideoWriter_GPU::Impl\r
+{\r
+};\r
+\r
 cv::gpu::VideoWriter_GPU::VideoWriter_GPU() { throw_nogpu(); }\r
 cv::gpu::VideoWriter_GPU::VideoWriter_GPU(const std::string&, cv::Size, double, SurfaceFormat) { throw_nogpu(); }\r
 cv::gpu::VideoWriter_GPU::VideoWriter_GPU(const std::string&, cv::Size, double, const EncoderParams&, SurfaceFormat) { throw_nogpu(); }\r