ffmpeg.libavutil.dict

@file Public dictionary API. @deprecated AVDictionary is provided for compatibility with libav. It is both in implementation as well as API inefficient. It does not scale and is extremely slow with large dictionaries. It is recommended that new code uses our tree container from tree.c/h where applicable, which uses AVL trees to achieve O(log n) performance.

Members

Functions

av_dict_copy
void av_dict_copy(AVDictionary** dst, AVDictionary* src, int flags)

Copy entries from one AVDictionary struct into another. @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst @param src pointer to source AVDictionary struct @param flags flags to use when setting entries in *dst @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag @return 0 on success, negative AVERROR code on failure. If dst was allocated by this function, callers should free the associated memory.

av_dict_count
int av_dict_count(AVDictionary* m)

Get number of entries in dictionary.

av_dict_free
void av_dict_free(AVDictionary** m)

Free all the memory allocated for an AVDictionary struct and all keys and values.

av_dict_get
AVDictionaryEntry* av_dict_get(AVDictionary* m, char* key, AVDictionaryEntry* prev, int flags)

Get a dictionary entry with matching key.

av_dict_get_string
int av_dict_get_string(AVDictionary* m, char** buffer, char key_val_sep, char pairs_sep)

Get dictionary entries as a string.

av_dict_parse_string
int av_dict_parse_string(AVDictionary** pm, char* str, char* key_val_sep, char* pairs_sep, int flags)

Parse the key/value pairs list and add the parsed entries to a dictionary.

av_dict_set
int av_dict_set(AVDictionary** pm, char* key, char* value, int flags)

Set the given entry in *pm, overwriting an existing entry.

av_dict_set_int
int av_dict_set_int(AVDictionary** pm, char* key, long value, int flags)

Convenience wrapper for av_dict_set that converts the value to a string and stores it.

Manifest constants

AV_DICT_APPEND
enum AV_DICT_APPEND;

< If the entry already exists, append to it. Note that no delimiter is added, the strings are simply concatenated.

AV_DICT_DONT_OVERWRITE
enum AV_DICT_DONT_OVERWRITE;

< Don't overwrite existing entries.

AV_DICT_DONT_STRDUP_KEY
enum AV_DICT_DONT_STRDUP_KEY;

< Take ownership of a key that's been allocated with av_malloc() and children.

AV_DICT_DONT_STRDUP_VAL
enum AV_DICT_DONT_STRDUP_VAL;

< Take ownership of a value that's been allocated with av_malloc() and chilren.

AV_DICT_IGNORE_SUFFIX
enum AV_DICT_IGNORE_SUFFIX;

< 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().

AV_DICT_MATCH_CASE
enum AV_DICT_MATCH_CASE;

* @addtogroup lavu_dict AVDictionary * @ingroup lavu_data * * @brief Simple key:value store * * @{ * Dictionaries are used for storing key:value pairs. To create * an AVDictionary, simply pass an address of a NULL pointer to * av_dict_set(). NULL can be used as an empty dictionary wherever * a pointer to an AVDictionary is required. * Use av_dict_get() to retrieve an entry or iterate over all * entries and finally av_dict_free() to free the dictionary * and all its contents. * @code AVDictionary *d = NULL; // "create" an empty dictionary AVDictionaryEntry *t = NULL;

Structs

AVDictionary
struct AVDictionary
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
AVDictionaryEntry
struct AVDictionaryEntry
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta