Index: ext/gconf/gconf.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ext/gconf/gconf.c,v
retrieving revision 1.5
diff -p -u -r1.5 gconf.c
--- ext/gconf/gconf.c	5 Feb 2006 22:22:56 -0000	1.5
+++ ext/gconf/gconf.c	16 Feb 2006 16:33:37 -0000
@@ -1,5 +1,6 @@
 /* GStreamer
  * Copyright (C) <2002> Thomas Vander Stichele <thomas@apestaart.org>
+ * Copyright (C) <2006> Jürg Billeter <j@bitron.ch>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -128,6 +129,7 @@ gst_gconf_render_bin_from_key (const gch
 
 /**
  * gst_gconf_get_default_audio_sink:
+ * @profile: the appropriate application profile.
  *
  * Render audio output bin from GStreamer GConf key : "default/audiosink".
  * If key is invalid, the default audio sink for the platform is used
@@ -137,9 +139,30 @@ gst_gconf_render_bin_from_key (const gch
  * everything failed.
  */
 GstElement *
-gst_gconf_get_default_audio_sink (void)
+gst_gconf_get_default_audio_sink (int profile)
 {
-  GstElement *ret = gst_gconf_render_bin_from_key (GST_GCONF_AUDIOSINK_KEY);
+  GstElement *ret;
+  gchar *key;
+  const gchar *profile_string;
+  
+  switch (profile) {
+    case GCONF_PROFILE_SOUNDS:
+      profile_string = "";
+      break;
+    case GCONF_PROFILE_MUSIC:
+      profile_string = "music";
+      break;
+    case GCONF_PROFILE_CHAT:
+      profile_string = "chat";
+      break;
+    default:
+      g_return_val_if_reached (NULL);
+  }
+
+  key = g_strdup_printf ("default/%saudiosink", profile_string);
+  
+  ret = gst_gconf_render_bin_from_key (key);
+  g_free (key);
 
   if (!ret) {
     ret = gst_element_factory_make (DEFAULT_AUDIOSINK, NULL);
Index: ext/gconf/gconf.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ext/gconf/gconf.h,v
retrieving revision 1.4
diff -p -u -r1.4 gconf.h
--- ext/gconf/gconf.h	7 Feb 2006 16:23:33 -0000	1.4
+++ ext/gconf/gconf.h	16 Feb 2006 16:33:37 -0000
@@ -1,5 +1,6 @@
 /* GStreamer
  * Copyright (C) <2002> Thomas Vander Stichele <thomas@apestaart.org>
+ * Copyright (C) <2006> Jürg Billeter <j@bitron.ch>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -34,6 +35,13 @@ G_BEGIN_DECLS
 #define GST_GCONF_VIDEOSRC_KEY  "default/videosrc"
 #define GST_GCONF_VIDEOSINK_KEY "default/videosink"
 
+enum
+{
+  GCONF_PROFILE_SOUNDS,
+  GCONF_PROFILE_MUSIC,
+  GCONF_PROFILE_CHAT
+};
+
 gchar *         gst_gconf_get_string            (const gchar *key);
 void            gst_gconf_set_string            (const gchar *key, 
                                                  const gchar *value);
@@ -41,7 +49,7 @@ void            gst_gconf_set_string    
 GstElement *    gst_gconf_render_bin_from_key           (const gchar *key);
 
 GstElement *    gst_gconf_get_default_video_sink (void);
-GstElement *    gst_gconf_get_default_audio_sink (void);
+GstElement *    gst_gconf_get_default_audio_sink (int profile);
 GstElement *    gst_gconf_get_default_video_src (void);
 GstElement *    gst_gconf_get_default_audio_src (void);
 GstElement *    gst_gconf_get_default_visualization_element (void);
Index: ext/gconf/gstgconfaudiosink.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ext/gconf/gstgconfaudiosink.c,v
retrieving revision 1.10
diff -p -u -r1.10 gstgconfaudiosink.c
--- ext/gconf/gstgconfaudiosink.c	5 Feb 2006 22:22:56 -0000	1.10
+++ ext/gconf/gstgconfaudiosink.c	16 Feb 2006 16:33:37 -0000
@@ -1,5 +1,6 @@
 /* GStreamer
  * (c) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * (c) 2006 Jürg Billeter <j@bitron.ch>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -33,8 +34,19 @@ static GstStateChangeReturn
 gst_gconf_audio_sink_change_state (GstElement * element,
     GstStateChange transition);
 
+enum
+{
+  PROP_0,
+  PROP_PROFILE
+};
+
 GST_BOILERPLATE (GstGConfAudioSink, gst_gconf_audio_sink, GstBin, GST_TYPE_BIN);
 
+static void gst_gconf_audio_sink_set_property (GObject * object, guint prop_id,
+    const GValue * value, GParamSpec * pspec);
+static void gst_gconf_audio_sink_get_property (GObject * object, guint prop_id,
+    GValue * value, GParamSpec * pspec);
+
 static void
 gst_gconf_audio_sink_base_init (gpointer klass)
 {
@@ -55,14 +67,39 @@ gst_gconf_audio_sink_base_init (gpointer
   gst_element_class_set_details (eklass, &gst_gconf_audio_sink_details);
 }
 
+#define GST_TYPE_GCONF_PROFILE (gst_gconf_profile_get_type())
+static GType
+gst_gconf_profile_get_type (void)
+{
+  static GType gconf_profile_type = 0;
+  static GEnumValue gconf_profiles[] = {
+    {GCONF_PROFILE_SOUNDS, "Sound Events", "sounds"},
+    {GCONF_PROFILE_MUSIC, "Music and Movies", "music"},
+    {GCONF_PROFILE_CHAT, "Audio/Video Conferencing", "chat"},
+    {0, NULL, NULL}
+  };
+
+  if (!gconf_profile_type) {
+    gconf_profile_type = g_enum_register_static ("GstGConfProfile", gconf_profiles);
+  }
+  return gconf_profile_type;
+}
+
 static void
 gst_gconf_audio_sink_class_init (GstGConfAudioSinkClass * klass)
 {
   GObjectClass *oklass = G_OBJECT_CLASS (klass);
   GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
 
+  oklass->set_property = gst_gconf_audio_sink_set_property;
+  oklass->get_property = gst_gconf_audio_sink_get_property;
   oklass->dispose = gst_gconf_audio_sink_dispose;
   eklass->change_state = gst_gconf_audio_sink_change_state;
+
+  g_object_class_install_property (oklass, PROP_PROFILE,
+      g_param_spec_enum ("profile", "Profile", "Profile",
+          GST_TYPE_GCONF_PROFILE, GCONF_PROFILE_SOUNDS,
+          G_PARAM_READWRITE));
 }
 
 /*
@@ -88,6 +125,26 @@ gst_gconf_audio_sink_reset (GstGConfAudi
 
   g_free (sink->gconf_str);
   sink->gconf_str = NULL;
+
+  if (sink->connection) {
+    gconf_client_notify_remove (sink->client, sink->connection);
+    sink->connection = 0;
+  }
+}
+
+static const gchar *
+get_gconf_key_for_profile (int profile)
+{
+	switch (profile) {
+	case GCONF_PROFILE_SOUNDS:
+		return GST_GCONF_DIR "/default/audiosink";
+	case GCONF_PROFILE_MUSIC:
+		return GST_GCONF_DIR "/default/musicaudiosink";
+	case GCONF_PROFILE_CHAT:
+		return GST_GCONF_DIR "/default/chataudiosink";
+	default:
+		g_return_val_if_reached (NULL);
+	}
 }
 
 static void
@@ -102,9 +159,11 @@ gst_gconf_audio_sink_init (GstGConfAudio
   sink->client = gconf_client_get_default ();
   gconf_client_add_dir (sink->client, GST_GCONF_DIR,
       GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
-  gconf_client_notify_add (sink->client,
-      GST_GCONF_DIR "/" GST_GCONF_AUDIOSINK_KEY,
-      cb_toggle_element, sink, NULL, NULL);
+
+  sink->profile = GCONF_PROFILE_SOUNDS;
+  sink->connection = gconf_client_notify_add (sink->client,
+                     get_gconf_key_for_profile (sink->profile), cb_toggle_element,
+                     sink, NULL, NULL);
 }
 
 static void
@@ -113,6 +172,11 @@ gst_gconf_audio_sink_dispose (GObject * 
   GstGConfAudioSink *sink = GST_GCONF_AUDIO_SINK (object);
 
   if (sink->client) {
+    if (sink->connection) {
+      gconf_client_notify_remove (sink->client, sink->connection);
+      sink->connection = 0;
+    }
+
     g_object_unref (G_OBJECT (sink->client));
     sink->client = NULL;
   }
@@ -168,7 +232,7 @@ do_toggle_element (GstGConfAudioSink * s
   }
 
   GST_DEBUG_OBJECT (sink, "Creating new kid");
-  if (!(sink->kid = gst_gconf_get_default_audio_sink ())) {
+  if (!(sink->kid = gst_gconf_get_default_audio_sink (sink->profile))) {
     GST_ELEMENT_ERROR (sink, LIBRARY, SETTINGS, (NULL),
         ("Failed to render audio sink from GConf"));
     g_free (sink->gconf_str);
@@ -189,6 +253,51 @@ do_toggle_element (GstGConfAudioSink * s
 }
 
 static void
+gst_gconf_audio_sink_set_property (GObject * object, guint prop_id, const GValue * value,
+    GParamSpec * pspec)
+{
+  GstGConfAudioSink *sink;
+
+  g_return_if_fail (GST_IS_GCONF_AUDIO_SINK (object));
+
+  sink = GST_GCONF_AUDIO_SINK (object);
+
+  switch (prop_id) {
+    case PROP_PROFILE:
+      sink->profile = g_value_get_enum (value);
+      if (sink->connection) {
+        gconf_client_notify_remove (sink->client, sink->connection);
+      }
+      sink->connection = gconf_client_notify_add (sink->client,
+                         get_gconf_key_for_profile (sink->profile), cb_toggle_element,
+                         sink, NULL, NULL);
+      break;
+    default:
+      break;
+  }
+}
+
+static void
+gst_gconf_audio_sink_get_property (GObject * object, guint prop_id, GValue * value,
+    GParamSpec * pspec)
+{
+  GstGConfAudioSink *sink;
+
+  g_return_if_fail (GST_IS_GCONF_AUDIO_SINK (object));
+
+  sink = GST_GCONF_AUDIO_SINK (object);
+
+  switch (prop_id) {
+    case PROP_PROFILE:
+      g_value_set_enum (value, sink->profile);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
+static void
 cb_toggle_element (GConfClient * client,
     guint connection_id, GConfEntry * entry, gpointer data)
 {
Index: ext/gconf/gstgconfaudiosink.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ext/gconf/gstgconfaudiosink.h,v
retrieving revision 1.5
diff -p -u -r1.5 gstgconfaudiosink.h
--- ext/gconf/gstgconfaudiosink.h	5 Feb 2006 22:22:56 -0000	1.5
+++ ext/gconf/gstgconfaudiosink.h	16 Feb 2006 16:33:37 -0000
@@ -43,6 +43,8 @@ typedef struct _GstGConfAudioSink {
 
   /* explicit pointers to stuff used */
   GConfClient *client;
+  int profile;
+  guint connection;
   GstElement *kid;
   GstPad *pad;
 
Index: gconf/gstreamer.schemas.in
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/gconf/gstreamer.schemas.in,v
retrieving revision 1.4
diff -p -u -r1.4 gstreamer.schemas.in
--- gconf/gstreamer.schemas.in	9 Jan 2005 14:53:58 -0000	1.4
+++ gconf/gstreamer.schemas.in	16 Feb 2006 16:33:38 -0000
@@ -12,6 +12,61 @@
       </locale>
     </schema>
     <schema>
+      <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/audiosink_description</key>
+      <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/audiosink_description</applyto>
+      <owner>gstreamer</owner>
+      <type>string</type>
+      <default>Default</default>
+      <locale name="C">
+        <short>description for default GStreamer audiosink</short>
+        <long>Describes the selected output element.</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/musicaudiosink</key>
+      <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/musicaudiosink</applyto>
+      <owner>gstreamer</owner>
+      <type>string</type>
+      <default>@DEFAULT_AUDIOSINK@</default>
+      <locale name="C">
+        <short>GStreamer audiosink for Music and Movies</short>
+        <long>GStreamer can play audio using any number of output elements.  Some possible choices are osssink, esdsink and alsasink.  The audiosink can be a partial pipeline instead of just one element.</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/musicaudiosink_description</key>
+      <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/musicaudiosink_description</applyto>
+      <owner>gstreamer</owner>
+      <type>string</type>
+      <default>Default</default>
+      <locale name="C">
+        <short>description for GStreamer audiosink for Music and Movies</short>
+        <long>Describes the selected output element for Music and Movies.</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/chataudiosink</key>
+      <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/chataudiosink</applyto>
+      <owner>gstreamer</owner>
+      <type>string</type>
+      <default>@DEFAULT_AUDIOSINK@</default>
+      <locale name="C">
+        <short>GStreamer audiosink for Audio/Video Conferencing</short>
+        <long>GStreamer can play audio using any number of output elements.  Some possible choices are osssink, esdsink and alsasink.  The audiosink can be a partial pipeline instead of just one element.</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/chataudiosink_description</key>
+      <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/chataudiosink_description</applyto>
+      <owner>gstreamer</owner>
+      <type>string</type>
+      <default>Default</default>
+      <locale name="C">
+        <short>description for GStreamer audiosink for Audio/Video Conferencing</short>
+        <long>Describes the selected output element for Audio/Video Conferencing.</long>
+      </locale>
+    </schema>
+    <schema>
       <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/videosink</key>
       <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/videosink</applyto>
       <owner>gstreamer</owner>
@@ -34,6 +89,17 @@
       </locale>
     </schema>
     <schema>
+      <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/audiosrc_description</key>
+      <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/audiosrc_description</applyto>
+      <owner>gstreamer</owner>
+      <type>string</type>
+      <default>Default</default>
+      <locale name="C">
+        <short>description for default GStreamer audiosrc</short>
+        <long>Describes the selected input element.</long>
+      </locale>
+    </schema>
+    <schema>
       <key>/schemas/system/gstreamer/@GST_MAJORMINOR@/default/videosrc</key>
       <applyto>/system/gstreamer/@GST_MAJORMINOR@/default/videosrc</applyto>
       <owner>gstreamer</owner>
