After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 346665 - API: sound server interface
API: sound server interface
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 343051
 
 
Reported: 2006-07-05 15:56 UTC by Tim-Philipp Müller
Modified: 2006-07-24 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed addition of a GstSoundServer interface (7.02 KB, patch)
2006-07-05 15:59 UTC, Tim-Philipp Müller
none Details | Review
updated patch (7.32 KB, patch)
2006-07-11 10:11 UTC, Tim-Philipp Müller
rejected Details | Review

Description Tim-Philipp Müller 2006-07-05 15:56:13 UTC
It would be nice to have an interface for elements interoperating with sound servers.

Two methods seem particularly useful (for autoaudiosink for example, see bug #343051):

 - sound_server_is_running()
   to check whether a server is running currently

 - sound_server_is_requested()
   to check whether the user explicitely requested to use a
   sound server (e.g. by setting environment variables)

It seems cleaner to me to do this with an interface (compared to using object properties).

Proposed patch attached.

Not sure if it should be GstSoundServer or GstSoundServerControl or GstSoundServerInfo or whatever, GstSoundServer seems most flexible though (and is the shortest).

There might be a better name for the is_requested() method as well, but I can't think of one right now.
Comment 1 Tim-Philipp Müller 2006-07-05 15:59:39 UTC
Created attachment 68411 [details] [review]
proposed addition of a GstSoundServer interface
Comment 2 Tim-Philipp Müller 2006-07-11 10:11:21 UTC
Created attachment 68767 [details] [review]
updated patch

Same as previous patch, but:

 - renamed is_requested() => is_requested_by_user()
 - added use case for is_requested_by_user() to docs
Comment 3 Tim-Philipp Müller 2006-07-24 10:17:04 UTC
So, any comments?  Is it okay to commit this?  Or should this be solved differently?
Comment 4 Michael Smith 2006-07-24 10:35:08 UTC
As discussed on irc, I think this is pretty broken, if we don't start sound servers ourselves. Further, I think ever, under any circumstances, starting a sound server ourselves, is even more broken.

Given that latter assumption:
1) is_running is roughly equivalent to "can I open this hardware audio device?"
2) is_requested_by_user is never useful.

Starting the sound daemon is something that should be done either system-wide (init scripts, or whatever), or session-wide (by gnome-session, etc.). Despite the brokenness of esd, which likes to start itself, this is NOT sensible behaviour.

Comment 5 Tim-Philipp Müller 2006-07-24 11:11:17 UTC
The entire point of this API was to prevent accidentally starting a sound server during auto-probing.

The assumption I was operating under was that it is impossible for us to prevent libesound from starting a daemon in all cases. It seems this is not true and we can probably prevent that from happening using the ESD_NO_SPAWN environment variable.

Hence, this API doesn't seem needed any longer, at least not for now.

(and FWIW _is_requested_by_user() was useful in the context of the assumptions I was operating under ;))