From: <tp...@ke...> - 2006-08-16 10:53:46
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: tpm Date: Wed Aug 16 2006 10:53:44 UTC Log message: * 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). Modified files: . : ChangeLog gst/autodetect : gstautoaudiosink.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2487&r2=1.2488 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/autodetect/gstautoaudiosink.c.diff?r1=1.20&r2=1.21 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2487 retrieving revision 1.2488 diff -u -d -r1.2487 -r1.2488 --- ChangeLog 16 Aug 2006 10:22:31 -0000 1.2487 +++ ChangeLog 16 Aug 2006 10:53:32 -0000 1.2488 @@ -1,5 +1,13 @@ 2006-08-16 Tim-Philipp Müller <tim at centricular dot net> + * 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 <tim at centricular dot net> * sys/oss/gstossmixerelement.c: (gst_oss_mixer_element_class_init): * sys/oss/gstosssink.c: * sys/oss/gstosssrc.c: Index: gstautoaudiosink.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/autodetect/gstautoaudiosink.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- gstautoaudiosink.c 27 Jul 2006 11:21:53 -0000 1.20 +++ gstautoaudiosink.c 16 Aug 2006 10:53:32 -0000 1.21 @@ -230,9 +230,12 @@ 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); |