[pulseaudio-discuss] Pause a audio stream

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Dec 13 21:46:26 PST 2013


On Wed, 2013-12-11 at 15:28 +0530, sathishkumar sivagurunathan wrote:
> >
> > Hi,
> >
> >
> >
> > I have been trying to look into pulse audio to find if it is possible
> only to cork a stream (No priority handling).
> >
> >
> >
> > My requirement is
> >
> >
> >
> > 1)      I have a routing policy manager which would like to cork/pause a
> stream. No priority is involved in this usecase. Is it this possible with
> Pulse Audio.

Only the application that created the stream can cork it. External
policy managers can't do that. This may change in the future, but don't
count on that. If you want to implement a policy for corking streams,
you have to do that in a PulseAudio module.

> > 2)      I had looked at module-role-cork but it looks it implements both
> cork and uncorking. But is it possible to have separate C API’s, one to
> cork/pause and one to uncork/unpause..

What API's are you talking about? module-role-cork isn't an API.

> > I have tried to look at protocol-native.c and found a function named
> “command-cork-playback-stream”. Can you briefly tell what’s the use of this
> function ?

command_cork_playback_stream() in protocol-native.c handles the cork
command that comes from the client.

> > I understand that it will be finally that the application that has to
> implement the pause.  Does this function “command-cork-playback-stream”
> communicate to the above media player application like “module-role-cork” ??

module-role-cork sends a cork request to the application, and if the
application honors that request, it will send a cork command back to the
server, and command_cork_playback_stream() handles that command and
calls pa_sink_input_cork().

-- 
Tanu



More information about the pulseaudio-discuss mailing list