diff options
author | Colin Guthrie <colin@mageia.org> | 2011-05-16 22:15:57 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-06-22 21:55:27 +0100 |
commit | fdf3a0881445560e962924a02319fc5cd2506231 (patch) | |
tree | 48f95613887f873dbbc225a90697d4ba9ac772d9 /src/utils | |
parent | 5d35375aa758fde7d9f3d6467e2506aca9784597 (diff) |
introspect: Get formats for sources
This gets the list of supported formats for a source in
pa_context_get_source_info*(). Also prints these in 'pactl list'.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/pactl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/utils/pactl.c b/src/utils/pactl.c index 7be7049f..894f8f7e 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -333,7 +333,8 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int cvdb[PA_SW_CVOLUME_SNPRINT_DB_MAX], v[PA_VOLUME_SNPRINT_MAX], vdb[PA_SW_VOLUME_SNPRINT_DB_MAX], - cm[PA_CHANNEL_MAP_SNPRINT_MAX]; + cm[PA_CHANNEL_MAP_SNPRINT_MAX], + f[PA_FORMAT_INFO_SNPRINT_MAX]; char *pl; if (is_last < 0) { @@ -418,6 +419,14 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int if (i->active_port) printf(_("\tActive Port: %s\n"), i->active_port->name); + + if (i->formats) { + uint8_t j; + + printf(_("\tFormats:\n")); + for (j = 0; j < i->n_formats; j++) + printf("\t\t%s\n", pa_format_info_snprint(f, sizeof(f), i->formats[j])); + } } static void get_module_info_callback(pa_context *c, const pa_module_info *i, int is_last, void *userdata) { |