diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 21:40:55 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 21:40:55 +0000 |
commit | fea9514afcbae7d2a7ccd07c168e837302cb2dd5 (patch) | |
tree | 744056edcdff0b1f24167ad2e62d04649baedba8 | |
parent | ac6d8c026fbc68e493f2ceb919a5ada2215a79cd (diff) | |
download | gst-plugins-bad-fea9514afcbae7d2a7ccd07c168e837302cb2dd5.tar.gz gst-plugins-bad-fea9514afcbae7d2a7ccd07c168e837302cb2dd5.tar.bz2 gst-plugins-bad-fea9514afcbae7d2a7ccd07c168e837302cb2dd5.zip |
More more more more zzzzz I need sleep
Original commit message from CVS:
More more more more zzzzz I need sleep
-rw-r--r-- | gst/playondemand/gstplayondemand.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/gst/playondemand/gstplayondemand.c b/gst/playondemand/gstplayondemand.c index b53d4be9..afac7bdd 100644 --- a/gst/playondemand/gstplayondemand.c +++ b/gst/playondemand/gstplayondemand.c @@ -45,11 +45,8 @@ static GstElementDetails play_on_demand_details = { "Play On Demand", "Filter/Audio/Effect", - "LGPL", "Plays a stream at specific times, or when it receives a signal", - VERSION, - "Leif Morgan Johnson <leif@ambient.2y.net>", - "(C) 2002", + "Leif Morgan Johnson <leif@ambient.2y.net>" }; @@ -91,6 +88,7 @@ play_on_demand_src_factory (void) /* GObject functionality */ static void play_on_demand_class_init (GstPlayOnDemandClass *klass); +static void play_on_demand_base_init (GstPlayOnDemandClass *klass); static void play_on_demand_init (GstPlayOnDemand *filter); static void play_on_demand_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void play_on_demand_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); @@ -119,7 +117,7 @@ gst_play_on_demand_get_type (void) if (! play_on_demand_type) { static const GTypeInfo play_on_demand_info = { sizeof(GstPlayOnDemandClass), - NULL, + (GBaseInitFunc) play_on_demand_base_init, NULL, (GClassInitFunc) play_on_demand_class_init, NULL, @@ -162,6 +160,16 @@ static guint gst_pod_filter_signals[LAST_SIGNAL] = { 0 }; static GstElementClass *parent_class = NULL; static void +play_on_demand_base_init (GstPlayOnDemandClass *klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_pad_template(element_class, play_on_demand_src_factory()); + gst_element_class_add_pad_template(element_class, play_on_demand_sink_factory()); + gst_element_class_set_details(element_class, &play_on_demand_details); +} + +static void play_on_demand_class_init (GstPlayOnDemandClass *klass) { GObjectClass *gobject_class; @@ -548,26 +556,22 @@ play_on_demand_resize_buffer (GstPlayOnDemand *filter) } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - factory = gst_element_factory_new("playondemand", - GST_TYPE_PLAYONDEMAND, - &play_on_demand_details); - g_return_val_if_fail(factory != NULL, FALSE); - - gst_element_factory_add_pad_template(factory, play_on_demand_src_factory()); - gst_element_factory_add_pad_template(factory, play_on_demand_sink_factory()); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE(factory)); - - return TRUE; + return gst_element_register(plugin, "playondemand", + GST_RANK_NONE, + GST_TYPE_PLAYONDEMAND); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "playondemand", - plugin_init -}; + "Plays a stream at specific times, or when it receives a signal", + plugin_init, + VERSION, + "LGPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) |