Go to the documentation of this file.
30 #define GET(entry, mem) ((entry) ? (entry)->mem : "N/A")
31 printf(
"Iterating with av_dict_iterate() yields a different result "
32 "than iterating with av_dict_get() and AV_DICT_IGNORE_SUFFIX "
33 "(prev: %p, key %s; av_dict_iterate() %p, key %s, value %s; "
34 "av_dict_get() %p, key %s, value %s)\n",
54 char pairs[] = {pair ,
'\0'};
55 char vals[] = {
val,
'\0'};
78 printf(
"Testing av_dict_get_string() and av_dict_parse_string()\n");
103 printf(
"\nTesting av_dict_set()\n");
115 printf(
"av_dict_get() does not correctly handle NULL key.\n");
126 printf(
"av_dict_set does not correctly handle NULL key\n");
135 printf(
"\nTesting av_dict_set_int()\n");
150 printf(
"\nTesting av_dict_set() with existing AVDictionaryEntry.key as key\n");
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
#define AV_DICT_APPEND
If the entry already exists, append to it.
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key,...
static void print_dict(const AVDictionary *m)
static double val(void *priv, double ch)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
static const AVDictionaryEntry * dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
#define AV_DICT_DONT_OVERWRITE
Don't overwrite existing entries.
printf("static const uint8_t my_array[100] = {\n")
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
static void test_separators(const AVDictionary *m, const char pair, const char val)
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
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_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.
char * av_strdup(const char *s)
Duplicate a string.
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_get_string(const AVDictionary *m, char **buffer, const char key_val_sep, const char pairs_sep)
Get dictionary entries as a string.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function.