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
int av_dict_copy(AVDictionary** dst, const(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(const(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(const(AVDictionary)* m, const(char)* key, const(AVDictionaryEntry)* prev, int flags)

Get a dictionary entry with matching key.

av_dict_get_string
int av_dict_get_string(const(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, const(char)* str, const(char)* key_val_sep, const(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, const(char)* key, const(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, const(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() or another memory allocation function.

AV_DICT_DONT_STRDUP_VAL
enum AV_DICT_DONT_STRDUP_VAL;

< Take ownership of a value that's been allocated with av_malloc() or another memory allocation function.

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;

AV_DICT_MULTIKEY
enum AV_DICT_MULTIKEY;

< Allow to store several equal keys in the dictionary

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