diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-09-08 14:59:54 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-09-08 17:15:51 -0300 |
commit | 27fedbb3520ca4fdad230c31a249848ef50cc97f (patch) | |
tree | 5f252efbe20d03821f1e538c3a4368849d6c5e5c /ext | |
parent | cf86df2d007d65e0163cf464cf97d8fe300283db (diff) | |
download | gstreamer-plugins-bad-27fedbb3520ca4fdad230c31a249848ef50cc97f.tar.gz |
opencv: Refactor files structure
Remove internal folders and put all code inside the main plugin
folder. Also fixes some building warnings.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/opencv/Makefile.am | 64 | ||||
-rw-r--r-- | ext/opencv/basicfilters/Makefile.am | 28 | ||||
-rw-r--r-- | ext/opencv/edgedetect/Makefile.am | 15 | ||||
-rw-r--r-- | ext/opencv/faceblur/Makefile.am | 15 | ||||
-rw-r--r-- | ext/opencv/facedetect/Makefile.am | 17 | ||||
-rw-r--r-- | ext/opencv/gstcvdilate.c (renamed from ext/opencv/basicfilters/gstcvdilate.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvdilate.h (renamed from ext/opencv/basicfilters/gstcvdilate.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvdilateerode.c (renamed from ext/opencv/basicfilters/gstcvdilateerode.c) | 3 | ||||
-rw-r--r-- | ext/opencv/gstcvdilateerode.h (renamed from ext/opencv/basicfilters/gstcvdilateerode.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvequalizehist.c (renamed from ext/opencv/basicfilters/gstcvequalizehist.c) | 6 | ||||
-rw-r--r-- | ext/opencv/gstcvequalizehist.h (renamed from ext/opencv/basicfilters/gstcvequalizehist.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcverode.c (renamed from ext/opencv/basicfilters/gstcverode.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcverode.h (renamed from ext/opencv/basicfilters/gstcverode.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvlaplace.c (renamed from ext/opencv/basicfilters/gstcvlaplace.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvlaplace.h (renamed from ext/opencv/basicfilters/gstcvlaplace.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvsmooth.c (renamed from ext/opencv/basicfilters/gstcvsmooth.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvsmooth.h (renamed from ext/opencv/basicfilters/gstcvsmooth.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvsobel.c (renamed from ext/opencv/basicfilters/gstcvsobel.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstcvsobel.h (renamed from ext/opencv/basicfilters/gstcvsobel.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstedgedetect.c (renamed from ext/opencv/edgedetect/gstedgedetect.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstedgedetect.h (renamed from ext/opencv/edgedetect/gstedgedetect.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstfaceblur.c (renamed from ext/opencv/faceblur/gstfaceblur.c) | 2 | ||||
-rw-r--r-- | ext/opencv/gstfaceblur.h (renamed from ext/opencv/faceblur/gstfaceblur.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstfacedetect.c (renamed from ext/opencv/facedetect/gstfacedetect.c) | 4 | ||||
-rw-r--r-- | ext/opencv/gstfacedetect.h (renamed from ext/opencv/facedetect/gstfacedetect.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gstopencvutils.c | 2 | ||||
-rw-r--r-- | ext/opencv/gstpyramidsegment.c (renamed from ext/opencv/pyramidsegment/gstpyramidsegment.c) | 0 | ||||
-rw-r--r-- | ext/opencv/gstpyramidsegment.h (renamed from ext/opencv/pyramidsegment/gstpyramidsegment.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gsttemplatematch.c (renamed from ext/opencv/templatematch/gsttemplatematch.c) | 10 | ||||
-rw-r--r-- | ext/opencv/gsttemplatematch.h (renamed from ext/opencv/templatematch/gsttemplatematch.h) | 0 | ||||
-rw-r--r-- | ext/opencv/gsttextwrite.c (renamed from ext/opencv/textwrite/gsttextwrite.c) | 79 | ||||
-rw-r--r-- | ext/opencv/gsttextwrite.h (renamed from ext/opencv/textwrite/gsttextwrite.h) | 0 | ||||
-rw-r--r-- | ext/opencv/pyramidsegment/Makefile.am | 13 | ||||
-rw-r--r-- | ext/opencv/templatematch/Makefile.am | 15 | ||||
-rw-r--r-- | ext/opencv/textwrite/Makefile.am | 15 |
35 files changed, 85 insertions, 203 deletions
diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am index c62389b17..954db8fd8 100644 --- a/ext/opencv/Makefile.am +++ b/ext/opencv/Makefile.am @@ -1,45 +1,45 @@ -SUBDIRS = basicfilters edgedetect faceblur facedetect pyramidsegment templatematch textwrite - -# plugindir is set in configure - plugin_LTLIBRARIES = libgstopencv.la # sources used to compile this plug-in -libgstopencv_la_SOURCES = gstopencv.c gstopencvvideofilter.c gstopencvutils.c +libgstopencv_la_SOURCES = gstopencv.c \ + gstopencvvideofilter.c \ + gstopencvutils.c \ + gstcvdilate.c \ + gstcvdilateerode.c \ + gstcvequalizehist.c \ + gstcverode.c \ + gstcvlaplace.c \ + gstcvsmooth.c \ + gstcvsobel.c \ + gstedgedetect.c \ + gstfaceblur.c \ + gstfacedetect.c \ + gstpyramidsegment.c \ + gsttemplatematch.c \ + gsttextwrite.c # flags used to compile this facedetect # add other _CFLAGS and _LIBS as needed libgstopencv_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(OPENCV_CFLAGS) \ - $(GSTPB_BASE_CFLAGS) \ - -I${top_srcdir}/ext \ - -I${top_srcdir}/ext/opencv/basicfilters \ - -I${top_srcdir}/ext/opencv/edgedetect \ - -I${top_srcdir}/ext/opencv/faceblur \ - -I${top_srcdir}/ext/opencv/facedetect \ - -I${top_srcdir}/ext/opencv/pyramidsegment \ - -I${top_srcdir}/ext/opencv/templatematch \ - -I${top_srcdir}/ext/opencv/textwrite + $(GST_PLUGINS_BASE_CFLAGS) libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \ - $(GSTPB_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ - $(top_builddir)/ext/opencv/basicfilters/libgstbasicfilters.la \ - $(top_builddir)/ext/opencv/edgedetect/libgstedgedetect.la \ - $(top_builddir)/ext/opencv/faceblur/libgstfaceblur.la \ - $(top_builddir)/ext/opencv/facedetect/libgstfacedetect.la \ - $(top_builddir)/ext/opencv/pyramidsegment/libgstpyramidsegment.la \ - $(top_builddir)/ext/opencv/templatematch/libgsttemplatematch.la \ - $(top_builddir)/ext/opencv/textwrite/libgsttextwrite.la + $(GSTPB_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) libgstopencv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstopencv_la_DEPENDENCIES = \ - $(top_builddir)/ext/opencv/basicfilters/libgstbasicfilters.la \ - $(top_builddir)/ext/opencv/edgedetect/libgstedgedetect.la \ - $(top_builddir)/ext/opencv/faceblur/libgstfaceblur.la \ - $(top_builddir)/ext/opencv/facedetect/libgstfacedetect.la \ - $(top_builddir)/ext/opencv/pyramidsegment/libgstpyramidsegment.la \ - $(top_builddir)/ext/opencv/templatematch/libgsttemplatematch.la \ - $(top_builddir)/ext/opencv/textwrite/libgsttextwrite.la - # headers we need but don't want installed -noinst_HEADERS = gstopencvvideofilter.h gstopencvutils.h +noinst_HEADERS = gstopencvvideofilter.h gstopencvutils.h \ + gstcvdilateerode.h \ + gstcvdilate.h \ + gstcvequalizehist.h \ + gstcverode.h \ + gstcvlaplace.h \ + gstcvsmooth.h \ + gstcvsobel.h \ + gstedgedetect.h \ + gstfaceblur.h \ + gstfacedetect.h \ + gstpyramidsegment.h \ + gsttemplatematch.h \ + gsttextwrite.h diff --git a/ext/opencv/basicfilters/Makefile.am b/ext/opencv/basicfilters/Makefile.am deleted file mode 100644 index 52a0ba9a7..000000000 --- a/ext/opencv/basicfilters/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -noinst_LTLIBRARIES = libgstbasicfilters.la - -# sources used to compile this plug-in -libgstbasicfilters_la_SOURCES = gstcvsmooth.c \ - gstcvdilateerode.c \ - gstcvdilate.c \ - gstcvequalizehist.c \ - gstcvlaplace.c \ - gstcverode.c \ - gstcvsobel.c - -# flags used to compile this pyramidsegment -# add other _CFLAGS and _LIBS as needed -libgstbasicfilters_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) -I.. \ - $(GST_BASE_CFLAGS) $(GSTPB_BASE_CFLAGS) -libgstbasicfilters_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) \ - $(GST_BASE_LIBS) $(GSTPB_BASE_LIBS) \ - -lgstvideo-$(GST_MAJORMINOR) -libgstbasicfilters_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gstcvsmooth.h \ - gstcvdilateerode.h \ - gstcvdilate.h \ - gstcvequalizehist.h \ - gstcverode.h \ - gstcvlaplace.h \ - gstcvsobel.h diff --git a/ext/opencv/edgedetect/Makefile.am b/ext/opencv/edgedetect/Makefile.am deleted file mode 100644 index 63875028c..000000000 --- a/ext/opencv/edgedetect/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# plugindir is set in configure - -noinst_LTLIBRARIES = libgstedgedetect.la - -# sources used to compile this plug-in -libgstedgedetect_la_SOURCES = gstedgedetect.c - -# flags used to compile this edgedetect -# add other _CFLAGS and _LIBS as needed -libgstedgedetect_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) -libgstedgedetect_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) -libgstedgedetect_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gstedgedetect.h diff --git a/ext/opencv/faceblur/Makefile.am b/ext/opencv/faceblur/Makefile.am deleted file mode 100644 index d9c7a2f31..000000000 --- a/ext/opencv/faceblur/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# plugindir is set in configure - -noinst_LTLIBRARIES = libgstfaceblur.la - -# sources used to compile this plug-in -libgstfaceblur_la_SOURCES = gstfaceblur.c - -# flags used to compile this faceblur -# add other _CFLAGS and _LIBS as needed -libgstfaceblur_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) -libgstfaceblur_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) -libgstfaceblur_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gstfaceblur.h diff --git a/ext/opencv/facedetect/Makefile.am b/ext/opencv/facedetect/Makefile.am deleted file mode 100644 index 24a77a4c9..000000000 --- a/ext/opencv/facedetect/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# plugindir is set in configure - -noinst_LTLIBRARIES = libgstfacedetect.la - -# sources used to compile this plug-in -libgstfacedetect_la_SOURCES = gstfacedetect.c - -# flags used to compile this facedetect -# add other _CFLAGS and _LIBS as needed -libgstfacedetect_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) \ - $(GSTPB_BASE_CFLAGS) -I.. -libgstfacedetect_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) $(GSTPB_BASE_LIBS) \ - -lgstvideo-$(GST_MAJORMINOR) -libgstfacedetect_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gstfacedetect.h diff --git a/ext/opencv/basicfilters/gstcvdilate.c b/ext/opencv/gstcvdilate.c index e03627b64..e03627b64 100644 --- a/ext/opencv/basicfilters/gstcvdilate.c +++ b/ext/opencv/gstcvdilate.c diff --git a/ext/opencv/basicfilters/gstcvdilate.h b/ext/opencv/gstcvdilate.h index c0a3b007e..c0a3b007e 100644 --- a/ext/opencv/basicfilters/gstcvdilate.h +++ b/ext/opencv/gstcvdilate.h diff --git a/ext/opencv/basicfilters/gstcvdilateerode.c b/ext/opencv/gstcvdilateerode.c index 2275d2ab6..c304a4ffa 100644 --- a/ext/opencv/basicfilters/gstcvdilateerode.c +++ b/ext/opencv/gstcvdilateerode.c @@ -119,8 +119,7 @@ gst_cv_dilate_erode_get_type (void) }; _type = g_type_register_static (GST_TYPE_OPENCV_VIDEO_FILTER, - "GstCvDilateErode", &opencv_dilate_erode_info, - G_TYPE_FLAG_ABSTRACT); + "GstCvDilateErode", &opencv_dilate_erode_info, G_TYPE_FLAG_ABSTRACT); /* GST_DEBUG_CATEGORY_INIT (gst_cv_dilate_erode_debug, "cvdilateerode", 0, "cvdilateerode"); diff --git a/ext/opencv/basicfilters/gstcvdilateerode.h b/ext/opencv/gstcvdilateerode.h index 26190b535..26190b535 100644 --- a/ext/opencv/basicfilters/gstcvdilateerode.h +++ b/ext/opencv/gstcvdilateerode.h diff --git a/ext/opencv/basicfilters/gstcvequalizehist.c b/ext/opencv/gstcvequalizehist.c index 553734aa8..9e2b0306e 100644 --- a/ext/opencv/basicfilters/gstcvequalizehist.c +++ b/ext/opencv/gstcvequalizehist.c @@ -65,9 +65,9 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_BOILERPLATE (GstCvEqualizeHist, gst_cv_equalize_hist, GstOpencvVideoFilter, GST_TYPE_OPENCV_VIDEO_FILTER); -static GstFlowReturn gst_cv_equalize_hist_transform ( - GstOpencvVideoFilter * filter, GstBuffer * buf, IplImage * img, - GstBuffer * outbuf, IplImage * outimg); +static GstFlowReturn gst_cv_equalize_hist_transform (GstOpencvVideoFilter * + filter, GstBuffer * buf, IplImage * img, GstBuffer * outbuf, + IplImage * outimg); /* Clean up */ static void diff --git a/ext/opencv/basicfilters/gstcvequalizehist.h b/ext/opencv/gstcvequalizehist.h index 74a3aab3f..74a3aab3f 100644 --- a/ext/opencv/basicfilters/gstcvequalizehist.h +++ b/ext/opencv/gstcvequalizehist.h diff --git a/ext/opencv/basicfilters/gstcverode.c b/ext/opencv/gstcverode.c index 2a0cb36af..2a0cb36af 100644 --- a/ext/opencv/basicfilters/gstcverode.c +++ b/ext/opencv/gstcverode.c diff --git a/ext/opencv/basicfilters/gstcverode.h b/ext/opencv/gstcverode.h index 0c5055edb..0c5055edb 100644 --- a/ext/opencv/basicfilters/gstcverode.h +++ b/ext/opencv/gstcverode.h diff --git a/ext/opencv/basicfilters/gstcvlaplace.c b/ext/opencv/gstcvlaplace.c index f52842871..f52842871 100644 --- a/ext/opencv/basicfilters/gstcvlaplace.c +++ b/ext/opencv/gstcvlaplace.c diff --git a/ext/opencv/basicfilters/gstcvlaplace.h b/ext/opencv/gstcvlaplace.h index 4fcc104ef..4fcc104ef 100644 --- a/ext/opencv/basicfilters/gstcvlaplace.h +++ b/ext/opencv/gstcvlaplace.h diff --git a/ext/opencv/basicfilters/gstcvsmooth.c b/ext/opencv/gstcvsmooth.c index 46d880dc6..46d880dc6 100644 --- a/ext/opencv/basicfilters/gstcvsmooth.c +++ b/ext/opencv/gstcvsmooth.c diff --git a/ext/opencv/basicfilters/gstcvsmooth.h b/ext/opencv/gstcvsmooth.h index b8608eea0..b8608eea0 100644 --- a/ext/opencv/basicfilters/gstcvsmooth.h +++ b/ext/opencv/gstcvsmooth.h diff --git a/ext/opencv/basicfilters/gstcvsobel.c b/ext/opencv/gstcvsobel.c index eaeeeb804..eaeeeb804 100644 --- a/ext/opencv/basicfilters/gstcvsobel.c +++ b/ext/opencv/gstcvsobel.c diff --git a/ext/opencv/basicfilters/gstcvsobel.h b/ext/opencv/gstcvsobel.h index 65fe65a81..65fe65a81 100644 --- a/ext/opencv/basicfilters/gstcvsobel.h +++ b/ext/opencv/gstcvsobel.h diff --git a/ext/opencv/edgedetect/gstedgedetect.c b/ext/opencv/gstedgedetect.c index 77e1d62b0..77e1d62b0 100644 --- a/ext/opencv/edgedetect/gstedgedetect.c +++ b/ext/opencv/gstedgedetect.c diff --git a/ext/opencv/edgedetect/gstedgedetect.h b/ext/opencv/gstedgedetect.h index eaaa3c0fa..eaaa3c0fa 100644 --- a/ext/opencv/edgedetect/gstedgedetect.h +++ b/ext/opencv/gstedgedetect.h diff --git a/ext/opencv/faceblur/gstfaceblur.c b/ext/opencv/gstfaceblur.c index bceb068cb..59af2810d 100644 --- a/ext/opencv/faceblur/gstfaceblur.c +++ b/ext/opencv/gstfaceblur.c @@ -118,7 +118,7 @@ gst_faceblur_finalize (GObject * obj) cvReleaseImage (&filter->cvImage); cvReleaseImage (&filter->cvGray); } - + g_free (filter->profile); G_OBJECT_CLASS (parent_class)->finalize (obj); diff --git a/ext/opencv/faceblur/gstfaceblur.h b/ext/opencv/gstfaceblur.h index 34ea09a0a..34ea09a0a 100644 --- a/ext/opencv/faceblur/gstfaceblur.h +++ b/ext/opencv/gstfaceblur.h diff --git a/ext/opencv/facedetect/gstfacedetect.c b/ext/opencv/gstfacedetect.c index 8c804832e..b1503ca15 100644 --- a/ext/opencv/facedetect/gstfacedetect.c +++ b/ext/opencv/gstfacedetect.c @@ -106,7 +106,7 @@ static void gst_facedetect_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static gboolean gst_facedetect_set_caps (GstOpencvVideoFilter * transform, - gint in_width, gint in_height, gint in_depth, gint in_channels, + gint in_width, gint in_height, gint in_depth, gint in_channels, gint out_width, gint out_height, gint out_depth, gint out_channels); static GstFlowReturn gst_facedetect_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf, IplImage * img); @@ -188,7 +188,7 @@ gst_facedetect_class_init (GstfacedetectClass * klass) static void gst_facedetect_init (Gstfacedetect * filter, GstfacedetectClass * gclass) { - filter->profile = g_strdup(DEFAULT_PROFILE); + filter->profile = g_strdup (DEFAULT_PROFILE); filter->display = TRUE; gst_facedetect_load_profile (filter); diff --git a/ext/opencv/facedetect/gstfacedetect.h b/ext/opencv/gstfacedetect.h index d2c057ebe..d2c057ebe 100644 --- a/ext/opencv/facedetect/gstfacedetect.h +++ b/ext/opencv/gstfacedetect.h diff --git a/ext/opencv/gstopencvutils.c b/ext/opencv/gstopencvutils.c index 284814138..0dbdde3f3 100644 --- a/ext/opencv/gstopencvutils.c +++ b/ext/opencv/gstopencvutils.c @@ -21,7 +21,7 @@ #include "gstopencvutils.h" -gboolean +static gboolean gst_opencv_get_ipl_depth_and_channels (GstStructure * structure, gint * ipldepth, gint * channels, GError ** err) { diff --git a/ext/opencv/pyramidsegment/gstpyramidsegment.c b/ext/opencv/gstpyramidsegment.c index f6a4793ef..f6a4793ef 100644 --- a/ext/opencv/pyramidsegment/gstpyramidsegment.c +++ b/ext/opencv/gstpyramidsegment.c diff --git a/ext/opencv/pyramidsegment/gstpyramidsegment.h b/ext/opencv/gstpyramidsegment.h index 343707318..343707318 100644 --- a/ext/opencv/pyramidsegment/gstpyramidsegment.h +++ b/ext/opencv/gstpyramidsegment.h diff --git a/ext/opencv/templatematch/gsttemplatematch.c b/ext/opencv/gsttemplatematch.c index 3821020b1..353bb0664 100644 --- a/ext/opencv/templatematch/gsttemplatematch.c +++ b/ext/opencv/gsttemplatematch.c @@ -329,18 +329,20 @@ gst_templatematch_chain (GstPad * pad, GstBuffer * buf) } } if (filter->cvTemplateImage) { + GstStructure *s; + GstMessage *m; + gst_templatematch_match (filter->cvImage, filter->cvTemplateImage, filter->cvDistImage, &best_res, &best_pos, filter->method); - GstStructure *s = gst_structure_new ("template_match", + s = gst_structure_new ("template_match", "x", G_TYPE_UINT, best_pos.x, "y", G_TYPE_UINT, best_pos.y, "width", G_TYPE_UINT, filter->cvTemplateImage->width, "height", G_TYPE_UINT, filter->cvTemplateImage->height, - "result", G_TYPE_DOUBLE, best_res, - NULL); + "result", G_TYPE_DOUBLE, best_res, NULL); - GstMessage *m = gst_message_new_element (GST_OBJECT (filter), s); + m = gst_message_new_element (GST_OBJECT (filter), s); gst_element_post_message (GST_ELEMENT (filter), m); if (filter->display) { diff --git a/ext/opencv/templatematch/gsttemplatematch.h b/ext/opencv/gsttemplatematch.h index b18e0c7de..b18e0c7de 100644 --- a/ext/opencv/templatematch/gsttemplatematch.h +++ b/ext/opencv/gsttemplatematch.h diff --git a/ext/opencv/textwrite/gsttextwrite.c b/ext/opencv/gsttextwrite.c index 287de3f43..947c723f8 100644 --- a/ext/opencv/textwrite/gsttextwrite.c +++ b/ext/opencv/gsttextwrite.c @@ -113,7 +113,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS ("ANY") ); -GST_BOILERPLATE (Gsttextwrite, gst_textwrite, GstElement,GST_TYPE_ELEMENT); +GST_BOILERPLATE (Gsttextwrite, gst_textwrite, GstElement, GST_TYPE_ELEMENT); static void gst_textwrite_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -147,11 +147,10 @@ gst_textwrite_base_init (gpointer gclass) { GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); - gst_element_class_set_details_simple(element_class, - "textwrite", - "Filter/Effect/Video", - "Performs text writing to the video", - "sreerenj<bsreerenj@gmail.com>"); + gst_element_class_set_details_simple (element_class, + "textwrite", + "Filter/Effect/Video", + "Performs text writing to the video", "sreerenj<bsreerenj@gmail.com>"); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_factory)); @@ -176,12 +175,12 @@ gst_textwrite_class_init (GsttextwriteClass * klass) gobject_class->get_property = gst_textwrite_get_property; - g_object_class_install_property (gobject_class, PROP_TEXT, + g_object_class_install_property (gobject_class, PROP_TEXT, g_param_spec_string ("text", "text", "Text to be display.", DEFAULT_PROP_TEXT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_XPOS, + g_object_class_install_property (gobject_class, PROP_XPOS, g_param_spec_int ("xpos", "horizontal position", "Sets the Horizontal position", 0, G_MAXINT, DEFAULT_PROP_XPOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -191,22 +190,22 @@ gst_textwrite_class_init (GsttextwriteClass * klass) "Sets the Vertical position", 0, G_MAXINT, DEFAULT_PROP_YPOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_THICKNESS, + g_object_class_install_property (gobject_class, PROP_THICKNESS, g_param_spec_int ("thickness", "font thickness", "Sets the Thickness of Font", 0, G_MAXINT, DEFAULT_PROP_THICKNESS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_COLOR_R, + g_object_class_install_property (gobject_class, PROP_COLOR_R, g_param_spec_int ("colorR", "color -Red ", "Sets the color -R", 0, 255, DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_COLOR_G, + g_object_class_install_property (gobject_class, PROP_COLOR_G, g_param_spec_int ("colorG", "color -Green", "Sets the color -G", 0, 255, DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_COLOR_B, + g_object_class_install_property (gobject_class, PROP_COLOR_B, g_param_spec_int ("colorB", "color -Blue", "Sets the color -B", 0, 255, DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -215,14 +214,14 @@ gst_textwrite_class_init (GsttextwriteClass * klass) g_object_class_install_property (gobject_class, PROP_HEIGHT, g_param_spec_double ("height", "Height", - "Sets the height of fonts",1.0,5.0, - DEFAULT_HEIGHT, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS)); + "Sets the height of fonts", 1.0, 5.0, + DEFAULT_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_WIDTH, g_param_spec_double ("width", "Width", - "Sets the width of fonts",1.0,5.0, - DEFAULT_WIDTH, G_PARAM_READWRITE| G_PARAM_STATIC_STRINGS)); - + "Sets the width of fonts", 1.0, 5.0, + DEFAULT_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + } /* initialize the new element @@ -231,24 +230,23 @@ gst_textwrite_class_init (GsttextwriteClass * klass) * initialize instance structure */ static void -gst_textwrite_init (Gsttextwrite * filter, - GsttextwriteClass * gclass) +gst_textwrite_init (Gsttextwrite * filter, GsttextwriteClass * gclass) { filter->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); gst_pad_set_setcaps_function (filter->sinkpad, - GST_DEBUG_FUNCPTR(gst_textwrite_set_caps)); + GST_DEBUG_FUNCPTR (gst_textwrite_set_caps)); gst_pad_set_getcaps_function (filter->sinkpad, - GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps)); + GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_chain_function (filter->sinkpad, - GST_DEBUG_FUNCPTR(gst_textwrite_chain)); + GST_DEBUG_FUNCPTR (gst_textwrite_chain)); filter->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); gst_pad_set_getcaps_function (filter->srcpad, - GST_DEBUG_FUNCPTR(gst_pad_proxy_getcaps)); + GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); - filter->textbuf = g_strdup (DEFAULT_PROP_TEXT); + filter->textbuf = g_strdup (DEFAULT_PROP_TEXT); filter->width = DEFAULT_PROP_WIDTH; filter->height = DEFAULT_PROP_HEIGHT; filter->xpos = DEFAULT_PROP_XPOS; @@ -272,30 +270,30 @@ gst_textwrite_set_property (GObject * object, guint prop_id, filter->textbuf = g_value_dup_string (value); break; case PROP_XPOS: - filter->xpos = g_value_get_int(value); + filter->xpos = g_value_get_int (value); break; case PROP_YPOS: - filter->ypos = g_value_get_int(value); + filter->ypos = g_value_get_int (value); break; case PROP_THICKNESS: - filter->thickness = g_value_get_int(value); + filter->thickness = g_value_get_int (value); break; case PROP_COLOR_R: - filter->colorR = g_value_get_int(value); + filter->colorR = g_value_get_int (value); break; case PROP_COLOR_G: - filter->colorG = g_value_get_int(value); + filter->colorG = g_value_get_int (value); break; case PROP_COLOR_B: - filter->colorB = g_value_get_int(value); + filter->colorB = g_value_get_int (value); break; case PROP_HEIGHT: - filter->height = g_value_get_double(value); + filter->height = g_value_get_double (value); break; case PROP_WIDTH: - filter->width = g_value_get_double(value); + filter->width = g_value_get_double (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -351,12 +349,12 @@ gst_textwrite_set_caps (GstPad * pad, GstCaps * caps) { Gsttextwrite *filter; GstPad *otherpad; - + gint width, height; GstStructure *structure; filter = GST_textwrite (gst_pad_get_parent (pad)); - + structure = gst_caps_get_structure (caps, 0); gst_structure_get_int (structure, "width", &width); gst_structure_get_int (structure, "height", &height); @@ -381,11 +379,14 @@ gst_textwrite_chain (GstPad * pad, GstBuffer * buf) filter = GST_textwrite (GST_OBJECT_PARENT (pad)); filter->cvImage->imageData = (char *) GST_BUFFER_DATA (buf); - - cvInitFont(&(filter->font),CV_FONT_VECTOR0, filter->width,filter->height,0,filter->thickness,0); - + + cvInitFont (&(filter->font), CV_FONT_VECTOR0, filter->width, filter->height, + 0, filter->thickness, 0); + buf = gst_buffer_make_writable (buf); - cvPutText (filter->cvImage,filter->textbuf,cvPoint(filter->xpos,filter->ypos), &(filter->font), cvScalar(filter->colorR,filter->colorG,filter->colorB,0)); + cvPutText (filter->cvImage, filter->textbuf, cvPoint (filter->xpos, + filter->ypos), &(filter->font), cvScalar (filter->colorR, + filter->colorG, filter->colorB, 0)); return gst_pad_push (filter->srcpad, buf); } @@ -408,5 +409,3 @@ gst_textwrite_plugin_init (GstPlugin * plugin) return gst_element_register (plugin, "textwrite", GST_RANK_NONE, GST_TYPE_textwrite); } - - diff --git a/ext/opencv/textwrite/gsttextwrite.h b/ext/opencv/gsttextwrite.h index 442519a61..442519a61 100644 --- a/ext/opencv/textwrite/gsttextwrite.h +++ b/ext/opencv/gsttextwrite.h diff --git a/ext/opencv/pyramidsegment/Makefile.am b/ext/opencv/pyramidsegment/Makefile.am deleted file mode 100644 index 7c4a69158..000000000 --- a/ext/opencv/pyramidsegment/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -noinst_LTLIBRARIES = libgstpyramidsegment.la - -# sources used to compile this plug-in -libgstpyramidsegment_la_SOURCES = gstpyramidsegment.c - -# flags used to compile this pyramidsegment -# add other _CFLAGS and _LIBS as needed -libgstpyramidsegment_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) -libgstpyramidsegment_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) -libgstpyramidsegment_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gstpyramidsegment.h diff --git a/ext/opencv/templatematch/Makefile.am b/ext/opencv/templatematch/Makefile.am deleted file mode 100644 index af807038b..000000000 --- a/ext/opencv/templatematch/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# plugindir is set in configure - -noinst_LTLIBRARIES = libgsttemplatematch.la - -# sources used to compile this plug-in -libgsttemplatematch_la_SOURCES = gsttemplatematch.c - -# flags used to compile this templatematch -# add other _CFLAGS and _LIBS as needed -libgsttemplatematch_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) -libgsttemplatematch_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) -libgsttemplatematch_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gsttemplatematch.h diff --git a/ext/opencv/textwrite/Makefile.am b/ext/opencv/textwrite/Makefile.am deleted file mode 100644 index 677224ca6..000000000 --- a/ext/opencv/textwrite/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# plugindir is set in configure - -noinst_LTLIBRARIES = libgsttextwrite.la - -# sources used to compile this plug-in -libgsttextwrite_la_SOURCES = gsttextwrite.c - -# flags used to compile this textwrite -# add other _CFLAGS and _LIBS as needed -libgsttextwrite_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) -libgsttextwrite_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) -libgsttextwrite_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) - -# headers we need but don't want installed -noinst_HEADERS = gsttextwrite.h |