diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 20:58:22 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-11-02 20:58:22 +0000 |
commit | aa7a4be370e1bbe7b9d02c677bcab7b545172f69 (patch) | |
tree | 48858fde483843ef67b4bd772bed344881622739 | |
parent | 9d888e2d0031daf41ff614a74891c5e146f8646a (diff) | |
download | gst-plugins-bad-aa7a4be370e1bbe7b9d02c677bcab7b545172f69.tar.gz gst-plugins-bad-aa7a4be370e1bbe7b9d02c677bcab7b545172f69.tar.bz2 gst-plugins-bad-aa7a4be370e1bbe7b9d02c677bcab7b545172f69.zip |
And again one more
Original commit message from CVS:
And again one more
-rw-r--r-- | gst/mpeg1videoparse/gstmp1videoparse.c | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/gst/mpeg1videoparse/gstmp1videoparse.c b/gst/mpeg1videoparse/gstmp1videoparse.c index 6bb3ddf3..cbaef247 100644 --- a/gst/mpeg1videoparse/gstmp1videoparse.c +++ b/gst/mpeg1videoparse/gstmp1videoparse.c @@ -32,14 +32,11 @@ #define SEQ_END_CODE 0x000001b7 /* elementfactory information */ -static GstElementDetails mp1videoparse_details = { +static GstElementDetails mpeg1videoparse_details = { "MPEG 1 Video Parser", "Codec/Parser", - "LGPL", - "Parses and frames MPEG 1 video streams, provides seek", - VERSION, - "Wim Taymans <wim.taymans@chello.be>", - "(C) 2000", + "Parses and frames MPEG 1 video streams, provides seek" + "Wim Taymans <wim.taymans@chello.be>" }; GST_PAD_TEMPLATE_FACTORY (src_factory, @@ -83,6 +80,7 @@ enum { }; static void gst_mp1videoparse_class_init (Mp1VideoParseClass *klass); +static void gst_mp1videoparse_base_init (Mp1VideoParseClass *klass); static void gst_mp1videoparse_init (Mp1VideoParse *mp1videoparse); static void gst_mp1videoparse_chain (GstPad *pad, GstData *_data); @@ -101,7 +99,8 @@ mp1videoparse_get_type (void) if (!mp1videoparse_type) { static const GTypeInfo mp1videoparse_info = { - sizeof(Mp1VideoParseClass), NULL, + sizeof(Mp1VideoParseClass), + (GBaseInitFunc)gst_mp1videoparse_base_init, NULL, (GClassInitFunc)gst_mp1videoparse_class_init, NULL, @@ -116,6 +115,18 @@ mp1videoparse_get_type (void) } static void +gst_mp1videoparse_base_init (Mp1VideoParseClass *klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_add_pad_template (element_class, + GST_PAD_TEMPLATE_GET (src_factory)); + gst_element_class_add_pad_template (element_class, + GST_PAD_TEMPLATE_GET (sink_factory)); + gst_element_class_set_details (element_class, &mpeg1videoparse_details); +} + +static void gst_mp1videoparse_class_init (Mp1VideoParseClass *klass) { GstElementClass *gstelement_class; @@ -481,28 +492,21 @@ gst_mp1videoparse_change_state (GstElement *element) } static gboolean -plugin_init (GModule *module, GstPlugin *plugin) +plugin_init (GstPlugin *plugin) { - GstElementFactory *factory; - - /* create an elementfactory for the mp1videoparse element */ - factory = gst_element_factory_new("mp1videoparse",GST_TYPE_MP1VIDEOPARSE, - &mp1videoparse_details); - g_return_val_if_fail(factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, - GST_PAD_TEMPLATE_GET (src_factory)); - gst_element_factory_add_pad_template (factory, - GST_PAD_TEMPLATE_GET (sink_factory)); - - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - - return TRUE; + return gst_element_register (plugin, "mpeg1videoparse", + GST_RANK_NONE, GST_TYPE_MP1VIDEOPARSE); } -GstPluginDesc plugin_desc = { +GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, - "mp1videoparse", - plugin_init -}; + "mpeg1videoparse", + "MPEG-1 video parser", + plugin_init, + VERSION, + GST_LICENSE, + GST_COPYRIGHT, + GST_PACKAGE, + GST_ORIGIN +) |