mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -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
|
|
@ -996,7 +996,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
|
|||
|
||||
while (!pa_tagstruct_eof(t)) {
|
||||
pa_sink_input_info i;
|
||||
pa_bool_t mute = FALSE;
|
||||
pa_bool_t mute = FALSE, corked = FALSE;
|
||||
|
||||
pa_zero(i);
|
||||
i.proplist = pa_proplist_new();
|
||||
|
|
@ -1014,7 +1014,8 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
|
|||
pa_tagstruct_gets(t, &i.resample_method) < 0 ||
|
||||
pa_tagstruct_gets(t, &i.driver) < 0 ||
|
||||
(o->context->version >= 11 && pa_tagstruct_get_boolean(t, &mute) < 0) ||
|
||||
(o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
|
||||
(o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0) ||
|
||||
(o->context->version >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0)) {
|
||||
|
||||
pa_context_fail(o->context, PA_ERR_PROTOCOL);
|
||||
pa_proplist_free(i.proplist);
|
||||
|
|
@ -1022,6 +1023,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
|
|||
}
|
||||
|
||||
i.mute = (int) mute;
|
||||
i.corked = (int) corked;
|
||||
|
||||
if (o->callback) {
|
||||
pa_sink_input_info_cb_t cb = (pa_sink_input_info_cb_t) o->callback;
|
||||
|
|
@ -1091,6 +1093,7 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c
|
|||
|
||||
while (!pa_tagstruct_eof(t)) {
|
||||
pa_source_output_info i;
|
||||
pa_bool_t corked = FALSE;
|
||||
|
||||
pa_zero(i);
|
||||
i.proplist = pa_proplist_new();
|
||||
|
|
@ -1106,13 +1109,16 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c
|
|||
pa_tagstruct_get_usec(t, &i.source_usec) < 0 ||
|
||||
pa_tagstruct_gets(t, &i.resample_method) < 0 ||
|
||||
pa_tagstruct_gets(t, &i.driver) < 0 ||
|
||||
(o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0)) {
|
||||
(o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0) ||
|
||||
(o->context->version >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0)) {
|
||||
|
||||
pa_context_fail(o->context, PA_ERR_PROTOCOL);
|
||||
pa_proplist_free(i.proplist);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
i.corked = (int) corked;
|
||||
|
||||
if (o->callback) {
|
||||
pa_source_output_info_cb_t cb = (pa_source_output_info_cb_t) o->callback;
|
||||
cb(o->context, &i, 0, o->userdata);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue