diff options
Diffstat (limited to 'src/pulse/format.h')
-rw-r--r-- | src/pulse/format.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pulse/format.h b/src/pulse/format.h index 821149caf..b8b829ef4 100644 --- a/src/pulse/format.h +++ b/src/pulse/format.h @@ -62,6 +62,9 @@ typedef enum pa_encoding { /** 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; +/** Converts a string of the form returned by \a pa_encoding_to_string() back to a \a pa_encoding_t. \since 1.0 */ +pa_encoding_t pa_encoding_from_string(const char *encoding); + /**< 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; @@ -105,6 +108,10 @@ int pa_format_info_is_compatible(pa_format_info *first, pa_format_info *second); /** 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); +/** Parse a human-readable string of the form generated by + * \a pa_format_info_snprint() into a pa_format_info structure. \since 1.0 */ +pa_format_info* pa_format_info_from_string(const char *str); + /** Sets an integer property on the given format info */ void pa_format_info_set_prop_int(pa_format_info *f, const char *key, int value); /** Sets a property with a list of integer values on the given format info */ |