How to use pa_sink_input_kill( )?

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

 



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




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

  Powered by Linux