Loading...
Searching...
No Matches
dict.h File Reference

Public dictionary API. More...

`#include <stdint.h>`

Go to the source code of this file.

## Data Structures

struct | AVDictionaryEntry

## Macros

AVDictionary Flags
Flags that influence behavior of the matching of keys or insertion to the dictionary.
#define | AV_DICT_MATCH_CASE 1
| Only get an entry with exact-case key match.
#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.
#define | AV_DICT_DONT_STRDUP_KEY 4
| Take ownership of a key that's been 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() or another memory allocation function.
#define | AV_DICT_DONT_OVERWRITE 16
| Don't overwrite existing entries.
#define | AV_DICT_APPEND 32
| If the entry already exists, append to it.
#define | AV_DICT_MULTIKEY 64
| Allow to store several equal keys in the dictionary.
#define | AV_DICT_DEDUP 128
| If inserting a value that already exists for a key, do nothing.

## Typedefs

typedef struct AVDictionary | AVDictionary

## Functions

AVDictionaryEntry * | av_dict_get (const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
| Get a dictionary entry with matching key.
const AVDictionaryEntry * | av_dict_iterate (const AVDictionary *m, const AVDictionaryEntry *prev)
| Iterate over a dictionary.
int | av_dict_count (const AVDictionary *m)
| Get number of entries in dictionary.
int | av_dict_set (AVDictionary **pm, const char *key, const char *value, int flags)
| Set the given entry in *pm, overwriting an existing entry.
int | av_dict_set_int (AVDictionary **pm, const char *key, int64_t value, int flags)
| Convenience wrapper for av_dict_set() that converts the value to a string and stores it.
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.
int | av_dict_copy (AVDictionary **dst, const AVDictionary *src, int flags)
| Copy entries from one AVDictionary struct into another.
void | av_dict_free (AVDictionary **m)
| Free all the memory allocated for an AVDictionary struct and all keys and values.
int | av_dict_get_string (const AVDictionary *m, char **buffer, const char key_val_sep, const char pairs_sep)
| Get dictionary entries as a string.

## Detailed Description

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.

Definition in file dict.h.