From 835264e18d4789ca7d0a468e5f1f910e165445f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 16 Aug 2006 10:53:32 +0000 Subject: [PATCH] gst/autodetect/gstautoaudiosink.c: When we can't find a usable audiosink, don't error out, but use a fake sink instea... Original commit message from CVS: * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_find_best): When we can't find a usable audiosink, don't error out, but use a fake sink instead and post a warning message on the bus (#341278). --- ChangeLog | 8 ++++++++ gst/autodetect/gstautoaudiosink.c | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02bdde4..70b4259 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2006-08-16 Tim-Philipp Müller + * gst/autodetect/gstautoaudiosink.c: + (gst_auto_audio_sink_find_best): + When we can't find a usable audiosink, don't error out, + but use a fake sink instead and post a warning message + on the bus (#341278). + +2006-08-16 Tim-Philipp Müller + * sys/oss/gstossmixerelement.c: (gst_oss_mixer_element_class_init): * sys/oss/gstosssink.c: * sys/oss/gstosssrc.c: diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c index 1dc4ad3..13b0e65 100644 --- a/gst/autodetect/gstautoaudiosink.c +++ b/gst/autodetect/gstautoaudiosink.c @@ -230,9 +230,12 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink) GST_DEBUG_OBJECT (sink, "reposting message %p", errors->data); gst_element_post_message (GST_ELEMENT (sink), GST_MESSAGE (errors->data)); } else { - /* general fallback */ - GST_ELEMENT_ERROR (sink, LIBRARY, INIT, (NULL), - ("Failed to find a supported audio sink")); + /* send warning message to application and use a fakesink */ + GST_ELEMENT_WARNING (sink, RESOURCE, NOT_FOUND, (NULL), + ("Failed to find a usable audio sink")); + choice = gst_element_factory_make ("fakesink", "fake-audio-sink"); + g_object_set (choice, "sync", TRUE, NULL); + gst_element_set_state (choice, GST_STATE_READY); } } gst_object_unref (bus); -- 2.7.4