Pause a audio stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Tanu for the reply,

I have been trying to some simple analysis for the past on  this question
below I raised before you last time..

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.

Tanu, I understand that it is possible only by the application to cork the
stream. I really tried using the "module-role-cork" module.
But I couldn't fit it into my need for having called from my policy
manager..

Hence, I was trying to go through the code if something different can be
done. I had presented my analysis to you. Glad to hear your comments on
it..

My idea is (though my analysis might not be perfect) :-

1) I looked at the available C API's that are available in Instrospect.c.
It houses the C API's to be called for muting, changing volume etc.
Is it possible to add a function to this Introspect.c for pause
functionality.

2) I also saw that C API's in Introspect.c like called functions in
protocol-native.c to execute the functionality.
    Example:- *pa_context_set_sink_mute_by_index* function in Introspect.c
calls *command_set_mute *in protocol-native.c.

3) Hence is it possible to write a new function for pause say "
*pa_context_set_sink_input_pause*" in Introspect.c and call "
*command_set_pause*" in protocol-native.c.

4) This new function "*command_set_pause*" in protocol-native.c calls
into "*pa_sink_input_send_event"
*in sink-input.c and henceforth the event is relayed to the application for
pausing.

5) Indeed I am just trying to use the same chain of command followed by "
*module-role-cork*" module to relay command which is
   * module-role-cork* -> *pa_sink_input_send_event*  in sink-input.c ->
*sink_input_send_event_cb* in protocol-native.c -> Application --> which
instructs to pause.

6) I am just to come from the Introspect.c side..
   *pa_context_set_sink_input_pause *in Introspect.c ->  *command_set_pause
*in protocol-native.c -> *pa_sink_input_send_event*  in sink-input.c ->
*sink_input_send_event_cb* in protocol-native.c -> Application --> which
instructs to pause.

My questions are:-

Is this feasible.. I am asking this because i trying to connect as a client
and do it. And you had mentioned that client would be allowed to do such a
thing..

Looking for direction from your side!!

Thanks,
Sathish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20131214/73ff9938/attachment.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux