Revision f9c399c4 libavformat/internal.h

View differences:

libavformat/internal.h
192 192

  
193 193
#define SPACE_CHARS " \t\r\n"
194 194

  
195
/**
196
 * Callback function type for ff_parse_key_value.
197
 *
198
 * @param key a pointer to the key
199
 * @param key_len the number of bytes that belong to the key, including the '='
200
 *                char
201
 * @param dest return the destination pointer for the value in *dest, may
202
 *             be null to ignore the value
203
 * @param dest_len the length of the *dest buffer
204
 */
205
typedef void (*ff_parse_key_val_cb)(void *context, const char *key,
206
                                    int key_len, char **dest, int *dest_len);
207
/**
208
 * Parse a string with comma-separated key=value pairs. The value strings
209
 * may be quoted and may contain escaped characters within quoted strings.
210
 *
211
 * @param str the string to parse
212
 * @param callback_get_buf function that returns where to store the
213
 *                         unescaped value string.
214
 * @param context the opaque context pointer to pass to callback_get_buf
215
 */
216
void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
217
                        void *context);
218

  
195 219
#endif /* AVFORMAT_INTERNAL_H */

Also available in: Unified diff