diff options
author | Luis de Bethencourt <luisbg@osg.samsung.com> | 2016-11-15 16:57:20 +0000 |
---|---|---|
committer | Luis de Bethencourt <luisbg@osg.samsung.com> | 2016-11-26 17:55:23 +0000 |
commit | de99cf0de1fb332b2e757d027ec8c35eb1ac5811 (patch) | |
tree | 1706b51107b61efa41b36a23959787a2817bee6b | |
parent | 555c4eb1b293626b0020b35360dba3cd2d3f2a29 (diff) | |
download | gstreamer-plugins-bad-de99cf0de1fb332b2e757d027ec8c35eb1ac5811.tar.gz |
opencv: Enable in meson build
https://bugzilla.gnome.org/show_bug.cgi?id=774223
-rw-r--r-- | ext/meson.build | 2 | ||||
-rw-r--r-- | ext/opencv/meson.build | 50 | ||||
-rw-r--r-- | gst-libs/gst/meson.build | 1 | ||||
-rw-r--r-- | gst-libs/gst/opencv/meson.build | 27 |
4 files changed, 79 insertions, 1 deletions
diff --git a/ext/meson.build b/ext/meson.build index 66e1e6fb1..62af78950 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -35,7 +35,7 @@ subdir('libmms') #subdir('neon') #subdir('ofa') #subdir('openal') -#subdir('opencv') +subdir('opencv') #subdir('openexr') subdir('openh264') subdir('openjpeg') diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build new file mode 100644 index 000000000..01bb64019 --- /dev/null +++ b/ext/opencv/meson.build @@ -0,0 +1,50 @@ +opencv_sources = [ + 'gstcvdilate.cpp', + 'gstcvdilateerode.cpp', + 'gstcvequalizehist.cpp', + 'gstcverode.cpp', + 'gstcvlaplace.cpp', + 'gstcvsmooth.cpp', + 'gstcvsobel.cpp', + 'gstdisparity.cpp', + 'gstedgedetect.cpp', + 'gstfaceblur.cpp', + 'gstfacedetect.cpp', + 'gstgrabcut.cpp', + 'gsthanddetect.cpp', + 'gstmotioncells.cpp', + 'gstopencv.cpp', + 'gstretinex.cpp', + 'gstsegmentation.cpp', + 'gstskindetect.cpp', + 'gsttemplatematch.cpp', + 'gsttextoverlay.cpp', + 'MotionCells.cpp', + 'motioncells_wrapper.cpp' +] + +opencv_cargs = ['-DGST_HAAR_CASCADES_DIR="@0@"'] +runcmd = run_command('pkg-config', '--variable=prefix', 'opencv') +if runcmd.returncode() == 0 + opencv_cargs += '-DOPENCV_PREFIX="' + runcmd.stdout().strip() + '"' +endif + +r = run_command('test', '-d', '/usr/share/opencv') +if r.returncode() == 0 + opencv_cargs += '-DOPENCV_PATH_NAME="opencv"' +else + opencv_cargs += '-DOPENCV_PATH_NAME="OpenCv"' +endif + +opencv_dep = dependency('opencv', version : '>= 2.3.0') +if opencv_dep.found() + gstopencv = library('gstopencv', + opencv_sources, + cpp_args : gst_plugins_bad_args + opencv_cargs + [ '-DGST_USE_UNSTABLE_API' ], + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstbase_dep, gstvideo_dep, opencv_dep, gstopencv_dep], + install : true, + install_dir : plugins_install_dir, + ) +endif diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build index 2ea25bcd8..847b5a5a7 100644 --- a/gst-libs/gst/meson.build +++ b/gst-libs/gst/meson.build @@ -8,6 +8,7 @@ subdir('codecparsers') subdir('insertbin') subdir('interfaces') subdir('mpegts') +subdir('opencv') subdir('player') subdir('video') subdir('wayland') diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build new file mode 100644 index 000000000..80639d3aa --- /dev/null +++ b/gst-libs/gst/opencv/meson.build @@ -0,0 +1,27 @@ +opencv_sources = [ + 'gstopencvutils.cpp', + 'gstopencvvideofilter.cpp', +] + +opencv_headers = [ + 'gstopencvutils.h', + 'gstopencvvideofilter.h', +] +install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv') + +opencv_dep = dependency('opencv', version : '>= 2.3.0', required : false) +if opencv_dep.found() + gstopencv = library('gstopencv-' + api_version, + opencv_sources, + c_args : gst_plugins_bad_args, + include_directories : [configinc, libsinc], + version : libversion, + soversion : soversion, + install : true, + dependencies : [gstbase_dep, gstvideo_dep, opencv_dep], + ) + + gstopencv_dep = declare_dependency(link_with: gstopencv, + include_directories : [libsinc], + dependencies : [gstvideo_dep, opencv_dep]) +endif |