summaryrefslogtreecommitdiffstats
path: root/gst/effectv
diff options
context:
space:
mode:
Diffstat (limited to 'gst/effectv')
-rw-r--r--gst/effectv/gstaging.c27
-rw-r--r--gst/effectv/gstdice.c24
-rw-r--r--gst/effectv/gstedge.c26
-rw-r--r--gst/effectv/gsteffectv.c56
-rw-r--r--gst/effectv/gsteffectv.h15
-rw-r--r--gst/effectv/gstquark.c26
-rw-r--r--gst/effectv/gstrev.c25
-rw-r--r--gst/effectv/gstshagadelic.c24
-rw-r--r--gst/effectv/gstvertigo.c24
-rw-r--r--gst/effectv/gstwarp.c25
10 files changed, 164 insertions, 108 deletions
diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c
index 003014b7..c2e90ee2 100644
--- a/gst/effectv/gstaging.c
+++ b/gst/effectv/gstaging.c
@@ -25,6 +25,7 @@
#include "config.h"
#endif
#include <string.h>
+
#include "gsteffectv.h"
#define GST_TYPE_AGINGTV \
@@ -78,15 +79,12 @@ struct _GstAgingTVClass
};
/* elementfactory information */
-GstElementDetails gst_agingtv_details = {
+static GstElementDetails gst_agingtv_details = GST_ELEMENT_DETAILS (
"AgingTV",
"Filter/Video/Effect",
- "LGPL",
- "Aply aging effect on video",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001 FUKUCHI Kentarou",
-};
+ "Apply aging effect on video",
+ "Wim Taymans <wim.taymans@chello.be>"
+);
/* Filter signals and args */
@@ -101,6 +99,7 @@ enum
ARG_0,
};
+static void gst_agingtv_base_init (gpointer g_class);
static void gst_agingtv_class_init (GstAgingTVClass * klass);
static void gst_agingtv_init (GstAgingTV * filter);
@@ -122,7 +121,8 @@ GType gst_agingtv_get_type (void)
if (!agingtv_type) {
static const GTypeInfo agingtv_info = {
- sizeof (GstAgingTVClass), NULL,
+ sizeof (GstAgingTVClass),
+ gst_agingtv_base_init,
NULL,
(GClassInitFunc) gst_agingtv_class_init,
NULL,
@@ -138,6 +138,17 @@ GType gst_agingtv_get_type (void)
}
static void
+gst_agingtv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_agingtv_details);
+}
+
+static void
gst_agingtv_class_init (GstAgingTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c
index 2856ecbe..d2211b84 100644
--- a/gst/effectv/gstdice.c
+++ b/gst/effectv/gstdice.c
@@ -66,15 +66,12 @@ struct _GstDiceTVClass
};
/* elementfactory information */
-GstElementDetails gst_dicetv_details = {
+static GstElementDetails gst_dicetv_details = GST_ELEMENT_DETAILS (
"DiceTV",
"Filter/Video/Effect",
- "LGPL",
"'Dices' the screen up into many small squares",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(c) 2001 Sam Mertens",
-};
+ "Wim Taymans <wim.taymans@chello.be>"
+);
/* Filter signals and args */
@@ -91,6 +88,7 @@ enum
ARG_CUBE_BITS,
};
+static void gst_dicetv_base_init (gpointer g_class);
static void gst_dicetv_class_init (GstDiceTVClass * klass);
static void gst_dicetv_init (GstDiceTV * filter);
@@ -113,7 +111,8 @@ GType gst_dicetv_get_type (void)
if (!dicetv_type) {
static const GTypeInfo dicetv_info = {
- sizeof (GstDiceTVClass), NULL,
+ sizeof (GstDiceTVClass),
+ gst_dicetv_base_init,
NULL,
(GClassInitFunc) gst_dicetv_class_init,
NULL,
@@ -129,6 +128,17 @@ GType gst_dicetv_get_type (void)
}
static void
+gst_dicetv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_dicetv_details);
+}
+
+static void
gst_dicetv_class_init (GstDiceTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c
index 69f8c153..f22fe48e 100644
--- a/gst/effectv/gstedge.c
+++ b/gst/effectv/gstedge.c
@@ -60,15 +60,12 @@ struct _GstEdgeTVClass
};
/* elementfactory information */
-GstElementDetails gst_edgetv_details = {
+static GstElementDetails gst_edgetv_details = GST_ELEMENT_DETAILS (
"EdgeTV",
"Filter/Video/Effect",
- "LGPL",
- "Aply edge detect on video",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001 FUKUCHI Kentarou",
-};
+ "Apply edge detect on video",
+ "Wim Taymans <wim.taymans@chello.be>"
+);
/* Filter signals and args */
@@ -83,6 +80,7 @@ enum
ARG_0,
};
+static void gst_edgetv_base_init (gpointer g_class);
static void gst_edgetv_class_init (GstEdgeTVClass * klass);
static void gst_edgetv_init (GstEdgeTV * filter);
@@ -102,7 +100,8 @@ GType gst_edgetv_get_type (void)
if (!edgetv_type) {
static const GTypeInfo edgetv_info = {
- sizeof (GstEdgeTVClass), NULL,
+ sizeof (GstEdgeTVClass),
+ gst_edgetv_base_init,
NULL,
(GClassInitFunc) gst_edgetv_class_init,
NULL,
@@ -118,6 +117,17 @@ GType gst_edgetv_get_type (void)
}
static void
+gst_edgetv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_edgetv_details);
+}
+
+static void
gst_edgetv_class_init (GstEdgeTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gsteffectv.c b/gst/effectv/gsteffectv.c
index 50979086..28fac81c 100644
--- a/gst/effectv/gsteffectv.c
+++ b/gst/effectv/gsteffectv.c
@@ -21,6 +21,10 @@
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <gst/gst.h>
#include <gst/video/video.h>
@@ -30,19 +34,17 @@
struct _elements_entry {
gchar *name;
GType (*type) (void);
- GstElementDetails *details;
- gboolean (*factoryinit) (GstElementFactory *factory);
};
static struct _elements_entry _elements[] = {
- { "edgeTV", gst_edgetv_get_type, &gst_edgetv_details, NULL },
- { "agingTV", gst_agingtv_get_type, &gst_agingtv_details, NULL },
- { "diceTV", gst_dicetv_get_type, &gst_dicetv_details, NULL },
- { "warpTV", gst_warptv_get_type, &gst_warptv_details, NULL },
- { "shagadelicTV", gst_shagadelictv_get_type, &gst_shagadelictv_details, NULL },
- { "vertigoTV", gst_vertigotv_get_type, &gst_vertigotv_details, NULL },
- { "revTV", gst_revtv_get_type, &gst_revtv_details, NULL },
- { "quarkTV", gst_quarktv_get_type, &gst_quarktv_details, NULL },
+ { "edgeTV", gst_edgetv_get_type },
+ { "agingTV", gst_agingtv_get_type },
+ { "diceTV", gst_dicetv_get_type },
+ { "warpTV", gst_warptv_get_type },
+ { "shagadelicTV", gst_shagadelictv_get_type },
+ { "vertigoTV", gst_vertigotv_get_type },
+ { "revTV", gst_revtv_get_type },
+ { "quarkTV", gst_quarktv_get_type },
{ NULL, 0 },
};
@@ -86,37 +88,29 @@ gst_effectv_sink_factory (void)
}
static gboolean
-plugin_init (GModule * module, GstPlugin * plugin)
+plugin_init (GstPlugin * plugin)
{
- GstElementFactory *factory;
gint i = 0;
while (_elements[i].name) {
- factory = gst_element_factory_new (_elements[i].name,
- (_elements[i].type) (),
- _elements[i].details);
-
- if (!factory) {
- g_warning ("gst_effecttv_new failed for `%s'",
- _elements[i].name);
- continue;
- }
- gst_element_factory_add_pad_template (factory, gst_effectv_src_factory ());
- gst_element_factory_add_pad_template (factory, gst_effectv_sink_factory ());
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
- if (_elements[i].factoryinit) {
- _elements[i].factoryinit (factory);
- }
+ if (!gst_element_register (plugin, _elements[i].name,
+ GST_RANK_NONE, (_elements[i].type) ()))
+ return FALSE;
i++;
}
return TRUE;
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"effectv",
- plugin_init
-};
+ "effect plugins from the effectv project",
+ plugin_init,
+ VERSION,
+ "LGPL",
+ "Wim Taymans <wim.taymans@chello.be>, (c) 2001 FUKUCHI Kentarou, (c) 2001 Sam Mertens, (c) 2002 Ed Tannenbaum",
+ GST_PACKAGE,
+ GST_ORIGIN
+);
diff --git a/gst/effectv/gsteffectv.h b/gst/effectv/gsteffectv.h
index 891307d5..ef4bf713 100644
--- a/gst/effectv/gsteffectv.h
+++ b/gst/effectv/gsteffectv.h
@@ -24,28 +24,13 @@
#include <gst/gst.h>
GType gst_edgetv_get_type (void);
-extern GstElementDetails gst_edgetv_details;
-
GType gst_agingtv_get_type (void);
-extern GstElementDetails gst_agingtv_details;
-
GType gst_dicetv_get_type (void);
-extern GstElementDetails gst_dicetv_details;
-
GType gst_warptv_get_type (void);
-extern GstElementDetails gst_warptv_details;
-
GType gst_shagadelictv_get_type (void);
-extern GstElementDetails gst_shagadelictv_details;
-
GType gst_vertigotv_get_type (void);
-extern GstElementDetails gst_vertigotv_details;
-
GType gst_revtv_get_type (void);
-extern GstElementDetails gst_revtv_details;
-
GType gst_quarktv_get_type (void);
-extern GstElementDetails gst_quarktv_details;
extern GstPadTemplate *gst_effectv_sink_factory ();
extern GstPadTemplate *gst_effectv_src_factory ();
diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c
index 93e983d1..283ae867 100644
--- a/gst/effectv/gstquark.c
+++ b/gst/effectv/gstquark.c
@@ -66,16 +66,12 @@ struct _GstQuarkTVClass
};
/* elementfactory information */
-GstElementDetails gst_quarktv_details = {
+static GstElementDetails gst_quarktv_details = GST_ELEMENT_DETAILS (
"QuarkTV",
"Filter/Video/Effect",
- "LGPL",
- "Motion disolver",
- VERSION,
- "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>",
- "(C) 2001 FUKUCHI Kentarou",
-};
-
+ "Motion dissolver",
+ "FUKUCHI, Kentarou <fukuchi@users.sourceforge.net>"
+);
/* Filter signals and args */
enum
@@ -90,6 +86,7 @@ enum
ARG_PLANES,
};
+static void gst_quarktv_base_init (gpointer g_class);
static void gst_quarktv_class_init (GstQuarkTVClass * klass);
static void gst_quarktv_init (GstQuarkTV * filter);
@@ -121,7 +118,7 @@ GType gst_quarktv_get_type (void)
if (!quarktv_type) {
static const GTypeInfo quarktv_info = {
sizeof (GstQuarkTVClass),
- NULL,
+ gst_quarktv_base_init,
NULL,
(GClassInitFunc) gst_quarktv_class_init,
NULL,
@@ -137,6 +134,17 @@ GType gst_quarktv_get_type (void)
}
static void
+gst_quarktv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_quarktv_details);
+}
+
+static void
gst_quarktv_class_init (GstQuarkTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c
index 001ab5dd..e7566469 100644
--- a/gst/effectv/gstrev.c
+++ b/gst/effectv/gstrev.c
@@ -85,16 +85,12 @@ struct _GstRevTVClass
};
/* elementfactory information */
-GstElementDetails gst_revtv_details = {
+static GstElementDetails gst_revtv_details = GST_ELEMENT_DETAILS (
"RevTV",
"Filter/Video/Effect",
- "LGPL",
"A video waveform monitor for each line of video processed",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001 FUKUCHI Kentarou,"
- "(c) 2002 Ed Tannenbaum",
-};
+ "Wim Taymans <wim.taymans@chello.be>"
+);
/* Filter signals and args */
@@ -112,6 +108,7 @@ enum
ARG_GAIN,
};
+static void gst_revtv_base_init (gpointer g_class);
static void gst_revtv_class_init (GstRevTVClass * klass);
static void gst_revtv_init (GstRevTV * filter);
@@ -131,7 +128,8 @@ GType gst_revtv_get_type (void)
if (!revtv_type) {
static const GTypeInfo revtv_info = {
- sizeof (GstRevTVClass), NULL,
+ sizeof (GstRevTVClass),
+ gst_revtv_base_init,
NULL,
(GClassInitFunc) gst_revtv_class_init,
NULL,
@@ -147,6 +145,17 @@ GType gst_revtv_get_type (void)
}
static void
+gst_revtv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_revtv_details);
+}
+
+static void
gst_revtv_class_init (GstRevTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c
index 1f792dbd..10d7b077 100644
--- a/gst/effectv/gstshagadelic.c
+++ b/gst/effectv/gstshagadelic.c
@@ -67,15 +67,12 @@ struct _GstShagadelicTVClass
};
/* elementfactory information */
-GstElementDetails gst_shagadelictv_details = {
+static GstElementDetails gst_shagadelictv_details = GST_ELEMENT_DETAILS (
"ShagadelicTV",
"Filter/Video/Effect",
- "LGPL",
"Oh behave, ShagedelicTV makes images shagadelic!",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001 FUKUCHI Kentarou",
-};
+ "Wim Taymans <wim.taymans@chello.be>"
+);
/* Filter signals and args */
@@ -90,6 +87,7 @@ enum
ARG_0,
};
+static void gst_shagadelictv_base_init (gpointer g_class);
static void gst_shagadelictv_class_init (GstShagadelicTVClass * klass);
static void gst_shagadelictv_init (GstShagadelicTV * filter);
@@ -111,7 +109,8 @@ GType gst_shagadelictv_get_type (void)
if (!shagadelictv_type) {
static const GTypeInfo shagadelictv_info = {
- sizeof (GstShagadelicTVClass), NULL,
+ sizeof (GstShagadelicTVClass),
+ gst_shagadelictv_base_init,
NULL,
(GClassInitFunc) gst_shagadelictv_class_init,
NULL,
@@ -127,6 +126,17 @@ GType gst_shagadelictv_get_type (void)
}
static void
+gst_shagadelictv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_shagadelictv_details);
+}
+
+static void
gst_shagadelictv_class_init (GstShagadelicTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c
index 45a2b8fd..f1006b86 100644
--- a/gst/effectv/gstvertigo.c
+++ b/gst/effectv/gstvertigo.c
@@ -69,15 +69,12 @@ struct _GstVertigoTVClass
};
/* elementfactory information */
-GstElementDetails gst_vertigotv_details = {
+static GstElementDetails gst_vertigotv_details = GST_ELEMENT_DETAILS (
"VertigoTV",
"Filter/Video/Effect",
- "LGPL",
"A loopback alpha blending effector with rotating and scaling",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001 FUKUCHI Kentarou",
-};
+ "Wim Taymans <wim.taymans@chello.be>"
+);
/* Filter signals and args */
@@ -95,6 +92,7 @@ enum
ARG_ZOOM_SPEED,
};
+static void gst_vertigotv_base_init (gpointer g_class);
static void gst_vertigotv_class_init (GstVertigoTVClass * klass);
static void gst_vertigotv_init (GstVertigoTV * filter);
@@ -116,7 +114,8 @@ GType gst_vertigotv_get_type (void)
if (!vertigotv_type) {
static const GTypeInfo vertigotv_info = {
- sizeof (GstVertigoTVClass), NULL,
+ sizeof (GstVertigoTVClass),
+ gst_vertigotv_base_init,
NULL,
(GClassInitFunc) gst_vertigotv_class_init,
NULL,
@@ -132,6 +131,17 @@ GType gst_vertigotv_get_type (void)
}
static void
+gst_vertigotv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_vertigotv_details);
+}
+
+static void
gst_vertigotv_class_init (GstVertigoTVClass * klass)
{
GObjectClass *gobject_class;
diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c
index f4bb281f..4e03eb74 100644
--- a/gst/effectv/gstwarp.c
+++ b/gst/effectv/gstwarp.c
@@ -73,16 +73,12 @@ struct _GstWarpTVClass
};
/* elementfactory information */
-GstElementDetails gst_warptv_details = {
+static GstElementDetails gst_warptv_details = GST_ELEMENT_DETAILS (
"WarpTV",
"Filter/Video/Effect",
- "LGPL",
"WarpTV does realtime goo'ing of the video input",
- VERSION,
- "Sam Lantinga <slouken@devolution.com>",
- "Wim Taymans <wim.taymans@chello.be>, "
- "(C) 2001 FUKUCHI Kentarou",
-};
+ "Sam Lantinga <slouken@devolution.com>"
+);
/* Filter signals and args */
@@ -97,6 +93,7 @@ enum
ARG_0,
};
+static void gst_warptv_base_init (gpointer g_class);
static void gst_warptv_class_init (GstWarpTVClass * klass);
static void gst_warptv_init (GstWarpTV * filter);
@@ -118,7 +115,8 @@ GType gst_warptv_get_type (void)
if (!warptv_type) {
static const GTypeInfo warptv_info = {
- sizeof (GstWarpTVClass), NULL,
+ sizeof (GstWarpTVClass),
+ gst_warptv_base_init,
NULL,
(GClassInitFunc) gst_warptv_class_init,
NULL,
@@ -134,6 +132,17 @@ GType gst_warptv_get_type (void)
}
static void
+gst_warptv_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
+ gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+
+ gst_element_class_set_details (element_class, &gst_warptv_details);
+}
+
+static void
gst_warptv_class_init (GstWarpTVClass * klass)
{
GObjectClass *gobject_class;