diff options
author | Nicola Murino <nicola.murino@gmail.com> | 2018-11-25 16:13:28 +0100 |
---|---|---|
committer | Nicolas Dufresne <nicolas@ndufresne.ca> | 2018-11-26 13:29:03 +0000 |
commit | b0773c6ea790862f014b468530a93cf89ae6f3d7 (patch) | |
tree | 48ef7886f54fd848f6a7940928c1a7acd68779b9 /gst-libs/gst | |
parent | 890dbb560f9f032bcd5232d688cb08b8e64d785b (diff) | |
download | gstreamer-plugins-bad-b0773c6ea790862f014b468530a93cf89ae6f3d7.tar.gz |
opencv: make compatible with opencv 4
Closed #826
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/opencv/gstopencvutils.cpp | 3 | ||||
-rw-r--r-- | gst-libs/gst/opencv/gstopencvvideofilter.cpp | 3 | ||||
-rw-r--r-- | gst-libs/gst/opencv/meson.build | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/gst-libs/gst/opencv/gstopencvutils.cpp b/gst-libs/gst/opencv/gstopencvutils.cpp index bb5eb94c2..9d90da73f 100644 --- a/gst-libs/gst/opencv/gstopencvutils.cpp +++ b/gst-libs/gst/opencv/gstopencvutils.cpp @@ -25,6 +25,9 @@ #include "gstopencvutils.h" #include <opencv2/core.hpp> +#if (CV_MAJOR_VERSION >= 4) +#include <opencv2/core/types_c.h> +#endif /* The various opencv image containers or headers store the following information: diff --git a/gst-libs/gst/opencv/gstopencvvideofilter.cpp b/gst-libs/gst/opencv/gstopencvvideofilter.cpp index 94f3b6d4e..7232a0a68 100644 --- a/gst-libs/gst/opencv/gstopencvvideofilter.cpp +++ b/gst-libs/gst/opencv/gstopencvvideofilter.cpp @@ -51,6 +51,9 @@ #include "gstopencvutils.h" #include <opencv2/core.hpp> +#if (CV_MAJOR_VERSION >= 4) +#include <opencv2/core/core_c.h> +#endif GST_DEBUG_CATEGORY_STATIC (gst_opencv_video_filter_debug); #define GST_CAT_DEFAULT gst_opencv_video_filter_debug diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build index 2babdec85..3fd472fda 100644 --- a/gst-libs/gst/opencv/meson.build +++ b/gst-libs/gst/opencv/meson.build @@ -10,6 +10,9 @@ opencv_headers = [ ] opencv_dep = dependency('opencv', version : '>= 3.0.0', required : get_option('opencv')) +if not opencv_dep.found() + opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : get_option('opencv')) +endif if opencv_dep.found() gstopencv = library('gstopencv-' + api_version, opencv_sources, |