summaryrefslogtreecommitdiffstats
path: root/ext/mplex
diff options
context:
space:
mode:
authorIain Holmes <iain@prettypeople.org>2003-11-02 00:47:43 +0000
committerIain Holmes <iain@prettypeople.org>2003-11-02 00:47:43 +0000
commit4f7a7403ddc9f5f3664cf04211f631364722e542 (patch)
treef2b8a44a4f137f488c3d8e70b2103984c5bb7b09 /ext/mplex
parentb6f8a7b4efbcbcd2c0f11ac4275a336e7685150a (diff)
downloadgst-plugins-bad-4f7a7403ddc9f5f3664cf04211f631364722e542.tar.gz
gst-plugins-bad-4f7a7403ddc9f5f3664cf04211f631364722e542.tar.bz2
gst-plugins-bad-4f7a7403ddc9f5f3664cf04211f631364722e542.zip
mplex compiles...whatever it is
Original commit message from CVS: mplex compiles...whatever it is
Diffstat (limited to 'ext/mplex')
-rw-r--r--ext/mplex/gstmplex.cc51
1 files changed, 27 insertions, 24 deletions
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index 8f8a94a3..f254e728 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -30,11 +30,8 @@
static GstElementDetails gst_mplex_details = {
"MPlex multiplexer",
"Codec/Audio/Decoder",
- "GPL",
"multiplex mpeg audio and video into a system stream",
- VERSION,
"Wim Taymans <wim.taymans@chello.be> ",
- "(C) 2002",
};
/* Sidec signals and args */
@@ -136,6 +133,7 @@ gst_mplex_mux_format_get_type (void)
return mplex_mux_format_type;
}
+static void gst_mplex_base_init (gpointer g_class);
static void gst_mplex_class_init (GstMPlex *klass);
static void gst_mplex_init (GstMPlex *mplex);
@@ -166,7 +164,7 @@ gst_mplex_get_type (void)
if (!mplex_type) {
static const GTypeInfo mplex_info = {
sizeof(GstMPlexClass),
- NULL,
+ gst_mplex_base_init,
NULL,
(GClassInitFunc) gst_mplex_class_init,
NULL,
@@ -183,6 +181,20 @@ gst_mplex_get_type (void)
}
static void
+gst_mplex_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 (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_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (private_1_sink_factory));
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (private_2_sink_factory));
+
+ gst_element_class_set_details (element_class, &gst_mplex_details);
+}
+
+static void
gst_mplex_class_init (GstMPlex *klass)
{
GObjectClass *gobject_class;
@@ -573,35 +585,26 @@ gst_mplex_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe
}
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- /* this filter needs the bytestream package */
if (!gst_library_load ("gstbytestream"))
return FALSE;
- /* create an elementfactory for the avi_demux element */
- factory = gst_element_factory_new ("mplex",GST_TYPE_MPLEX,
- &gst_mplex_details);
- g_return_val_if_fail (factory != NULL, FALSE);
- gst_element_factory_set_rank (factory, GST_ELEMENT_RANK_NONE);
-
- 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_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (private_1_sink_factory));
- gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (private_2_sink_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
+ if (!gst_element_register (plugin, "mplex", GST_RANK_NONE, GST_TYPE_MPLEX))
+ return FALSE;
return TRUE;
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"mplex",
- plugin_init
-};
+ "MPlexs an audio and video stream into a system stream",
+ plugin_init,
+ VERSION,
+ "LGPL",
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN)