From: Iain Holmes Date: Sat, 1 Nov 2003 01:37:51 +0000 (+0000) Subject: Updated AAsink X-Git-Tag: 1.19.3~509^2~15700 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36884b6d7f4dc9fa9bae8f9a8184a72b997a693e;p=platform%2Fupstream%2Fgstreamer.git Updated AAsink Original commit message from CVS: Updated AAsink --- diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c index 1d694d7..7aa8fa5 100644 --- a/ext/aalib/gstaasink.c +++ b/ext/aalib/gstaasink.c @@ -30,13 +30,10 @@ /* elementfactory information */ static GstElementDetails gst_aasink_details = { - "Video sink", + "AA sink", "Sink/Video", - "GPL", "An ASCII art videosink", - VERSION, - "Wim Taymans ", - "(C) 2001", + "Wim Taymans " }; /* aasink signals and args */ @@ -73,7 +70,8 @@ GST_PAD_TEMPLATE_FACTORY (sink_template, GST_PROPS_FOURCC (GST_STR_FOURCC ("I420"))) ) ) - + +static void gst_aasink_base_init (gpointer g_class); static void gst_aasink_class_init (GstAASinkClass *klass); static void gst_aasink_init (GstAASink *aasink); @@ -98,7 +96,7 @@ gst_aasink_get_type (void) if (!aasink_type) { static const GTypeInfo aasink_info = { sizeof(GstAASinkClass), - NULL, + gst_aasink_base_init, NULL, (GClassInitFunc) gst_aasink_class_init, NULL, @@ -175,6 +173,16 @@ gst_aasink_dither_get_type (void) } static void +gst_aasink_base_init (gpointer g_class) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); + + gst_element_class_add_pad_template (element_class, + GST_PAD_TEMPLATE_GET (sink_template)); + gst_element_class_set_details (element_class, &gst_aasink_details); +} + +static void gst_aasink_class_init (GstAASinkClass *klass) { GObjectClass *gobject_class; @@ -534,26 +542,23 @@ gst_aasink_change_state (GstElement *element) } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - /* create an elementfactory for the aasink element */ - factory = gst_element_factory_new("aasink",GST_TYPE_AASINK, - &gst_aasink_details); - g_return_val_if_fail(factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, - GST_PAD_TEMPLATE_GET (sink_template)); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); + if (!gst_element_register (plugin, "aasink", GST_RANK_NONE, GST_TYPE_AASINK)) + return FALSE; return TRUE; } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, "aasink", - plugin_init -}; + "ASCII Art video sink", + plugin_init, + VERSION, + "GPL", + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +)