From: <tp...@ke...> - 2006-07-24 14:49:31
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: tpm Date: Mon Jul 24 2006 14:49:31 UTC Log message: * ext/esd/esdsink.c: (gst_esdsink_open), (gst_esdsink_factory_init): Prevent libesd from auto-spawning a sound daemon if it is not already running. Now that we don't do evil stuff like that any longer we can give esdsink a rank so that autoaudiosink will try it as well if all other audio sinks fail (#343051). Modified files: . : ChangeLog ext/esd : esdsink.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2449&r2=1.2450 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ext/esd/esdsink.c.diff?r1=1.60&r2=1.61 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2449 retrieving revision 1.2450 diff -u -d -r1.2449 -r1.2450 --- ChangeLog 24 Jul 2006 14:42:11 -0000 1.2449 +++ ChangeLog 24 Jul 2006 14:49:19 -0000 1.2450 @@ -1,5 +1,15 @@ 2006-07-24 Tim-Philipp Müller <tim at centricular dot net> + * ext/esd/esdsink.c: (gst_esdsink_open), + (gst_esdsink_factory_init): + Prevent libesd from auto-spawning a sound daemon if it + is not already running. Now that we don't do evil stuff + like that any longer we can give esdsink a rank so that + autoaudiosink will try it as well if all other audio + sinks fail (#343051). + +2006-07-24 Tim-Philipp Müller <tim at centricular dot net> * ext/esd/Makefile.am: Oops, need to remove README from EXTRA_DIST as well. Index: esdsink.c RCS file: /cvs/gstreamer/gst-plugins-good/ext/esd/esdsink.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- esdsink.c 24 Jul 2006 14:37:36 -0000 1.60 +++ esdsink.c 24 Jul 2006 14:49:19 -0000 1.61 @@ -181,13 +181,28 @@ esd_server_info_t *server_info; GstPadTemplate *pad_template; GstEsdSink *esdsink; + gchar *saved_env; gint i; esdsink = GST_ESDSINK (asink); GST_DEBUG_OBJECT (esdsink, "open"); + /* ensure libesd doesn't auto-spawn a sound daemon if none is running yet */ + saved_env = g_strdup (g_getenv ("ESD_NO_SPAWN")); + g_setenv ("ESD_NO_SPAWN", "1", TRUE); + /* now try to connect to any existing/running sound daemons */ esdsink->ctrl_fd = esd_open_sound (esdsink->host); + /* and restore the previous state */ + if (saved_env != NULL) { + g_setenv ("ESD_NO_SPAWN", saved_env, TRUE); + } else { + g_unsetenv ("ESD_NO_SPAWN"); + } + g_free (saved_env); if (esdsink->ctrl_fd < 0) goto couldnt_connect; @@ -434,7 +449,7 @@ gboolean gst_esdsink_factory_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "esdsink", GST_RANK_NONE, + if (!gst_element_register (plugin, "esdsink", GST_RANK_MARGINAL, GST_TYPE_ESDSINK)) return FALSE; |