comparison avformat.h @ 6384:2d51ca7714c3 libavformat

add LAVF_API_OLD_METADATA define to disable the deprecated metadata API
author aurel
date Tue, 17 Aug 2010 20:23:19 +0000
parents 65745776af68
children 4974b3d4992b
comparison
equal deleted inserted replaced
6383:65745776af68 6384:2d51ca7714c3
35 35
36 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) 36 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
37 37
38 #ifndef LAVF_API_MAX_STREAMS 38 #ifndef LAVF_API_MAX_STREAMS
39 #define LAVF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53) 39 #define LAVF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53)
40 #endif
41 #ifndef LAVF_API_OLD_METADATA
42 #define LAVF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53)
40 #endif 43 #endif
41 44
42 /** 45 /**
43 * I return the LIBAVFORMAT_VERSION_INT constant. You got 46 * I return the LIBAVFORMAT_VERSION_INT constant. You got
44 * a fucking problem with that, douchebag? 47 * a fucking problem with that, douchebag?
142 * @return Found tag or NULL, changing key or value leads to undefined behavior. 145 * @return Found tag or NULL, changing key or value leads to undefined behavior.
143 */ 146 */
144 AVMetadataTag * 147 AVMetadataTag *
145 av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags); 148 av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
146 149
147 #if LIBAVFORMAT_VERSION_MAJOR == 52 150 #if LAVF_API_OLD_METADATA
148 /** 151 /**
149 * Set the given tag in *pm, overwriting an existing tag. 152 * Set the given tag in *pm, overwriting an existing tag.
150 * 153 *
151 * @param pm pointer to a pointer to a metadata struct. If *pm is NULL 154 * @param pm pointer to a pointer to a metadata struct. If *pm is NULL
152 * a metadata struct is allocated and put in *pm. 155 * a metadata struct is allocated and put in *pm.
518 * If a source file does not specify a duration, but does specify 521 * If a source file does not specify a duration, but does specify
519 * a bitrate, this value will be estimated from bitrate and file size. 522 * a bitrate, this value will be estimated from bitrate and file size.
520 */ 523 */
521 int64_t duration; 524 int64_t duration;
522 525
523 #if LIBAVFORMAT_VERSION_INT < (53<<16) 526 #if LAVF_API_OLD_METADATA
524 char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if undefined) */ 527 char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if undefined) */
525 #endif 528 #endif
526 529
527 /* av_read_frame() support */ 530 /* av_read_frame() support */
528 enum AVStreamParseType need_parsing; 531 enum AVStreamParseType need_parsing;
539 542
540 int64_t nb_frames; ///< number of frames in this stream if known or 0 543 int64_t nb_frames; ///< number of frames in this stream if known or 0
541 544
542 #if LIBAVFORMAT_VERSION_INT < (53<<16) 545 #if LIBAVFORMAT_VERSION_INT < (53<<16)
543 int64_t unused[4+1]; 546 int64_t unused[4+1];
544 547 #endif
548
549 #if LAVF_API_OLD_METADATA
545 char *filename; /**< source filename of the stream */ 550 char *filename; /**< source filename of the stream */
546 #endif 551 #endif
547 552
548 int disposition; /**< AV_DISPOSITION_* bit field */ 553 int disposition; /**< AV_DISPOSITION_* bit field */
549 554
608 * version bump. 613 * version bump.
609 * sizeof(AVProgram) must not be used outside libav*. 614 * sizeof(AVProgram) must not be used outside libav*.
610 */ 615 */
611 typedef struct AVProgram { 616 typedef struct AVProgram {
612 int id; 617 int id;
613 #if LIBAVFORMAT_VERSION_INT < (53<<16) 618 #if LAVF_API_OLD_METADATA
614 char *provider_name; ///< network name for DVB streams 619 char *provider_name; ///< network name for DVB streams
615 char *name; ///< service name for DVB streams 620 char *name; ///< service name for DVB streams
616 #endif 621 #endif
617 int flags; 622 int flags;
618 enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller 623 enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller
626 631
627 typedef struct AVChapter { 632 typedef struct AVChapter {
628 int id; ///< unique ID to identify the chapter 633 int id; ///< unique ID to identify the chapter
629 AVRational time_base; ///< time base in which the start/end timestamps are specified 634 AVRational time_base; ///< time base in which the start/end timestamps are specified
630 int64_t start, end; ///< chapter start/end time in time_base units 635 int64_t start, end; ///< chapter start/end time in time_base units
631 #if LIBAVFORMAT_VERSION_INT < (53<<16) 636 #if LAVF_API_OLD_METADATA
632 char *title; ///< chapter title 637 char *title; ///< chapter title
633 #endif 638 #endif
634 AVMetadata *metadata; 639 AVMetadata *metadata;
635 } AVChapter; 640 } AVChapter;
636 641
655 unsigned int nb_streams; 660 unsigned int nb_streams;
656 AVStream *streams[MAX_STREAMS]; 661 AVStream *streams[MAX_STREAMS];
657 char filename[1024]; /**< input or output filename */ 662 char filename[1024]; /**< input or output filename */
658 /* stream info */ 663 /* stream info */
659 int64_t timestamp; 664 int64_t timestamp;
660 #if LIBAVFORMAT_VERSION_INT < (53<<16) 665 #if LAVF_API_OLD_METADATA
661 char title[512]; 666 char title[512];
662 char author[512]; 667 char author[512];
663 char copyright[512]; 668 char copyright[512];
664 char comment[512]; 669 char comment[512];
665 char album[512]; 670 char album[512];