Revision 47146dfb libavcodec/avcodec.h

View differences:

libavcodec/avcodec.h
400 400
 */
401 401
#define FF_MIN_BUFFER_SIZE 16384
402 402

  
403

  
404
/*
405
 * public Metadata API.
406
 * Important concepts, to keep in mind
407
 * 1. keys are unique, there are never 2 tags with equal keys, this is also
408
 *    meant semantically that is a demuxer should not knowingly produce
409
 *    several keys that are litterally different but semantically identical,
410
 *    like key=Author5, key=Author6.
411
 *    All authors have to be placed in the same tag for the case of Authors.
412
 * 2. Metadata is flat, there are no subtags, if you for whatever obscene
413
 *    reason want to store the email address of the child of producer alice
414
 *    and actor bob, that could have key=alice_and_bobs_childs_email_address.
415
 * 3. A tag whichs value is translated has the ISO 639 3-letter language code
416
 *    with a '-' between appended. So for example Author-ger=Michael, Author-eng=Mike
417
 *    the original/default language is in the unqualified "Author"
418
 *    A demuxer should set a default if it sets any translated tag.
419
 */
420

  
421
#define AV_METADATA_IGNORE_CASE     1
422
#define AV_METADATA_IGNORE_SUFFIX   2
423

  
424
typedef struct {
425
    char *key;
426
    char *value;
427
}AVMetaDataTag;
428

  
429
struct AVMetaData;
430

  
431
/**
432
 * gets a metadata element with matching key.
433
 * @param prev set to the previous matching element to find the next.
434
 * @param flags allows case as well as suffix insensitive comparissions.
435
 * @return found tag or NULL, changing key or value leads to undefined behavior.
436
 */
437
AVMetaDataTag *
438
av_metadata_get(struct AVMetaData *m, const char *key, const AVMetaDataTag *prev, int flags);
439

  
440
/**
441
 * sets the given tag in m, overwriting an existing tag.
442
 * @param tag tag to add to m, key and value will be av_strduped.
443
 * @return >= 0 if success otherwise error code that is <0.
444
 */
445
int av_metadata_set(struct AVMetaData **m, AVMetaDataTag tag);
446

  
447

  
403 448
/**
404 449
 * motion estimation type.
405 450
 */

Also available in: Unified diff