diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-03-02 01:38:38 +0530 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2011-03-02 11:17:32 +0000 |
commit | 3f6eb652cba802227f292c207ba9f00a2e4321d7 (patch) | |
tree | f41a8e38c6df950d89121263120b6e0359e630d3 | |
parent | 0d1e53e30a7a984657a6599fb2978e9cdd4c6bb5 (diff) |
introspect: Client-side implementation for has_volume/read_only_volume
This completes the client-side changes to the protocol extension
introduced by commit 99ddca89cdca9b0b92ab9870764f9211e6a82e31
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/pulse/introspect.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 21dae308..2171089b 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ AC_SUBST(PA_MAJORMINOR, pa_major.pa_minor) AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/]) AC_SUBST(PA_API_VERSION, 12) -AC_SUBST(PA_PROTOCOL_VERSION, 19) +AC_SUBST(PA_PROTOCOL_VERSION, 20) # The stable ABI for client applications, for the version info x:y:z # always will hold y=z diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 2a817881..35e091a8 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, corked = FALSE; + pa_bool_t mute = FALSE, corked = FALSE, has_volume = FALSE, read_only_volume = FALSE; pa_zero(i); i.proplist = pa_proplist_new(); @@ -1015,7 +1015,9 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm 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 >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0)) { + (o->context->version >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0) || + (o->context->version >= 20 && (pa_tagstruct_get_boolean(t, &has_volume) < 0 || + pa_tagstruct_get_boolean(t, &read_only_volume) < 0))) { pa_context_fail(o->context, PA_ERR_PROTOCOL); pa_proplist_free(i.proplist); @@ -1024,6 +1026,8 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm i.mute = (int) mute; i.corked = (int) corked; + i.has_volume = (int) has_volume; + i.read_only_volume = (int) read_only_volume; if (o->callback) { pa_sink_input_info_cb_t cb = (pa_sink_input_info_cb_t) o->callback; |