diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-03-08 20:15:36 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-05-02 11:55:38 +0530 |
commit | 8631f4e2c44b47db76795bebdbab54914a1f3ea0 (patch) | |
tree | 2f42ff9e46091f41b44864b1a4c512e75d6093ba /src/pulse/format.h | |
parent | a3a004214404c6f91a82c1e2164444e5e08c26cf (diff) |
format: Add some convenience functions for printing
Diffstat (limited to 'src/pulse/format.h')
-rw-r--r-- | src/pulse/format.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pulse/format.h b/src/pulse/format.h index 03b34059..51c9426c 100644 --- a/src/pulse/format.h +++ b/src/pulse/format.h @@ -53,6 +53,9 @@ typedef enum pa_encoding { /**< Represents an invalid encoding */ } pa_encoding_t; +/** Returns a printable string representing the given encoding type. \since 1.0 */ +const char *pa_encoding_to_string(pa_encoding_t e) PA_GCC_CONST; + /**< Represents the format of data provided in a stream or processed by a sink. \since 1.0 */ typedef struct pa_format_info { pa_encoding_t encoding; @@ -77,6 +80,16 @@ int pa_format_info_valid(const pa_format_info *f); /** Returns non-zero when the format info structure represents a PCM (i.e. uncompressed data) format */ int pa_format_info_is_pcm(const pa_format_info *f); +/** Maximum required string length for + * pa_format_info_snprint(). Please note that this value can change + * with any release without warning and without being considered API + * or ABI breakage. You should not use this definition anywhere where + * it might become part of an ABI. \since 1.0 */ +#define PA_FORMAT_INFO_SNPRINT_MAX 256 + +/** Return a human-readable string representing the given format. \since 1.0 */ +char *pa_format_info_snprint(char *s, size_t l, const pa_format_info *f); + PA_C_DECL_END #endif |