Libav
dict.h
Go to the documentation of this file.
1 /*
2  * This file is part of Libav.
3  *
4  * Libav is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * Libav is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with Libav; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
24 #ifndef AVUTIL_DICT_H
25 #define AVUTIL_DICT_H
26 
59 #define AV_DICT_MATCH_CASE 1
60 #define AV_DICT_IGNORE_SUFFIX 2
61 #define AV_DICT_DONT_STRDUP_KEY 4
63 #define AV_DICT_DONT_STRDUP_VAL 8
65 #define AV_DICT_DONT_OVERWRITE 16
66 #define AV_DICT_APPEND 32
69 typedef struct AVDictionaryEntry {
70  char *key;
71  char *value;
73 
74 typedef struct AVDictionary AVDictionary;
75 
84 AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
85  const AVDictionaryEntry *prev, int flags);
86 
93 int av_dict_count(const AVDictionary *m);
94 
105 int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
106 
120 int av_dict_parse_string(AVDictionary **pm, const char *str,
121  const char *key_val_sep, const char *pairs_sep,
122  int flags);
123 
134 int 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
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
Definition: dict.c:189
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:50
#define src
Definition: vp8dsp.c:254
void av_dict_free(AVDictionary **m)
Free all the memory allocated for an AVDictionary struct and all keys and values. ...
Definition: dict.c:175
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:152
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