buildroot/package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch
Samuel Martin ac57d05076 package/opencv: re-introduce opencv for opencv-2.4
As Jonathan noticed in [1], users' applications may depend on opencv-2.4
APIs removed in opencv-3.0.

So, re-introduce opencv package as it was right before the bump to
opencv-3.0 (i.e.: commit bf00b5a9ea).

We do not support both OpenCV-2.4 and OpenCV-3 at the same time, so make
OpenCV-3 depend on !OpenCV-2.4.

[1] http://lists.busybox.net/pipermail/buildroot/2015-August/135270.html

Cc: Jonathan Ben Avraham <yba@tkos.co.il>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[yann.morin.1998@free.fr:
  - remove legacy symbols, now
  - make opencv3 depends on !opencv, not the other way around
  - slitghly reword the commit log (opencv/opencv3 dependency)
]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-08-25 11:56:57 +02:00

41 lines
2.1 KiB
Diff

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