'Twas brillig, and Lennart Poettering at 19/04/10 04:11 did gyre and gimble: > On Thu, 15.04.10 09:05, Colin Guthrie (gmane at colin.guthr.ie) wrote: > >> Hi Lennart, >> >> I've looked at the API, but maybe I was too drunk... >> >> Is there any way that I can get a subscription callback or similar when >> a stream is corked? Due to the nature of this integration, the playback >> stream itself is actually hidden from me... so I cannot check >> pa_stream_is_corked() or anything like that. > > We currently expose no information about that, but we probably could add > that to the sink_input_info data. How does this work with API/ABI stability? Do you have to do a version check in the client code? >> Ideally it would just be another subscription that I could subscribe to. >> >> Is this possible? If not, is there a reason it's not, and if there is no >> reason, would you mind if I implemented it :) > > What would you use this for? Well presently it's something I want to do for Phonon. Due to the way it works I have a PA "control" connection in phonon itself but deligate to the backend itself to do the actual audio streaming/decoding/playback. All I do is force the backend to use it's "pulse" output. This allows me to get nice integration with PA without having to code it into all the backends themselves (and by "backends" I mean the phonon code, not the gstreamer, vlc, mplayer or xine code etc.). While this is a round about route to do it, it works quite well in practice. What I want to do now is change the phonon state to "paused" whenever a cork request comes in. This will allow all phonon apps to work "as intended" WRT corking (another reason to disable module-x11-cork-request by default) So in order to do this, I need to be able to get the cork notification from my "control" connection and take action. I wouldn't be in the least bit offended or surprised if you call this a hack :p I'm not sure I can think of any other use cases for the info at present, but there's bound to be one :p Col PS more info on how the phonon stuff works: http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/ -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]