ext/gconf/gconf.c: Accept complex pipeline descriptions as an audio profile instead...
authorChristophe Dehais <christophe.dehais@gmail.com>
Thu, 22 Mar 2007 09:44:17 +0000 (09:44 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Thu, 22 Mar 2007 09:44:17 +0000 (09:44 +0000)
Original commit message from CVS:
Patch by: Christophe Dehais <christophe dot dehais at gmail dot com>
* ext/gconf/gconf.c: (gst_gconf_render_bin_with_default):
Accept complex pipeline descriptions as an audio profile instead of just
a single element. Fixes #420658.

ChangeLog
ext/gconf/gconf.c

index 5101aa2..c2ebf99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-03-22  Wim Taymans  <wim@fluendo.com>
+
+       Patch by: Christophe Dehais <christophe dot dehais at gmail dot com>
+
+       * ext/gconf/gconf.c: (gst_gconf_render_bin_with_default):
+       Accept complex pipeline descriptions as an audio profile instead of just
+       a single element. Fixes #420658.
+
 2007-03-21  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/apetag/gsttagdemux.c: (gst_tag_demux_get_type):
index 1f24b97..81c1f55 100644 (file)
@@ -162,11 +162,10 @@ gst_gconf_render_bin_from_key (const gchar * key)
 
 /**
  * gst_gconf_render_bin_with_default:
- * @bin: a #gchar string corresponding to pipeline to construct.
- * @default: a pipeline description to use as default if the GConf key
- *   pipeline fails to construct.
+ * @bin: a #gchar string describing the pipeline to construct.
+ * @default_sink: an element to use as default if the given pipeline fails to construct.
  *
- * Render bin from GConf key @key using @default as a fallback.
+ * Render bin from description @bin using @default_sink element as a fallback.
  *
  * Returns: a #GstElement containing the rendered bin.
  */
@@ -175,14 +174,16 @@ gst_gconf_render_bin_with_default (const gchar * bin,
     const gchar * default_sink)
 {
   GstElement *ret;
+  GError *err = NULL;
 
-  ret = gst_element_factory_make (bin, NULL);
+  ret = gst_parse_bin_from_description (bin, TRUE, &err);
 
-  if (!ret) {
+  if (err) {
     ret = gst_element_factory_make (default_sink, NULL);
 
     if (!ret)
-      g_warning ("No GConf default audio sink key and %s doesn't work",
+      g_warning
+          ("Could not build GConf audio sink and the replacement %s doesn't work",
           DEFAULT_AUDIOSINK);
   }