[FFmpeg-devel] [PATCH] lavu/dict.h: apply various fixes/extensions to doxy
Clément Bœsch
u at pkh.me
Thu Nov 21 12:46:32 CET 2013
On Wed, Nov 20, 2013 at 05:44:55PM +0100, Stefano Sabatini wrote:
> In particular, document AV_DICT_MATCH_CASE, AV_DICT_IGNORE_SUFFIX, and
> extend documentation for av_dict_get().
> ---
> libavutil/dict.h | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/libavutil/dict.h b/libavutil/dict.h
> index 38f03a4..1381bcb 100644
> --- a/libavutil/dict.h
> +++ b/libavutil/dict.h
> @@ -64,12 +64,13 @@
> *
> */
>
> -#define AV_DICT_MATCH_CASE 1
> -#define AV_DICT_IGNORE_SUFFIX 2
> +#define AV_DICT_MATCH_CASE 1 /**< Only get an entry with exact-case key match. Only relevant in av_dict_get(). */
> +#define AV_DICT_IGNORE_SUFFIX 2 /**< Return first entry in a dictionary whose first part corresponds to the search key,
> + ignoring the suffix of the found key string. Only relevant in av_dict_get(). */
> #define AV_DICT_DONT_STRDUP_KEY 4 /**< Take ownership of a key that's been
> - allocated with av_malloc() and children. */
> + allocated with av_malloc() or another memory allocation function. */
> #define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been
> - allocated with av_malloc() and chilren. */
> + allocated with av_malloc() or another memory allocation function. */
Did you check if this allocation was correct btw? Since we can't mix our malloc & realloc...
> #define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.
> #define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
> delimiter is added, the strings are simply concatenated. */
> @@ -84,8 +85,12 @@ typedef struct AVDictionary AVDictionary;
> /**
> * Get a dictionary entry with matching key.
> *
> + * To iterate through all the dictionary entries, you can set the matching key
> + * to the null string "" and set the AV_DICT_IGNORE_SUFFIX flag.
> + *
> * @param prev Set to the previous matching element to find the next.
> * If set to NULL the first matching element is returned.
> + * @param key matching key.
> * @param flags Allows case as well as suffix-insensitive comparisons.
> * @return Found entry or NULL, changing key or value leads to undefined behavior.
> */
Should be OK otherwise
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131121/757899b8/attachment.asc>
More information about the ffmpeg-devel
mailing list