From 65480fcc2d8a67fa6253fe3c4db43c11610a4f9b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 14 Nov 2005 17:44:40 +0000 Subject: [PATCH] gst/playback/gstplaybin.c (gen_audio_element): Use autoaudiosink as well if it is available. Fixes #316442. Original commit message from CVS: 2005-11-14 Andy Wingo * gst/playback/gstplaybin.c (gen_audio_element): Use autoaudiosink as well if it is available. Fixes #316442. --- ChangeLog | 5 +++++ gst/playback/gstplaybin.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 499bf0a..f771cfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-14 Andy Wingo + + * gst/playback/gstplaybin.c (gen_audio_element): Use autoaudiosink + as well if it is available. Fixes #316442. + 2005-11-14 Michael Smith * ext/ogg/gstoggmux.c: (gst_ogg_mux_clear), (gst_ogg_mux_init), diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 1a06327..b924b0a 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -532,6 +532,17 @@ gen_audio_element (GstPlayBin * play_bin) if (play_bin->audio_sink) { sink = play_bin->audio_sink; } else { + sink = gst_element_factory_make ("autoaudiiosink", "audiosink"); + if (sink == NULL) { + sink = gst_element_factory_make ("alsasink", "audiosink"); + } + /* FIXME: this warrants adding a CORE error category for missing + * elements/plugins */ + if (sink == NULL) { + GST_ELEMENT_ERROR (play_bin, CORE, FAILED, + (_("Both autoaudiosink and alsasink elements are missing.")), (NULL)); + return NULL; + } sink = gst_element_factory_make ("alsasink", "audiosink"); if (sink == NULL) { g_warning ("could not create autoaudiosink element"); -- 2.7.4