[pulseaudio-discuss] How to use pa_sink_input_kill( )?
Arun Raghavan
arun.raghavan at collabora.co.uk
Wed Aug 3 20:20:56 PDT 2011
On Thu, 2011-08-04 at 10:40 +0800, Lin, Mengdong wrote:
> >When shall I use this function instead of
> pa_sink_input_assert_unref() to destroy a sink input object?
>
>
>
> I made a spelling mistake. I mean pa_sink_input_ unref() not
> pa_sink_input_assert_unref().
>
> So my question is: When shall I use pa_sink_input_kill() instead of
> pa_sink_input_ unref() to destroy a sink input object?
pa_sink_input_kill() signals that you want to disconnect the sink-input
from the sink and signal to the creator of the sink-input that this is
being done (so, for example, protocol-native.c will clean up client
streams when this happens.
pa_sink_input_unref() is only for managing the object lifetime -- you
will have matching refs and unrefs around code that is storing pointers
to the sink-input. It would be incorrect to try to try to kill the
sink-input by driving down the refcount out of turn.
Hope this helps,
Arun
More information about the pulseaudio-discuss
mailing list