mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-21 09:53:47 +00:00
ext/esd/esdsink.c: Prevent libesd from auto-spawning a sound daemon if it is not already running. Now that we don't d...
Original commit message from CVS: * 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).
This commit is contained in:
parent
8cdf78e1d8
commit
4435bc803e
2 changed files with 26 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
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>
|
2006-07-24 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* ext/esd/Makefile.am:
|
* ext/esd/Makefile.am:
|
||||||
|
|
|
@ -181,13 +181,28 @@ gst_esdsink_open (GstAudioSink * asink)
|
||||||
esd_server_info_t *server_info;
|
esd_server_info_t *server_info;
|
||||||
GstPadTemplate *pad_template;
|
GstPadTemplate *pad_template;
|
||||||
GstEsdSink *esdsink;
|
GstEsdSink *esdsink;
|
||||||
|
gchar *saved_env;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
esdsink = GST_ESDSINK (asink);
|
esdsink = GST_ESDSINK (asink);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (esdsink, "open");
|
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);
|
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)
|
if (esdsink->ctrl_fd < 0)
|
||||||
goto couldnt_connect;
|
goto couldnt_connect;
|
||||||
|
|
||||||
|
@ -434,7 +449,7 @@ gst_esdsink_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
gboolean
|
gboolean
|
||||||
gst_esdsink_factory_init (GstPlugin * plugin)
|
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))
|
GST_TYPE_ESDSINK))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue