Skip to content

Commit 098bc00

Browse files
committed
Merge branch 'dev-0.2'
2 parents ebdc834 + 996d1c8 commit 098bc00

33 files changed

+3529
-916
lines changed

.gitignore

+13-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ gstinference-*.pc
4040

4141
# GtkDoc
4242
docs/version.entities
43+
docs/plugins/*.txt
44+
docs/plugins/*.sgml
45+
docs/plugins/*.new
46+
docs/plugins/*.args
47+
docs/plugins/*.hierarchy
48+
docs/plugins/*.interfaces
49+
docs/plugins/*.prerequisites
50+
docs/plugins/*.signals
51+
docs/plugins/*.stamp
52+
docs/plugins/html/
53+
docs/plugins/xml/
4354

4455
# Tests
4556
test-driver
@@ -53,4 +64,5 @@ cscope.files
5364
cscope.out
5465

5566
# Examples
56-
67+
tests/examples/classification/classification
68+
tests/examples/detection/detection

configure.ac

+32-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
55
dnl initialize autoconf
66
dnl releases only do -Wall, git and prerelease does -Werror too
77
dnl use a three digit version number for releases, and four for git/pre
8-
AC_INIT([GStreamer Inference],[0.1.0.1],[https://github.com/RidgeRun/gst-inference/issues],[gst-inference])
8+
AC_INIT([GStreamer Inference],[0.2.0.1],[https://github.com/RidgeRun/gst-inference/issues],[gst-inference])
99

1010
AG_GST_INIT
1111

@@ -20,6 +20,7 @@ AS_NANO(GST_GIT="no", GST_GIT="yes")
2020

2121
dnl can autoconf find the source ?
2222
AC_CONFIG_SRCDIR([ext/r2inference/gstinference.c])
23+
AC_CONFIG_SRCDIR([ext/opencv/gstinferenceoverlay.c])
2324

2425
dnl define the output header for config
2526
AC_CONFIG_HEADERS([config.h])
@@ -155,6 +156,7 @@ AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
155156
AG_GST_CHECK_GST_CONTROLLER($GST_API_VERSION, [$GST_REQ], yes)
156157
AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
157158
AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
159+
AG_GST_CHECK_MODULES(GST_VIDEO, gstreamer-video-[$GST_API_VERSION], [$GST_REQ], [GStreamer Video], yes)
158160

159161
GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_API_VERSION`
160162
if test -z $GST_TOOLS_DIR; then
@@ -264,8 +266,33 @@ echo
264266
AC_MSG_NOTICE([Checking libraries for plugins in ext/])
265267
echo
266268

267-
AG_GST_CHECK_FEATURE(R2INFERENCE, [RidgeRun's Inference Framework], gstinference, [
269+
dnl *** opencv ***
270+
OPENCV_REQ=2.3.1
271+
translit(dnm, m, l) AM_CONDITIONAL(USE_OPENCV, true)
272+
AG_GST_CHECK_FEATURE(OPENCV, [OpenCV computer vision library], opencv, [
273+
AG_GST_PKG_CHECK_MODULES(OPENCV, opencv >= $OPENCV_REQ )
274+
])
275+
dnl define conditional for opencv versions 2.3.1 to 3.1.0
276+
if test "$USE_OPENCV" = "yes"; then
277+
OCV_BASE_VERSION_MAJOR=3
278+
OCV_BASE_VERSION_MINOR=2
279+
OCV_VERSION_MAJOR=$(pkg-config --modversion opencv | awk -F. '{print $1}')
280+
OCV_VERSION_MINOR=$(pkg-config --modversion opencv | awk -F. '{print $2}')
281+
if test "$OCV_VERSION_MAJOR" -lt "$OCV_BASE_VERSION_MAJOR"; then
282+
AC_DEFINE([OCV_VERSION_LT_3_2], [1], [Defined if OpenCV version is less than 3.2])
283+
else
284+
if test "$OCV_VERSION_MINOR" -lt "$OCV_BASE_VERSION_MINOR"; then
285+
AC_DEFINE([OCV_VERSION_LT_3_2], [1], [Defined if OpenCV version is less than 3.2])
286+
fi
287+
fi
288+
AC_MSG_NOTICE([OpenCV version: $OCV_VERSION_MAJOR.$OCV_VERSION_MINOR])
289+
fi
290+
291+
dnl *** r2inference ***
292+
AG_GST_CHECK_FEATURE(R2INFERENCE, [RidgeRun\'s Inference Framework], r2inference, [
268293
AG_GST_PKG_CHECK_MODULES(R2INFERENCE, r2inference-0.0)
294+
],[],[],[
295+
AC_MSG_ERROR([Please install R2Inference from https://github.com/RidgeRun/r2inference.git])
269296
])
270297

271298
else
@@ -354,8 +381,11 @@ gst-libs/gst/r2inference/Makefile
354381
m4/Makefile
355382
ext/Makefile
356383
ext/r2inference/Makefile
384+
ext/opencv/Makefile
357385
tests/Makefile
358386
tests/check/Makefile
387+
tests/examples/classification/Makefile
388+
tests/examples/detection/Makefile
359389
tests/examples/Makefile
360390
tests/files/Makefile
361391
)

ext/Makefile.am

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ else
44
R2INFERENCE_DIR=
55
endif
66

7-
SUBDIRS=$(R2INFERENCE_DIR)
7+
if USE_OPENCV
8+
OPENCV_DIR = opencv
9+
else
10+
OPENCV_DIR =
11+
endif
12+
13+
SUBDIRS = \
14+
$(R2INFERENCE_DIR) \
15+
$(OPENCV_DIR)
816

9-
DIST_SUBDIRS=r2inference
17+
DIST_SUBDIRS = \
18+
r2inference \
19+
opencv
1020

1121
include $(top_srcdir)/common/parallel-subdirs.mak

ext/opencv/Makefile.am

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugin_LTLIBRARIES = libgstinferenceoverlay.la
2+
3+
libgstinferenceoverlay_la_SOURCES = \
4+
gstclassificationoverlay.cc \
5+
gstdetectionoverlay.cc \
6+
gstinferenceoverlay.c
7+
8+
libgstinferenceoverlay_la_CFLAGS = \
9+
$(GST_CFLAGS) \
10+
$(GST_BASE_CFLAGS) \
11+
$(GST_PLUGINS_BASE_CFLAGS) \
12+
$(GST_VIDEO_CFLAGS) \
13+
$(R2INFERENCE_CFLAGS) \
14+
-I$(top_srcdir)/gst-libs
15+
16+
17+
libgstinferenceoverlay_la_CXXFLAGS = \
18+
$(GST_CXXFLAGS) \
19+
$(GST_BASE_CFLAGS) \
20+
$(GST_PLUGINS_BASE_CFLAGS) \
21+
$(GST_VIDEO_CFLAGS) \
22+
$(R2INFERENCE_CFLAGS) \
23+
$(OPENCV_CFLAGS) \
24+
-std=c++11
25+
26+
27+
libgstinferenceoverlay_la_LIBADD = \
28+
$(GST_LIBS) \
29+
$(GST_BASE_LIBS) \
30+
$(GST_PLUGINS_BASE_LIBS) \
31+
$(GST_VIDEO_LIBS) \
32+
$(OPENCV_LIBS) \
33+
$(R2INFERENCE_LIBS) \
34+
$(top_builddir)/gst-libs/gst/r2inference/libgstinference-@[email protected]
35+
36+
libgstinferenceoverlay_la_LDFLAGS = \
37+
$(GST_PLUGIN_LDFLAGS)
38+
39+
libgstinferenceoverlay_la_LIBTOOLFLAGS = \
40+
$(GST_PLUGIN_LIBTOOLFLAGS)
41+
42+
noinst_HEADERS = \
43+
gstclassificationoverlay.h \
44+
gstdetectionoverlay.h

0 commit comments

Comments
 (0)