0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. superres: Fix return value VideoFrameSource_GPU
  2. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  3. From 2e393ab83362743ba1825ad4b31d4a2925c606b4 Mon Sep 17 00:00:00 2001
  4. From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  5. Date: Mon, 27 Oct 2014 13:39:35 +0000
  6. Subject: [PATCH] superres: Fix return value VideoFrameSource_GPU
  7. superres module fails to compile with the following error messages:
  8. [100%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o
  9. /opencv-2.4.10/modules/superres/src/frame_source.cpp: In function 'cv::Ptr<cv::superres::FrameSource> cv::superres::createFrameSource_Video_GPU(const string&)':
  10. /opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected type-specifier before 'VideoFrameSource'
  11. /opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: could not convert '(int*)operator new(4ul)' from 'int*' to 'cv::Ptr<cv::superres::FrameSource>'
  12. /opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected ';' before 'VideoFrameSource'
  13. /opencv-2.4.10/modules/superres/src/frame_source.cpp:263:41: error: 'VideoFrameSource' was not declared in this scope
  14. /opencv-2.4.10/modules/superres/src/frame_source.cpp:264:1: error: control reaches end of non-void function [-Werror=return-type]
  15. cc1plus: some warnings being treated as errors
  16. make[3]: *** [modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o] Error 1
  17. make[3]: *** Waiting for unfinished jobs....
  18. This is caused because the return value of the createFrameSource_Video_GPU function should be a VideoFrameSource_GPU object.
  19. ---
  20. modules/superres/src/frame_source.cpp | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. diff --git a/modules/superres/src/frame_source.cpp b/modules/superres/src/frame_source.cpp
  23. index 5f59a98..c5b2e76 100644
  24. --- a/modules/superres/src/frame_source.cpp
  25. +++ b/modules/superres/src/frame_source.cpp
  26. @@ -260,7 +260,7 @@ namespace
  27. Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const string& fileName)
  28. {
  29. - return new VideoFrameSource(fileName);
  30. + return new VideoFrameSource_GPU(fileName);
  31. }
  32. #endif // HAVE_OPENCV_GPU