summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-04-18 10:17:52 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-04-29 19:28:19 +0200
commit1584d16b1c8d21c095d41f549fc893dd1fe01e2a (patch)
tree0fbd2f89c6177f2983daf7024bd8e05acca9cce2
parent92cedb0510be490f118f245b85fc54755f267b49 (diff)
videofilter: Move all elements into a single plugin
Having all these small elements in a separate plugin is not very memory effective...
-rw-r--r--Makefile.am5
-rw-r--r--gst/videofilter/Makefile.am44
-rw-r--r--gst/videofilter/gstgamma.c18
-rw-r--r--gst/videofilter/gstvideobalance.c14
-rw-r--r--gst/videofilter/gstvideoflip.c17
-rw-r--r--gst/videofilter/plugin.c47
6 files changed, 66 insertions, 79 deletions
diff --git a/Makefile.am b/Makefile.am
index 948593504..0f0be61ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,7 +65,10 @@ include $(top_srcdir)/common/coverage/lcov.mak
CRUFT_FILES = \
$(top_builddir)/common/shave \
- $(top_builddir)/common/shave-libtool
+ $(top_builddir)/common/shave-libtool \
+ $(top_builddir)/gst/videofilter/.libs/*videoflip.{so,dll,DLL,dylib} \
+ $(top_builddir)/gst/videofilter/.libs/*videobalance.{so,dll,DLL,dylib} \
+ $(top_builddir)/gst/videofilter/.libs/*gamma.{so,dll,DLL,dylib}
include $(top_srcdir)/common/cruft.mak
diff --git a/gst/videofilter/Makefile.am b/gst/videofilter/Makefile.am
index 409affbb2..c21b93ee6 100644
--- a/gst/videofilter/Makefile.am
+++ b/gst/videofilter/Makefile.am
@@ -1,46 +1,24 @@
-# noinst_LTLIBRARIES = libgstvideoexample.la
-plugin_LTLIBRARIES = libgstvideoflip.la libgstvideobalance.la libgstgamma.la
+plugin_LTLIBRARIES = libgstvideofilter.la
noinst_HEADERS = gstvideoflip.h gstvideobalance.h gstgamma.h
EXTRA_DIST = gstvideotemplate.c make_filter
CLEANFILES = gstvideoexample.c
-# libgstvideoexample_la_SOURCES = gstvideoexample.c
-# libgstvideoexample_la_CFLAGS = $(GST_CFLAGS)
-# libgstvideoexample_la_LIBADD = libgstvideofilter-@GST_MAJORMINOR@.la $(GST_LIBS)
-# libgstvideoexample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-# libgstvideoexample_la_LIBTOOLFLAGS = --tag=disable-static
-
-libgstvideoflip_la_SOURCES = gstvideoflip.c
-libgstvideoflip_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
- $(GST_PLUGINS_BASE_CFLAGS)
-libgstvideoflip_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ $(GST_BASE_LIBS) $(GST_LIBS)
-libgstvideoflip_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstvideoflip_la_LIBTOOLFLAGS = --tag=disable-static
-
-libgstvideobalance_la_SOURCES = gstvideobalance.c
-libgstvideobalance_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
- $(GST_PLUGINS_BASE_CFLAGS)
-libgstvideobalance_la_LIBADD = \
- $(GST_PLUGINS_BASE_LIBS) \
- -lgstvideo-@GST_MAJORMINOR@ \
- -lgstinterfaces-@GST_MAJORMINOR@ \
- $(GST_BASE_LIBS) \
- $(GST_LIBS) \
- $(LIBM)
-libgstvideobalance_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstvideobalance_la_LIBTOOLFLAGS = --tag=disable-static
-
-libgstgamma_la_SOURCES = gstgamma.c
-libgstgamma_la_CFLAGS = $(GST_CFLAGS) $(GST_CONTROLLER_CFLAGS) \
+libgstvideofilter_la_SOURCES = plugin.c \
+ gstvideoflip.c \
+ gstvideobalance.c \
+ gstgamma.c
+libgstvideofilter_la_CFLAGS = $(GST_CFLAGS) $(GST_CONTROLLER_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS)
-libgstgamma_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ \
+libgstvideofilter_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
+ -lgstvideo-@GST_MAJORMINOR@ \
+ -lgstinterfaces-@GST_MAJORMINOR@ \
$(GST_CONTROLLER_LIBS) \
$(GST_BASE_LIBS) $(GST_LIBS)
-libgstgamma_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBM)
-libgstgamma_la_LIBTOOLFLAGS = --tag=disable-static
+libgstvideofilter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(LIBM)
+libgstvideofilter_la_LIBTOOLFLAGS = --tag=disable-static
gstvideoexample.c: $(srcdir)/make_filter $(srcdir)/gstvideotemplate.c
$(srcdir)/make_filter Videoexample $(srcdir)/gstvideotemplate.c
diff --git a/gst/videofilter/gstgamma.c b/gst/videofilter/gstgamma.c
index aeab6efd6..4f30de204 100644
--- a/gst/videofilter/gstgamma.c
+++ b/gst/videofilter/gstgamma.c
@@ -131,6 +131,8 @@ gst_gamma_class_init (GstGammaClass * g_class)
GObjectClass *gobject_class = (GObjectClass *) g_class;
GstBaseTransformClass *trans_class = (GstBaseTransformClass *) g_class;
+ GST_DEBUG_CATEGORY_INIT (gamma_debug, "gamma", 0, "gamma");
+
gobject_class->set_property = gst_gamma_set_property;
gobject_class->get_property = gst_gamma_get_property;
@@ -436,19 +438,3 @@ not_negotiated:
return GST_FLOW_NOT_NEGOTIATED;
}
}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- GST_DEBUG_CATEGORY_INIT (gamma_debug, "gamma", 0, "gamma");
-
- gst_controller_init (NULL, NULL);
-
- return gst_element_register (plugin, "gamma", GST_RANK_NONE, GST_TYPE_GAMMA);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "gamma",
- "Changes gamma on video images",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c
index 9ad0a6d2c..fb78c1208 100644
--- a/gst/videofilter/gstvideobalance.c
+++ b/gst/videofilter/gstvideobalance.c
@@ -610,17 +610,3 @@ gst_video_balance_get_type (void)
}
return video_balance_type;
}
-
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return gst_element_register (plugin, "videobalance", GST_RANK_NONE,
- GST_TYPE_VIDEO_BALANCE);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "videobalance",
- "Changes hue, saturation, brightness etc. on video images",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff --git a/gst/videofilter/gstvideoflip.c b/gst/videofilter/gstvideoflip.c
index 3f018e047..74c737880 100644
--- a/gst/videofilter/gstvideoflip.c
+++ b/gst/videofilter/gstvideoflip.c
@@ -625,6 +625,8 @@ gst_video_flip_class_init (gpointer klass, gpointer class_data)
GObjectClass *gobject_class;
GstBaseTransformClass *trans_class;
+ GST_DEBUG_CATEGORY_INIT (video_flip_debug, "videoflip", 0, "videoflip");
+
gobject_class = (GObjectClass *) klass;
trans_class = (GstBaseTransformClass *) klass;
@@ -659,15 +661,6 @@ gst_video_flip_init (GTypeInstance * instance, gpointer g_class)
GST_DEBUG_FUNCPTR (gst_video_flip_handle_src_event));
}
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- GST_DEBUG_CATEGORY_INIT (video_flip_debug, "videoflip", 0, "videoflip");
-
- return gst_element_register (plugin, "videoflip", GST_RANK_NONE,
- GST_TYPE_VIDEO_FLIP);
-}
-
GType
gst_video_flip_get_type (void)
{
@@ -691,9 +684,3 @@ gst_video_flip_get_type (void)
}
return video_flip_type;
}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "videoflip",
- "Flips and rotates video",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff --git a/gst/videofilter/plugin.c b/gst/videofilter/plugin.c
new file mode 100644
index 000000000..e0fcede73
--- /dev/null
+++ b/gst/videofilter/plugin.c
@@ -0,0 +1,47 @@
+/* GStreamer
+ * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ *
+ * 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 <gst/gst.h>
+#include <gst/controller/gstcontroller.h>
+
+#include "gstgamma.h"
+#include "gstvideoflip.h"
+#include "gstvideobalance.h"
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ gst_controller_init (NULL, NULL);
+
+ return (gst_element_register (plugin, "gamma", GST_RANK_NONE, GST_TYPE_GAMMA)
+ && gst_element_register (plugin, "videobalance", GST_RANK_NONE,
+ GST_TYPE_VIDEO_BALANCE)
+ && gst_element_register (plugin, "videoflip", GST_RANK_NONE,
+ GST_TYPE_VIDEO_FLIP));
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ "videofilter",
+ "Video filters plugin",
+ plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);