From 94f5506dc369765e312352e1c7059be4d4c2faf1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 5 Nov 2003 12:20:43 +0000 Subject: [PATCH] Re-add mixer element, gst-mixer doesn't work without it Original commit message from CVS: Re-add mixer element, gst-mixer doesn't work without it --- sys/oss/gstossaudio.c | 11 ++++++++--- sys/oss/gstosselement.c | 19 ++++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/sys/oss/gstossaudio.c b/sys/oss/gstossaudio.c index 0e178c0cf2..1530d2dad9 100644 --- a/sys/oss/gstossaudio.c +++ b/sys/oss/gstossaudio.c @@ -50,9 +50,14 @@ plugin_init (GstPlugin *plugin) __gst_oss_plugin_dir = g_strjoinv (G_DIR_SEPARATOR_S, path); g_strfreev (path); - if (!gst_element_register (plugin, "osssrc", GST_RANK_PRIMARY, GST_TYPE_OSSSRC) || - !gst_element_register (plugin, "osssink", GST_RANK_PRIMARY, GST_TYPE_OSSSINK) || - !gst_element_register (plugin, "ossgst", GST_RANK_MARGINAL, GST_TYPE_OSSGST)) { + if (!gst_element_register (plugin, "ossmixer", GST_RANK_PRIMARY, + GST_TYPE_OSSELEMENT) || + !gst_element_register (plugin, "osssrc", GST_RANK_PRIMARY, + GST_TYPE_OSSSRC) || + !gst_element_register (plugin, "osssink", GST_RANK_PRIMARY, + GST_TYPE_OSSSINK) || + !gst_element_register (plugin, "ossgst", GST_RANK_MARGINAL, + GST_TYPE_OSSGST)) { return FALSE; } diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index f679d98571..b57169e776 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -43,6 +43,15 @@ enum { ARG_DEVICE_NAME, }; +/* elementfactory information */ +static GstElementDetails gst_osselement_details = GST_ELEMENT_DETAILS ( + "Audio Mixer (OSS)", + "Generic/Audio", + "OSS-based mixer element", + "Ronald Bultje " +); + +static void gst_osselement_base_init (GstOssElementClass *klass); static void gst_osselement_class_init (GstOssElementClass *klass); static void gst_osselement_init (GstOssElement *oss); static void gst_osselement_dispose (GObject *object); @@ -68,7 +77,7 @@ gst_osselement_get_type (void) if (!osselement_type) { static const GTypeInfo osselement_info = { sizeof(GstOssElementClass), - NULL, + (GBaseInitFunc)gst_osselement_base_init, NULL, (GClassInitFunc)gst_osselement_class_init, NULL, @@ -102,6 +111,14 @@ gst_osselement_get_type (void) return osselement_type; } +static void +gst_osselement_base_init (GstOssElementClass *klass) +{ + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + + gst_element_class_set_details (element_class, &gst_osselement_details); +} + static void gst_osselement_class_init (GstOssElementClass *klass) {