mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-23 06:59:53 -05:00
use single array for storing pa_core hook lists, add sink state changed hook, drop NO_HOOKS flags for sink inputs/source outputs, listen for resume events in module-suspend-on-idle.c
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1640 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a3cd8002b5
commit
50e014e7a9
11 changed files with 103 additions and 92 deletions
|
|
@ -98,9 +98,8 @@ pa_sink_input* pa_sink_input_new(
|
|||
pa_assert(core);
|
||||
pa_assert(data);
|
||||
|
||||
if (!(flags & PA_SINK_INPUT_NO_HOOKS))
|
||||
if (pa_hook_fire(&core->hook_sink_input_new, data) < 0)
|
||||
return NULL;
|
||||
if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SINK_INPUT_NEW], data) < 0)
|
||||
return NULL;
|
||||
|
||||
pa_return_null_if_fail(!data->driver || pa_utf8_valid(data->driver));
|
||||
pa_return_null_if_fail(!data->name || pa_utf8_valid(data->name));
|
||||
|
|
@ -249,7 +248,7 @@ void pa_sink_input_disconnect(pa_sink_input *i) {
|
|||
pa_assert(i);
|
||||
pa_return_if_fail(i->state != PA_SINK_INPUT_DISCONNECTED);
|
||||
|
||||
pa_hook_fire(&i->sink->core->hook_sink_input_disconnect, i);
|
||||
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_DISCONNECT], i);
|
||||
|
||||
if (i->sync_prev)
|
||||
i->sync_prev->sync_next = i->sync_next;
|
||||
|
|
@ -273,7 +272,7 @@ void pa_sink_input_disconnect(pa_sink_input *i) {
|
|||
i->get_latency = NULL;
|
||||
i->underrun = NULL;
|
||||
|
||||
pa_hook_fire(&i->sink->core->hook_sink_input_disconnect_post, i);
|
||||
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_DISCONNECT_POST], i);
|
||||
i->sink = NULL;
|
||||
pa_sink_input_unref(i);
|
||||
}
|
||||
|
|
@ -313,7 +312,7 @@ void pa_sink_input_put(pa_sink_input *i) {
|
|||
pa_sink_update_status(i->sink);
|
||||
|
||||
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, i->index);
|
||||
pa_hook_fire(&i->sink->core->hook_sink_input_new_post, i);
|
||||
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_PUT], i);
|
||||
}
|
||||
|
||||
void pa_sink_input_kill(pa_sink_input*i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue