mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
introspect: Include whether a stream is corked in the info callback.
This commit is contained in:
parent
5e442f4e0e
commit
3de129f3ac
7 changed files with 31 additions and 6 deletions
|
|
@ -3079,6 +3079,8 @@ static void sink_input_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t,
|
|||
pa_tagstruct_put_boolean(t, pa_sink_input_get_mute(s));
|
||||
if (c->version >= 13)
|
||||
pa_tagstruct_put_proplist(t, s->proplist);
|
||||
if (c->version >= 19)
|
||||
pa_tagstruct_put_boolean(t, (pa_sink_input_get_state(s) == PA_SINK_INPUT_CORKED));
|
||||
}
|
||||
|
||||
static void source_output_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_source_output *s) {
|
||||
|
|
@ -3101,9 +3103,10 @@ static void source_output_fill_tagstruct(pa_native_connection *c, pa_tagstruct *
|
|||
pa_tagstruct_put_usec(t, source_latency);
|
||||
pa_tagstruct_puts(t, pa_resample_method_to_string(pa_source_output_get_resample_method(s)));
|
||||
pa_tagstruct_puts(t, s->driver);
|
||||
|
||||
if (c->version >= 13)
|
||||
pa_tagstruct_put_proplist(t, s->proplist);
|
||||
if (c->version >= 19)
|
||||
pa_tagstruct_put_boolean(t, (pa_source_output_get_state(s) == PA_SOURCE_OUTPUT_CORKED));
|
||||
}
|
||||
|
||||
static void scache_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_scache_entry *e) {
|
||||
|
|
|
|||
|
|
@ -470,6 +470,9 @@ static void sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state)
|
|||
|
||||
for (ssync = i->sync_next; ssync; ssync = ssync->sync_next)
|
||||
pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], ssync);
|
||||
|
||||
if (PA_SINK_INPUT_IS_LINKED(state))
|
||||
pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
|
||||
}
|
||||
|
||||
pa_sink_update_status(i->sink);
|
||||
|
|
|
|||
|
|
@ -291,9 +291,13 @@ static void source_output_set_state(pa_source_output *o, pa_source_output_state_
|
|||
update_n_corked(o, state);
|
||||
o->state = state;
|
||||
|
||||
if (state != PA_SOURCE_OUTPUT_UNLINKED)
|
||||
if (state != PA_SOURCE_OUTPUT_UNLINKED) {
|
||||
pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], o);
|
||||
|
||||
if (PA_SOURCE_OUTPUT_IS_LINKED(state))
|
||||
pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
|
||||
}
|
||||
|
||||
pa_source_update_status(o->source);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue