summaryrefslogtreecommitdiffstats
path: root/src/utils/pactl.c
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-03-08 23:31:59 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-02 11:55:39 +0530
commit7aa84e82089a88a542f15cbf6f38c808b4f04db1 (patch)
treea61f118cfdf6c6b9a249cc1d40dd4108d62f1ab6 /src/utils/pactl.c
parent322980e2e3844abf837dcc8cc5317406b3d8cb94 (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/utils/pactl.c')
-rw-r--r--src/utils/pactl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 109d31b9..7be7049f 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -560,7 +560,7 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_
}
static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info *i, int is_last, void *userdata) {
- char t[32], k[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char t[32], k[32], s[PA_SAMPLE_SPEC_SNPRINT_MAX], cv[PA_CVOLUME_SNPRINT_MAX], cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX], f[PA_FORMAT_INFO_SNPRINT_MAX];
char *pl;
if (is_last < 0) {
@@ -600,6 +600,7 @@ static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info
"\tSink: %u\n"
"\tSample Specification: %s\n"
"\tChannel Map: %s\n"
+ "\tFormat: %s\n"
"\tMute: %s\n"
"\tVolume: %s\n"
"\t %s\n"
@@ -615,6 +616,7 @@ static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info
i->sink,
pa_sample_spec_snprint(s, sizeof(s), &i->sample_spec),
pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map),
+ pa_format_info_snprint(f, sizeof(f), i->format),
pa_yes_no(i->mute),
pa_cvolume_snprint(cv, sizeof(cv), &i->volume),
pa_sw_cvolume_snprint_dB(cvdb, sizeof(cvdb), &i->volume),