diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-11-16 03:45:07 +0300 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-11-21 03:25:54 +0300 |
commit | ab922f9ef1e4d7ec220867d3de1fb1a5aa71faee (patch) | |
tree | c20d3fcc1ece3098794fbf28f093aae8501ccd2a /libavutil/dict.h | |
parent | 7d75a399a4d216ea3d924d6e8c18868731d93132 (diff) |
lavu/dict: add av_dict_get_string
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavutil/dict.h')
-rw-r--r-- | libavutil/dict.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/dict.h b/libavutil/dict.h index 9b3381b828..34fe53af51 100644 --- a/libavutil/dict.h +++ b/libavutil/dict.h @@ -172,6 +172,24 @@ void av_dict_copy(AVDictionary **dst, FF_CONST_AVUTIL53 AVDictionary *src, int f void av_dict_free(AVDictionary **m); /** + * Get dictionary entries as a string. + * + * Create a string containing dictionary's entries. + * Such string may be passed back to av_dict_parse_string(). + * @note String is escaped with backslashes ('\'). + * + * @param[in] m dictionary + * @param[out] buffer Pointer to buffer that will be allocated with string containg entries. + * Buffer must be freed by the caller when is no longer needed. + * @param[in] key_val_sep character used to separate key from value + * @param[in] pairs_sep character used to separate two pairs from each other + * @return >= 0 on success, negative on error + * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. + */ +int av_dict_get_string(const AVDictionary *m, char **buffer, + const char key_val_sep, const char pairs_sep); + +/** * @} */ |