summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorChristophe Dehais <christophe.dehais@gmail.com>2007-03-22 09:44:17 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-03-22 09:44:17 +0000
commitc410265b6a628c03bca93bdf200ed5ce01bd8398 (patch)
tree07dc9ae140dedc66413430921e5d0a07d6b21d2b /ext
parenta1a03796da8e75bb46eec73269e711d0ed7d4811 (diff)
ext/gconf/gconf.c: Accept complex pipeline descriptions as an audio profile instead of just a single element. Fixes #...
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.
Diffstat (limited to 'ext')
-rw-r--r--ext/gconf/gconf.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/gconf/gconf.c b/ext/gconf/gconf.c
index 1f24b97f..81c1f550 100644
--- a/ext/gconf/gconf.c
+++ b/ext/gconf/gconf.c
@@ -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);
}