diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-03-08 23:31:59 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-05-02 11:55:39 +0530 |
commit | 7aa84e82089a88a542f15cbf6f38c808b4f04db1 (patch) | |
tree | a61f118cfdf6c6b9a249cc1d40dd4108d62f1ab6 /src/pulse/introspect.c | |
parent | 322980e2e3844abf837dcc8cc5317406b3d8cb94 (diff) |
introspect: Get format of sink input
This gets the negotiated format of sink inputs in
pa_context_get_sink_input*(). Also prints the format in 'pactl list'.
Diffstat (limited to 'src/pulse/introspect.c')
-rw-r--r-- | src/pulse/introspect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 28a6bf4a..e28a78c4 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -1033,6 +1033,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm pa_zero(i); i.proplist = pa_proplist_new(); + i.format = pa_format_info_new(); if (pa_tagstruct_getu32(t, &i.index) < 0 || pa_tagstruct_gets(t, &i.name) < 0 || @@ -1050,10 +1051,12 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm (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 >= 20 && (pa_tagstruct_get_boolean(t, &has_volume) < 0 || - pa_tagstruct_get_boolean(t, &volume_writable) < 0))) { + pa_tagstruct_get_boolean(t, &volume_writable) < 0)) || + (o->context->version >= 21 && pa_tagstruct_get_format_info(t, i.format) < 0)) { pa_context_fail(o->context, PA_ERR_PROTOCOL); pa_proplist_free(i.proplist); + pa_format_info_free(i.format); goto finish; } @@ -1068,6 +1071,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm } pa_proplist_free(i.proplist); + pa_format_info_free(i.format); } } |