diff options
| author | Colin Guthrie <cguthrie@mandriva.org> | 2010-10-04 11:48:43 +0100 | 
|---|---|---|
| committer | Colin Guthrie <cguthrie@mandriva.org> | 2010-10-06 09:17:01 +0100 | 
| commit | 3de129f3ac8dd6cf51178b266837db4d5e4a1215 (patch) | |
| tree | 6eb09c59928b9748fdba6dd170c0ed75714e6f61 /src/pulse/introspect.c | |
| parent | 5e442f4e0e6937c72997a9b9b66bf931b141ed0a (diff) | |
introspect: Include whether a stream is corked in the info callback.
Diffstat (limited to 'src/pulse/introspect.c')
| -rw-r--r-- | src/pulse/introspect.c | 12 | 
1 files changed, 9 insertions, 3 deletions
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 100413ee..2a817881 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -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);  | 
