summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 20:53:30 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 20:53:30 +0000
commit9d888e2d0031daf41ff614a74891c5e146f8646a (patch)
tree58aa6ee8c16a1f7f71607cb21904f680d3874ade
parent5d4b1a32cf8dcc08bc3024a72aca041fb9d37c9f (diff)
downloadgstreamer-plugins-bad-9d888e2d0031daf41ff614a74891c5e146f8646a.tar.gz
Again one more done
Original commit message from CVS: Again one more done
-rw-r--r--gst/mpeg1sys/gstmpeg1systemencode.c52
1 files changed, 29 insertions, 23 deletions
diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c
index c713cde6a..40eb41cba 100644
--- a/gst/mpeg1sys/gstmpeg1systemencode.c
+++ b/gst/mpeg1sys/gstmpeg1systemencode.c
@@ -34,11 +34,8 @@
static GstElementDetails system_encode_details = {
"MPEG1 Multiplexer",
"Codec/Muxer",
- "GPL",
"Multiplexes MPEG-1 Streams",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2000",
+ "Wim Taymans <wim.taymans@chello.be>"
};
/* GstMPEG1SystemEncode signals and args */
@@ -87,6 +84,7 @@ GST_PAD_TEMPLATE_FACTORY (audio_sink_factory,
)
static void gst_system_encode_class_init (GstMPEG1SystemEncodeClass *klass);
+static void gst_system_encode_base_init (GstMPEG1SystemEncodeClass *klass);
static void gst_system_encode_init (GstMPEG1SystemEncode *system_encode);
static GstPad* gst_system_encode_request_new_pad (GstElement *element, GstPadTemplate *templ,
@@ -109,7 +107,7 @@ gst_mpeg1_system_encode_get_type (void)
if (!system_encode_type) {
static const GTypeInfo system_encode_info = {
sizeof(GstMPEG1SystemEncodeClass),
- NULL,
+ (GBaseInitFunc)gst_system_encode_base_init,
NULL,
(GClassInitFunc)gst_system_encode_class_init,
NULL,
@@ -125,6 +123,20 @@ gst_mpeg1_system_encode_get_type (void)
}
static void
+gst_system_encode_base_init (GstMPEG1SystemEncodeClass *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 (audio_sink_factory));
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (video_sink_factory));
+ gst_element_class_set_details (element_class, &system_encode_details);
+}
+
+static void
gst_system_encode_class_init (GstMPEG1SystemEncodeClass *klass)
{
GObjectClass *gobject_class;
@@ -545,31 +557,25 @@ gst_system_encode_get_property (GObject *object, guint prop_id, GValue *value, G
}
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
/* this filter needs the getbits functions */
if (!gst_library_load ("gstgetbits"))
return FALSE;
- /* create an elementfactory for the system_encode element */
- factory = gst_element_factory_new ("system_encode", GST_TYPE_SYSTEM_ENCODE,
- &system_encode_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 (audio_sink_factory));
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (video_sink_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- return TRUE;
+ return gst_element_register (plugin, "system_encode",
+ GST_RANK_NONE, GST_TYPE_SYSTEM_ENCODE);
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"system_encode",
- plugin_init
-};
+ "MPEG-1 system stream encoder",
+ plugin_init,
+ VERSION,
+ "GPL",
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
+)