Public dictionary API.
More...
Go to the source code of this file.
Data Structures |
struct | AVDictionaryEntry |
Defines |
#define | AV_DICT_MATCH_CASE 1 |
#define | AV_DICT_IGNORE_SUFFIX 2 |
#define | AV_DICT_DONT_STRDUP_KEY 4 |
#define | AV_DICT_DONT_STRDUP_VAL 8 |
#define | AV_DICT_DONT_OVERWRITE 16 |
| Don't overwrite existing entries.
|
#define | AV_DICT_APPEND 32 |
| If the entry already exists, append to it.
|
Typedefs |
typedef struct AVDictionary | AVDictionary |
Functions |
AVDictionaryEntry * | av_dict_get (AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags) |
| Get a dictionary entry with matching key.
|
int | av_dict_set (AVDictionary **pm, const char *key, const char *value, int flags) |
| Set the given entry in *pm, overwriting an existing entry.
|
void | av_dict_copy (AVDictionary **dst, 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.
|
Detailed Description
Public dictionary API.
Definition in file dict.h.
Define Documentation
#define AV_DICT_APPEND 32 |
If the entry already exists, append to it.
Note that no delimiter is added, the strings are simply concatenated.
Definition at line 33 of file dict.h.
#define AV_DICT_DONT_OVERWRITE 16 |
Don't overwrite existing entries.
Definition at line 32 of file dict.h.
#define AV_DICT_DONT_STRDUP_KEY 4 |
#define AV_DICT_DONT_STRDUP_VAL 8 |
#define AV_DICT_IGNORE_SUFFIX 2 |
#define AV_DICT_MATCH_CASE 1 |
Typedef Documentation
Function Documentation
Copy entries from one AVDictionary struct into another.
- Parameters:
-
| 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 |
| src | pointer to source AVDictionary struct |
| flags | flags to use when setting entries in *dst |
- Note:
- metadata is read using the AV_DICT_IGNORE_SUFFIX flag
Definition at line 115 of file dict.c.
Get a dictionary entry with matching key.
- Parameters:
-
| prev | Set to the previous matching element to find the next. If set to NULL the first matching element is returned. |
| flags | Allows case as well as suffix-insensitive comparisons. |
- Returns:
- Found entry or NULL, changing key or value leads to undefined behavior.
Definition at line 28 of file dict.c.
int av_dict_set |
( |
AVDictionary ** |
pm, |
|
|
const char * |
key, |
|
|
const char * |
value, |
|
|
int |
flags | |
|
) |
| | |
Set the given entry in *pm, overwriting an existing entry.
- Parameters:
-
| pm | pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *pm. |
| key | entry key to add to *pm (will be av_strduped depending on flags) |
| value | entry value to add to *pm (will be av_strduped depending on flags). Passing a NULL value will cause an existing tag to be deleted. |
- Returns:
- >= 0 on success otherwise an error code <0
Definition at line 51 of file dict.c.