Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: source/patched-ffmpeg-mt/libavformat/avformat.h

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * copyright (c) 2001 Fabrice Bellard 2 * copyright (c) 2001 Fabrice Bellard
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
11 * FFmpeg is distributed in the hope that it will be useful, 11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details. 14 * Lesser General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Lesser General Public 16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software 17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21 #ifndef AVFORMAT_AVFORMAT_H 21 #ifndef AVFORMAT_AVFORMAT_H
22 #define AVFORMAT_AVFORMAT_H 22 #define AVFORMAT_AVFORMAT_H
23 23
24 #define LIBAVFORMAT_VERSION_MAJOR 52 24 #define LIBAVFORMAT_VERSION_MAJOR 52
25 #define LIBAVFORMAT_VERSION_MINOR 78 25 #define LIBAVFORMAT_VERSION_MINOR 78
26 #define LIBAVFORMAT_VERSION_MICRO 1 26 #define LIBAVFORMAT_VERSION_MICRO 4
27 27
28 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ 28 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
29 LIBAVFORMAT_VERSION_MINOR, \ 29 LIBAVFORMAT_VERSION_MINOR, \
30 LIBAVFORMAT_VERSION_MICRO) 30 LIBAVFORMAT_VERSION_MICRO)
31 #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \ 31 #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \
32 LIBAVFORMAT_VERSION_MINOR, \ 32 LIBAVFORMAT_VERSION_MINOR, \
33 LIBAVFORMAT_VERSION_MICRO) 33 LIBAVFORMAT_VERSION_MICRO)
34 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT 34 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
35 35
36 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) 36 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
37 37
38 /** 38 /**
39 * Those FF_API_* defines are not part of public API.
40 * They may change, break or disappear at any time.
41 */
42 #ifndef FF_API_MAX_STREAMS
43 #define FF_API_MAX_STREAMS (LIBAVFORMAT_VERSION_MAJOR < 53)
44 #endif
45 #ifndef FF_API_OLD_METADATA
46 #define FF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53)
47 #endif
48 #ifndef FF_API_URL_CLASS
49 #define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53)
50 #endif
51 #ifndef FF_API_URL_RESETBUF
52 #define FF_API_URL_RESETBUF (LIBAVFORMAT_VERSION_MAJOR < 53)
53 #endif
54 #ifndef FF_API_REGISTER_PROTOCOL
55 #define FF_API_REGISTER_PROTOCOL (LIBAVFORMAT_VERSION_MAJOR < 53)
56 #endif
57
58 /**
39 * I return the LIBAVFORMAT_VERSION_INT constant. You got 59 * I return the LIBAVFORMAT_VERSION_INT constant. You got
40 * a fucking problem with that, douchebag? 60 * a fucking problem with that, douchebag?
41 */ 61 */
42 unsigned avformat_version(void); 62 unsigned avformat_version(void);
43 63
44 /** 64 /**
45 * Return the libavformat build-time configuration. 65 * Return the libavformat build-time configuration.
46 */ 66 */
47 const char *avformat_configuration(void); 67 const char *avformat_configuration(void);
48 68
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 typedef struct { 144 typedef struct {
125 char *key; 145 char *key;
126 char *value; 146 char *value;
127 }AVMetadataTag; 147 }AVMetadataTag;
128 148
129 typedef struct AVMetadata AVMetadata; 149 typedef struct AVMetadata AVMetadata;
130 typedef struct AVMetadataConv AVMetadataConv; 150 typedef struct AVMetadataConv AVMetadataConv;
131 151
132 /** 152 /**
133 * Get a metadata element with matching key. 153 * Get a metadata element with matching key.
154 *
134 * @param prev Set to the previous matching element to find the next. 155 * @param prev Set to the previous matching element to find the next.
135 * If set to NULL the first matching element is returned. 156 * If set to NULL the first matching element is returned.
136 * @param flags Allows case as well as suffix-insensitive comparisons. 157 * @param flags Allows case as well as suffix-insensitive comparisons.
137 * @return Found tag or NULL, changing key or value leads to undefined behavior. 158 * @return Found tag or NULL, changing key or value leads to undefined behavior.
138 */ 159 */
139 AVMetadataTag * 160 AVMetadataTag *
140 av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int f lags); 161 av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int f lags);
141 162
142 #if LIBAVFORMAT_VERSION_MAJOR == 52 163 #if FF_API_OLD_METADATA
143 /** 164 /**
144 * Set the given tag in m, overwriting an existing tag. 165 * Set the given tag in *pm, overwriting an existing tag.
145 * @param key tag key to add to m (will be av_strduped) 166 *
146 * @param value tag value to add to m (will be av_strduped) 167 * @param pm pointer to a pointer to a metadata struct. If *pm is NULL
168 * a metadata struct is allocated and put in *pm.
169 * @param key tag key to add to *pm (will be av_strduped)
170 * @param value tag value to add to *pm (will be av_strduped)
147 * @return >= 0 on success otherwise an error code <0 171 * @return >= 0 on success otherwise an error code <0
148 * @deprecated Use av_metadata_set2() instead. 172 * @deprecated Use av_metadata_set2() instead.
149 */ 173 */
150 attribute_deprecated int av_metadata_set(AVMetadata **pm, const char *key, const char *value); 174 attribute_deprecated int av_metadata_set(AVMetadata **pm, const char *key, const char *value);
151 #endif 175 #endif
152 176
153 /** 177 /**
154 * Set the given tag in m, overwriting an existing tag. 178 * Set the given tag in *pm, overwriting an existing tag.
155 * @param key tag key to add to m (will be av_strduped depending on flags) 179 *
156 * @param value tag value to add to m (will be av_strduped depending on flags). 180 * @param pm pointer to a pointer to a metadata struct. If *pm is NULL
181 * a metadata struct is allocated and put in *pm.
182 * @param key tag key to add to *pm (will be av_strduped depending on flags)
183 * @param value tag value to add to *pm (will be av_strduped depending on flags) .
157 * Passing a NULL value will cause an existing tag to be deleted. 184 * Passing a NULL value will cause an existing tag to be deleted.
158 * @return >= 0 on success otherwise an error code <0 185 * @return >= 0 on success otherwise an error code <0
159 */ 186 */
160 int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl ags); 187 int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl ags);
161 188
162 /** 189 /**
163 * Convert all the metadata sets from ctx according to the source and 190 * Convert all the metadata sets from ctx according to the source and
164 * destination conversion tables. If one of the tables is NULL, then 191 * destination conversion tables. If one of the tables is NULL, then
165 * tags are converted to/from ffmpeg generic tag names. 192 * tags are converted to/from ffmpeg generic tag names.
193 *
166 * @param d_conv destination tags format conversion table 194 * @param d_conv destination tags format conversion table
167 * @param s_conv source tags format conversion table 195 * @param s_conv source tags format conversion table
168 */ 196 */
169 void av_metadata_conv(struct AVFormatContext *ctx,const AVMetadataConv *d_conv, 197 void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv,
170 const AVMetadataConv *s_conv); 198 const AVMetadataConv *s_conv) ;
171 199
172 /** 200 /**
173 * Free all the memory allocated for an AVMetadata struct. 201 * Free all the memory allocated for an AVMetadata struct.
174 */ 202 */
175 void av_metadata_free(AVMetadata **m); 203 void av_metadata_free(AVMetadata **m);
176 204
177 205
178 /* packet functions */ 206 /* packet functions */
179 207
180 208
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 */ 529 */
502 int64_t start_time; 530 int64_t start_time;
503 531
504 /** 532 /**
505 * Decoding: duration of the stream, in stream time base. 533 * Decoding: duration of the stream, in stream time base.
506 * If a source file does not specify a duration, but does specify 534 * If a source file does not specify a duration, but does specify
507 * a bitrate, this value will be estimated from bitrate and file size. 535 * a bitrate, this value will be estimated from bitrate and file size.
508 */ 536 */
509 int64_t duration; 537 int64_t duration;
510 538
511 #if LIBAVFORMAT_VERSION_INT < (53<<16) 539 #if FF_API_OLD_METADATA
512 char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if u ndefined) */ 540 char language[4]; /**< ISO 639-2/B 3-letter language code (empty string if u ndefined) */
513 #endif 541 #endif
514 542
515 /* av_read_frame() support */ 543 /* av_read_frame() support */
516 enum AVStreamParseType need_parsing; 544 enum AVStreamParseType need_parsing;
517 struct AVCodecParserContext *parser; 545 struct AVCodecParserContext *parser;
518 546
519 int64_t cur_dts; 547 int64_t cur_dts;
520 int last_IP_duration; 548 int last_IP_duration;
521 int64_t last_IP_pts; 549 int64_t last_IP_pts;
522 /* av_seek_frame() support */ 550 /* av_seek_frame() support */
523 AVIndexEntry *index_entries; /**< Only used if the format does not 551 AVIndexEntry *index_entries; /**< Only used if the format does not
524 support seeking natively. */ 552 support seeking natively. */
525 int nb_index_entries; 553 int nb_index_entries;
526 unsigned int index_entries_allocated_size; 554 unsigned int index_entries_allocated_size;
527 555
528 int64_t nb_frames; ///< number of frames in this stream if k nown or 0 556 int64_t nb_frames; ///< number of frames in this stream if k nown or 0
529 557
530 #if LIBAVFORMAT_VERSION_INT < (53<<16) 558 #if LIBAVFORMAT_VERSION_INT < (53<<16)
531 int64_t unused[4+1]; 559 int64_t unused[4+1];
560 #endif
532 561
562 #if FF_API_OLD_METADATA
533 char *filename; /**< source filename of the stream */ 563 char *filename; /**< source filename of the stream */
534 #endif 564 #endif
535 565
536 int disposition; /**< AV_DISPOSITION_* bit field */ 566 int disposition; /**< AV_DISPOSITION_* bit field */
537 567
538 AVProbeData probe_data; 568 AVProbeData probe_data;
539 #define MAX_REORDER_DELAY 16 569 #define MAX_REORDER_DELAY 16
540 int64_t pts_buffer[MAX_REORDER_DELAY+1]; 570 int64_t pts_buffer[MAX_REORDER_DELAY+1];
541 571
542 /** 572 /**
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 #define AV_PROGRAM_RUNNING 1 621 #define AV_PROGRAM_RUNNING 1
592 622
593 /** 623 /**
594 * New fields can be added to the end with minor version bumps. 624 * New fields can be added to the end with minor version bumps.
595 * Removal, reordering and changes to existing fields require a major 625 * Removal, reordering and changes to existing fields require a major
596 * version bump. 626 * version bump.
597 * sizeof(AVProgram) must not be used outside libav*. 627 * sizeof(AVProgram) must not be used outside libav*.
598 */ 628 */
599 typedef struct AVProgram { 629 typedef struct AVProgram {
600 int id; 630 int id;
601 #if LIBAVFORMAT_VERSION_INT < (53<<16) 631 #if FF_API_OLD_METADATA
602 char *provider_name; ///< network name for DVB streams 632 char *provider_name; ///< network name for DVB streams
603 char *name; ///< service name for DVB streams 633 char *name; ///< service name for DVB streams
604 #endif 634 #endif
605 int flags; 635 int flags;
606 enum AVDiscard discard; ///< selects which program to discard and whi ch to feed to the caller 636 enum AVDiscard discard; ///< selects which program to discard and whi ch to feed to the caller
607 unsigned int *stream_index; 637 unsigned int *stream_index;
608 unsigned int nb_stream_indexes; 638 unsigned int nb_stream_indexes;
609 AVMetadata *metadata; 639 AVMetadata *metadata;
610 } AVProgram; 640 } AVProgram;
611 641
612 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present 642 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present
613 (streams are added dynamically) */ 643 (streams are added dynamically) */
614 644
615 typedef struct AVChapter { 645 typedef struct AVChapter {
616 int id; ///< unique ID to identify the chapter 646 int id; ///< unique ID to identify the chapter
617 AVRational time_base; ///< time base in which the start/end timestamps are specified 647 AVRational time_base; ///< time base in which the start/end timestamps are specified
618 int64_t start, end; ///< chapter start/end time in time_base units 648 int64_t start, end; ///< chapter start/end time in time_base units
619 #if LIBAVFORMAT_VERSION_INT < (53<<16) 649 #if FF_API_OLD_METADATA
620 char *title; ///< chapter title 650 char *title; ///< chapter title
621 #endif 651 #endif
622 AVMetadata *metadata; 652 AVMetadata *metadata;
623 } AVChapter; 653 } AVChapter;
624 654
625 #if LIBAVFORMAT_VERSION_MAJOR < 53 655 #if FF_API_MAX_STREAMS
626 #define MAX_STREAMS 20 656 #define MAX_STREAMS 20
627 #endif 657 #endif
628 658
629 /** 659 /**
630 * Format I/O context. 660 * Format I/O context.
631 * New fields can be added to the end with minor version bumps. 661 * New fields can be added to the end with minor version bumps.
632 * Removal, reordering and changes to existing fields require a major 662 * Removal, reordering and changes to existing fields require a major
633 * version bump. 663 * version bump.
634 * sizeof(AVFormatContext) must not be used outside libav*. 664 * sizeof(AVFormatContext) must not be used outside libav*.
635 */ 665 */
636 typedef struct AVFormatContext { 666 typedef struct AVFormatContext {
637 const AVClass *av_class; /**< Set by avformat_alloc_context. */ 667 const AVClass *av_class; /**< Set by avformat_alloc_context. */
638 /* Can only be iformat or oformat, not both at the same time. */ 668 /* Can only be iformat or oformat, not both at the same time. */
639 struct AVInputFormat *iformat; 669 struct AVInputFormat *iformat;
640 struct AVOutputFormat *oformat; 670 struct AVOutputFormat *oformat;
641 void *priv_data; 671 void *priv_data;
642 ByteIOContext *pb; 672 ByteIOContext *pb;
643 unsigned int nb_streams; 673 unsigned int nb_streams;
644 AVStream *streams[MAX_STREAMS]; 674 AVStream *streams[MAX_STREAMS];
645 char filename[1024]; /**< input or output filename */ 675 char filename[1024]; /**< input or output filename */
646 /* stream info */ 676 /* stream info */
647 int64_t timestamp; 677 int64_t timestamp;
648 #if LIBAVFORMAT_VERSION_INT < (53<<16) 678 #if FF_API_OLD_METADATA
649 char title[512]; 679 char title[512];
650 char author[512]; 680 char author[512];
651 char copyright[512]; 681 char copyright[512];
652 char comment[512]; 682 char comment[512];
653 char album[512]; 683 char album[512];
654 int year; /**< ID3 year, 0 if none */ 684 int year; /**< ID3 year, 0 if none */
655 int track; /**< track number, 0 if none */ 685 int track; /**< track number, 0 if none */
656 char genre[32]; /**< ID3 genre */ 686 char genre[32]; /**< ID3 genre */
657 #endif 687 #endif
658 688
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 1496
1467 /** 1497 /**
1468 * Return a positive value if the given filename has one of the given 1498 * Return a positive value if the given filename has one of the given
1469 * extensions, 0 otherwise. 1499 * extensions, 0 otherwise.
1470 * 1500 *
1471 * @param extensions a comma-separated list of filename extensions 1501 * @param extensions a comma-separated list of filename extensions
1472 */ 1502 */
1473 int av_match_ext(const char *filename, const char *extensions); 1503 int av_match_ext(const char *filename, const char *extensions);
1474 1504
1475 #endif /* AVFORMAT_AVFORMAT_H */ 1505 #endif /* AVFORMAT_AVFORMAT_H */
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/au.c ('k') | source/patched-ffmpeg-mt/libavformat/avidec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698