aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2018-05-09 09:10:11 +0800
committerswills <swills@FreeBSD.org>2018-05-09 09:10:11 +0800
commit6830777312b5049e402dee4d3f12d0a2f6f084b4 (patch)
tree61c3b03ca83f7ee408d0e57d069b884202696225 /multimedia
parent2b6ad4946c7b95809647e4d3a5fad3e636b76c9c (diff)
downloadfreebsd-ports-gnome-6830777312b5049e402dee4d3f12d0a2f6f084b4.tar.gz
freebsd-ports-gnome-6830777312b5049e402dee4d3f12d0a2f6f084b4.tar.zst
freebsd-ports-gnome-6830777312b5049e402dee4d3f12d0a2f6f084b4.zip
graphics/opencv: Update to 3.4.1
PR: 210505 Submitted by: rozhuk.im@gmail.com (partially, further work was done) Exp-run by: antoine
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.c12
-rw-r--r--multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.h13
-rw-r--r--multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.c42
-rw-r--r--multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.h13
-rw-r--r--multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gsttemplatematch.c11
-rw-r--r--multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstfacedetect.h11
-rw-r--r--multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsthanddetect.h11
-rw-r--r--multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsttemplatematch.cpp11
-rw-r--r--multimedia/libav/Makefile2
9 files changed, 125 insertions, 1 deletions
diff --git a/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.c b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.c
new file mode 100644
index 000000000000..26dd078740a2
--- /dev/null
+++ b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.c
@@ -0,0 +1,12 @@
+--- ext/opencv/gstfaceblur.c.orig 2011-12-30 13:24:28.000000000 -0500
++++ ext/opencv/gstfaceblur.c 2018-05-02 15:58:32.070297000 -0400
+@@ -268,9 +268,7 @@ gst_face_blur_chain (GstPad * pad, GstBuffer * buf)
+ faces =
+ cvHaarDetectObjects (filter->cvGray, filter->cvCascade,
+ filter->cvStorage, 1.1, 2, 0, cvSize (30, 30)
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+ , cvSize (32, 32)
+-#endif
+ );
+
+ if (faces && faces->total > 0) {
diff --git a/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.h b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.h
new file mode 100644
index 000000000000..268c779bc71e
--- /dev/null
+++ b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.h
@@ -0,0 +1,13 @@
+--- ext/opencv/gstfaceblur.h.orig 2011-12-30 13:24:28.000000000 -0500
++++ ext/opencv/gstfaceblur.h 2018-05-02 15:58:32.071694000 -0400
+@@ -49,10 +49,6 @@
+ #include <gst/gst.h>
+ #include <cv.h>
+
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+-#include <opencv2/objdetect/objdetect.hpp>
+-#endif
+-
+ G_BEGIN_DECLS
+ /* #defines don't like whitespacey bits */
+ #define GST_TYPE_FACE_BLUR \
diff --git a/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.c b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.c
new file mode 100644
index 000000000000..e327887dded6
--- /dev/null
+++ b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.c
@@ -0,0 +1,42 @@
+--- ext/opencv/gstfacedetect.c.orig 2011-12-30 13:24:28.000000000 -0500
++++ ext/opencv/gstfacedetect.c 2018-05-02 15:58:32.073221000 -0400
+@@ -502,9 +502,7 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * b
+ cvHaarDetectObjects (filter->cvGray, filter->cvFaceDetect,
+ filter->cvStorage, filter->scale_factor, filter->min_neighbors,
+ filter->flags, cvSize (filter->min_size_width, filter->min_size_height)
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+ , cvSize (filter->min_size_width + 2, filter->min_size_height + 2)
+-#endif
+ );
+
+ if (faces && faces->total > 0) {
+@@ -534,9 +532,7 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * b
+ cvHaarDetectObjects (filter->cvGray, filter->cvNoseDetect,
+ filter->cvStorage, filter->scale_factor, filter->min_neighbors,
+ filter->flags, cvSize (mw, mh)
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+ , cvSize (mw + 2, mh + 2)
+-#endif
+ );
+ have_nose = (nose && nose->total);
+ cvResetImageROI (filter->cvGray);
+@@ -550,9 +546,7 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * b
+ cvHaarDetectObjects (filter->cvGray, filter->cvMouthDetect,
+ filter->cvStorage, filter->scale_factor, filter->min_neighbors,
+ filter->flags, cvSize (mw, mh)
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+ , cvSize (mw + 2, mh + 2)
+-#endif
+ );
+ have_mouth = (mouth && mouth->total);
+ cvResetImageROI (filter->cvGray);
+@@ -566,9 +560,7 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * b
+ cvHaarDetectObjects (filter->cvGray, filter->cvEyesDetect,
+ filter->cvStorage, filter->scale_factor, filter->min_neighbors,
+ filter->flags, cvSize (mw, mh)
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+ , cvSize (mw + 2, mh + 2)
+-#endif
+ );
+ have_eyes = (eyes && eyes->total);
+ cvResetImageROI (filter->cvGray);
diff --git a/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.h b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.h
new file mode 100644
index 000000000000..31d7a3965d12
--- /dev/null
+++ b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.h
@@ -0,0 +1,13 @@
+--- ext/opencv/gstfacedetect.h.orig 2011-12-30 13:24:28.000000000 -0500
++++ ext/opencv/gstfacedetect.h 2018-05-02 15:58:32.074608000 -0400
+@@ -51,9 +51,7 @@
+ #include <cv.h>
+ #include "gstopencvvideofilter.h"
+
+-#if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2)
+-#include <opencv2/objdetect/objdetect.hpp>
+-#endif
++#include <opencv2/imgcodecs/imgcodecs_c.h>
+
+ G_BEGIN_DECLS
+ /* #defines don't like whitespacey bits */
diff --git a/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gsttemplatematch.c b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gsttemplatematch.c
new file mode 100644
index 000000000000..79339d7b1307
--- /dev/null
+++ b/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gsttemplatematch.c
@@ -0,0 +1,11 @@
+--- ./ext/opencv/gsttemplatematch.c.orig 2018-05-02 20:00:45.872112000 +0000
++++ ./ext/opencv/gsttemplatematch.c 2018-05-02 20:01:19.130929000 +0000
+@@ -66,6 +66,8 @@
+ #include "gstopencvutils.h"
+ #include "gsttemplatematch.h"
+
++#include "opencv2/imgcodecs/imgcodecs_c.h"
++
+ GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug);
+ #define GST_CAT_DEFAULT gst_template_match_debug
+
diff --git a/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstfacedetect.h b/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstfacedetect.h
new file mode 100644
index 000000000000..5c91348389fc
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstfacedetect.h
@@ -0,0 +1,11 @@
+--- ext/opencv/gstfacedetect.h.orig 2018-05-02 20:45:00.402253000 +0000
++++ ext/opencv/gstfacedetect.h 2018-05-02 20:45:40.025207000 +0000
+@@ -50,7 +50,7 @@
+
+ #include <gst/gst.h>
+ #include <opencv2/core/version.hpp>
+-#include <cv.h>
++#include <opencv/cv.h>
+ #include <gst/opencv/gstopencvvideofilter.h>
+ #include <opencv2/objdetect/objdetect.hpp>
+
diff --git a/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsthanddetect.h b/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsthanddetect.h
new file mode 100644
index 000000000000..4dfceb05cdbf
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsthanddetect.h
@@ -0,0 +1,11 @@
+--- ext/opencv/gsthanddetect.h.orig 2018-05-02 20:46:12.793424000 +0000
++++ ext/opencv/gsthanddetect.h 2018-05-02 20:46:29.272504000 +0000
+@@ -45,7 +45,7 @@
+ #ifndef __GST_HANDDETECT_H__
+ #define __GST_HANDDETECT_H__
+
+-#include <cv.h>
++#include <opencv/cv.h>
+
+ #include <gst/opencv/gstopencvvideofilter.h>
+ /* opencv */
diff --git a/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsttemplatematch.cpp b/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsttemplatematch.cpp
new file mode 100644
index 000000000000..f52c815836b1
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsttemplatematch.cpp
@@ -0,0 +1,11 @@
+--- ext/opencv/gsttemplatematch.cpp.orig 2018-05-02 20:48:22.600036000 +0000
++++ ext/opencv/gsttemplatematch.cpp 2018-05-02 20:50:39.989630000 +0000
+@@ -64,6 +64,8 @@
+ #include "../../gst-libs/gst/gst-i18n-plugin.h"
+ #include "gsttemplatematch.h"
+ #include <opencv2/imgproc/imgproc_c.h>
++#include <opencv2/imgproc/types_c.h>
++#include <opencv2/imgcodecs/imgcodecs_c.h>
+
+ GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug);
+ #define GST_CAT_DEFAULT gst_template_match_debug
diff --git a/multimedia/libav/Makefile b/multimedia/libav/Makefile
index e0efab084756..7fb7dfd5b5b8 100644
--- a/multimedia/libav/Makefile
+++ b/multimedia/libav/Makefile
@@ -104,7 +104,7 @@ JACK_CONFIGURE_OFF= --disable-indev=jack
LAME_LIB_DEPENDS= libmp3lame.so:audio/lame
LAME_CONFIGURE_ENABLE= libmp3lame
-OPENCV_LIB_DEPENDS= libopencv_gpu.so:graphics/opencv
+OPENCV_LIB_DEPENDS= libopencv_video.so:graphics/opencv
OPENCV_CONFIGURE_ENABLE= libopencv
OPENJPEG_LIB_DEPENDS= libopenjpeg.so:graphics/openjpeg15