From dab249a4453f86c7cf671da0ba10ff0b8bcc5531 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Fri, 2 Oct 2015 16:01:29 +0100 Subject: [PATCH] handdetect: Change gsthanddetect to C++ Change the gsthanddetect.c file to cpp and add it into Makefile. It is necessary to migrate the handdetect plugin to C++, in order to load new and old classifiers, to make handdetect work with newer versions of Opencv. https://bugzilla.gnome.org/show_bug.cgi?id=752528 --- ext/opencv/Makefile.am | 6 +++--- ext/opencv/{gsthanddetect.c => gsthanddetect.cpp} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename ext/opencv/{gsthanddetect.c => gsthanddetect.cpp} (100%) diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am index 72472fbe9a..140d0449fb 100644 --- a/ext/opencv/Makefile.am +++ b/ext/opencv/Makefile.am @@ -13,7 +13,7 @@ libgstopencv_la_SOURCES = gstopencv.cpp \ gstcvsobel.c \ gstedgedetect.cpp \ gstfaceblur.cpp \ - gsthanddetect.c \ + gsthanddetect.cpp \ gstpyramidsegment.c \ gsttemplatematch.c \ gsttextoverlay.c \ @@ -27,7 +27,8 @@ libgstopencv_la_SOURCES = gstopencv.cpp \ motioncells_wrapper.cpp \ MotionCells.cpp -libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENCV_CFLAGS) +libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENCV_CFLAGS) \ + -DGST_HAAR_CASCADES_DIR=\"$(pkgdatadir)/@GST_API_VERSION@/opencv_haarcascades\" # flags used to compile this facedetect # add other _CFLAGS and _LIBS as needed @@ -36,7 +37,6 @@ libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_C # OpenCV's define isn't good enough to avoid 'unused' gcc warnings (at v2.1.0) libgstopencv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) $(OPENCV_CFLAGS) \ - -DGST_HAAR_CASCADES_DIR=\"$(pkgdatadir)/@GST_API_VERSION@/opencv_haarcascades\" \ -DCV_INLINE="static inline" \ -DCV_NO_BACKWARD_COMPATIBILITY diff --git a/ext/opencv/gsthanddetect.c b/ext/opencv/gsthanddetect.cpp similarity index 100% rename from ext/opencv/gsthanddetect.c rename to ext/opencv/gsthanddetect.cpp