count corked streams per sink/source and make pa_sink_used_by() return only the number of streams that are not corked. Introduce pa_sink_linked_by() returning the number of streams connected at all. This will allow suspending of sinks/sources when all streams connected to a sink are corked.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1824 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-09-15 14:21:05 +00:00
parent 5ae4eed52e
commit 8389264d65
7 changed files with 64 additions and 7 deletions

View file

@ -385,7 +385,7 @@ static void sink_input_detach_cb(pa_sink_input *i) {
o->rtpoll_item = NULL;
if (o->userdata->master == o)
pa_sink_detach_from_thread(o->userdata->sink);
pa_sink_detach_within_thread(o->userdata->sink);
}
/* Called from main context */