SUBDIRS = edgedetect facedetect pyramidsegment
+
+# plugindir is set in configure
+
+plugin_LTLIBRARIES = libgstopencv.la
+
+# sources used to compile this plug-in
+libgstopencv_la_SOURCES = gstopencv.c
+
+# flags used to compile this facedetect
+# add other _CFLAGS and _LIBS as needed
+libgstopencv_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS) \
+ -I${top_srcdir}/ext/opencv/edgedetect \
+ -I${top_srcdir}/ext/opencv/facedetect \
+ -I${top_srcdir}/ext/opencv/pyramidsegment
+
+libgstopencv_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) \
+ $(top_builddir)/ext/opencv/edgedetect/libgstedgedetect.la \
+ $(top_builddir)/ext/opencv/facedetect/libgstfacedetect.la \
+ $(top_builddir)/ext/opencv/pyramidsegment/libgstpyramidsegment.la
+
+libgstopencv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+
+libgstopencv_la_DEPENDENCIES = \
+ $(top_builddir)/ext/opencv/edgedetect/libgstedgedetect.la \
+ $(top_builddir)/ext/opencv/facedetect/libgstfacedetect.la \
+ $(top_builddir)/ext/opencv/pyramidsegment/libgstpyramidsegment.la
+
+# headers we need but don't want installed
+noinst_HEADERS =
# plugindir is set in configure
-plugin_LTLIBRARIES = libgstedgedetect.la
+noinst_LTLIBRARIES = libgstedgedetect.la
# sources used to compile this plug-in
libgstedgedetect_la_SOURCES = gstedgedetect.c
* initialize the plug-in itself
* register the element factories and other features
*/
-static gboolean
-edgedetect_init (GstPlugin * edgedetect)
+gboolean
+gst_edgedetect_plugin_init (GstPlugin * plugin)
{
/* debug category for fltering log messages
*
GST_DEBUG_CATEGORY_INIT (gst_edgedetect_debug, "edgedetect",
0, "Performs canny edge detection on videos and images");
- return gst_element_register (edgedetect, "edgedetect", GST_RANK_NONE,
+ return gst_element_register (plugin, "edgedetect", GST_RANK_NONE,
GST_TYPE_EDGEDETECT);
}
-
-/* gstreamer looks for this structure to register edgedetects
- *
- * exchange the string 'Template edgedetect' with your edgedetect description
- */
-GST_PLUGIN_DEFINE (
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "edgedetect",
- "Performs canny edge detection on videos and images",
- edgedetect_init,
- VERSION,
- "LGPL",
- "GStreamer OpenCV Plugins",
- "http://www.mikeasoft.com/"
-)
GType gst_edgedetect_get_type (void);
+gboolean gst_edgedetect_plugin_init (GstPlugin * plugin);
+
G_END_DECLS
#endif /* __GST_EDGEDETECT_H__ */
# plugindir is set in configure
-plugin_LTLIBRARIES = libgstfacedetect.la
+noinst_LTLIBRARIES = libgstfacedetect.la
# sources used to compile this plug-in
libgstfacedetect_la_SOURCES = gstfacedetect.c
* initialize the plug-in itself
* register the element factories and other features
*/
-static gboolean
-facedetect_init (GstPlugin * facedetect)
+gboolean
+gst_facedetect_plugin_init (GstPlugin * plugin)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_facedetect_debug, "facedetect",
0, "Performs face detection on videos and images, providing detected positions via bus messages");
- return gst_element_register (facedetect, "facedetect", GST_RANK_NONE,
+ return gst_element_register (plugin, "facedetect", GST_RANK_NONE,
GST_TYPE_FACEDETECT);
}
-
-
-/* gstreamer looks for this structure to register facedetect */
-GST_PLUGIN_DEFINE (
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "facedetect",
- "Performs face detection on videos and images, providing detected positions via bus messages",
- facedetect_init,
- VERSION,
- "LGPL",
- "GStreamer OpenCV Plugins",
- "http://www.mikeasoft.com/"
-)
GType gst_facedetect_get_type (void);
+gboolean gst_facedetect_plugin_init (GstPlugin * plugin);
+
G_END_DECLS
#endif /* __GST_FACEDETECT_H__ */
--- /dev/null
+/* GStreamer
+ * Copyright (C) <2009> Kapil Agrawal <kapil@mediamagictechnologies.com>
+ *
+ * gstopencv.c: plugin registering
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "gstedgedetect.h"
+#include "gstfacedetect.h"
+#include "gstpyramidsegment.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+
+ if (!gst_edgedetect_plugin_init (plugin))
+ return FALSE;
+
+ if (!gst_facedetect_plugin_init (plugin))
+ return FALSE;
+
+ if (!gst_pyramidsegment_plugin_init (plugin))
+ return FALSE;
+
+ return TRUE;
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ "opencv",
+ "GStreamer OpenCV Plugins",
+ plugin_init, VERSION, "LGPL", "OpenCv", "http://opencv.willowgarage.com")
-# plugindir is set in configure
-
-plugin_LTLIBRARIES = libgstpyramidsegment.la
+noinst_LTLIBRARIES = libgstpyramidsegment.la
# sources used to compile this plug-in
libgstpyramidsegment_la_SOURCES = gstpyramidsegment.c
* initialize the plug-in itself
* register the element factories and other features
*/
-static gboolean
-pyramidsegment_init (GstPlugin * pyramidsegment)
+gboolean
+gst_pyramidsegment_plugin_init (GstPlugin * plugin)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_pyramidsegment_debug, "pyramidsegment",
0, "Applies pyramid segmentation to a video or image");
- return gst_element_register (pyramidsegment, "pyramidsegment", GST_RANK_NONE,
+ return gst_element_register (plugin, "pyramidsegment", GST_RANK_NONE,
GST_TYPE_PYRAMIDSEGMENT);
}
-
-/* gstreamer looks for this structure to register pyramidsegment */
-GST_PLUGIN_DEFINE (
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "pyramidsegment",
- "Applies pyramid segmentation to a video or image",
- pyramidsegment_init,
- VERSION,
- "LGPL",
- "GStreamer OpenCV Plugins",
- "http://www.mikeasoft.com"
-)
GType gst_pyramidsegment_get_type (void);
+gboolean gst_pyramidsegment_plugin_init (GstPlugin * plugin);
+
G_END_DECLS
#endif /* __GST_PYRAMIDSEGMENT_H__ */