Libav
dict.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of Libav.
4  *
5  * Libav is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * Libav is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with Libav; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
25 #ifndef AVUTIL_DICT_H
26 #define AVUTIL_DICT_H
27 
61 #define AV_DICT_MATCH_CASE 1
62 #define AV_DICT_IGNORE_SUFFIX 2
63 #define AV_DICT_DONT_STRDUP_KEY 4
65 #define AV_DICT_DONT_STRDUP_VAL 8
67 #define AV_DICT_DONT_OVERWRITE 16
68 #define AV_DICT_APPEND 32
71 typedef struct AVDictionaryEntry {
72  char *key;
73  char *value;
75 
76 typedef struct AVDictionary AVDictionary;
77 
86 AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
87  const AVDictionaryEntry *prev, int flags);
88 
95 int av_dict_count(const AVDictionary *m);
96 
107 int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
108 
122 int av_dict_parse_string(AVDictionary **pm, const char *str,
123  const char *key_val_sep, const char *pairs_sep,
124  int flags);
125 
134 void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
135 
140 void av_dict_free(AVDictionary **m);
141 
146 #endif /* AVUTIL_DICT_H */
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
Definition: dict.c:33
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:38
static int flags
Definition: log.c:44
void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
Definition: dict.c:184
void av_dict_free(AVDictionary **m)
Free all the memory allocated for an AVDictionary struct and all keys and values. ...
Definition: dict.c:170
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 to a dictionary.
Definition: dict.c:147
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:68