00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVFORMAT_AVFORMAT_H
00022 #define AVFORMAT_AVFORMAT_H
00023
00138 #include <time.h>
00139 #include <stdio.h>
00140 #include "libavcodec/avcodec.h"
00141 #include "libavutil/dict.h"
00142 #include "libavutil/log.h"
00143
00144 #include "avio.h"
00145 #include "libavformat/version.h"
00146
00147 struct AVFormatContext;
00148
00149
00223 #if FF_API_OLD_METADATA2
00224
00231 #define AV_METADATA_MATCH_CASE AV_DICT_MATCH_CASE
00232 #define AV_METADATA_IGNORE_SUFFIX AV_DICT_IGNORE_SUFFIX
00233 #define AV_METADATA_DONT_STRDUP_KEY AV_DICT_DONT_STRDUP_KEY
00234 #define AV_METADATA_DONT_STRDUP_VAL AV_DICT_DONT_STRDUP_VAL
00235 #define AV_METADATA_DONT_OVERWRITE AV_DICT_DONT_OVERWRITE
00236
00237 typedef attribute_deprecated AVDictionary AVMetadata;
00238 typedef attribute_deprecated AVDictionaryEntry AVMetadataTag;
00239
00240 typedef struct AVMetadataConv AVMetadataConv;
00241
00250 attribute_deprecated AVDictionaryEntry *
00251 av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
00252
00263 attribute_deprecated int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags);
00264
00268 attribute_deprecated void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv,
00269 const AVMetadataConv *s_conv);
00270
00279 attribute_deprecated void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags);
00280
00284 attribute_deprecated void av_metadata_free(AVDictionary **m);
00288 #endif
00289
00290
00291
00292
00293
00302 int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
00303
00304
00318 int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
00319
00320
00321
00322
00327 typedef struct AVFrac {
00328 int64_t val, num, den;
00329 } AVFrac;
00330
00331
00332
00333
00334 struct AVCodecTag;
00335
00339 typedef struct AVProbeData {
00340 const char *filename;
00341 unsigned char *buf;
00342 int buf_size;
00343 } AVProbeData;
00344
00345 #define AVPROBE_SCORE_MAX 100 ///< maximum score, half of that is used for file-extension-based detection
00346 #define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer
00347
00348 typedef struct AVFormatParameters {
00349 #if FF_API_FORMAT_PARAMETERS
00350 attribute_deprecated AVRational time_base;
00351 attribute_deprecated int sample_rate;
00352 attribute_deprecated int channels;
00353 attribute_deprecated int width;
00354 attribute_deprecated int height;
00355 attribute_deprecated enum PixelFormat pix_fmt;
00356 attribute_deprecated int channel;
00357 attribute_deprecated const char *standard;
00358 attribute_deprecated unsigned int mpeg2ts_raw:1;
00360 attribute_deprecated unsigned int mpeg2ts_compute_pcr:1;
00361 attribute_deprecated unsigned int initial_pause:1;
00363 attribute_deprecated unsigned int prealloced_context:1;
00364 #endif
00365 } AVFormatParameters;
00366
00368 #define AVFMT_NOFILE 0x0001
00369 #define AVFMT_NEEDNUMBER 0x0002
00370 #define AVFMT_SHOW_IDS 0x0008
00371 #define AVFMT_RAWPICTURE 0x0020
00373 #define AVFMT_GLOBALHEADER 0x0040
00374 #define AVFMT_NOTIMESTAMPS 0x0080
00375 #define AVFMT_GENERIC_INDEX 0x0100
00376 #define AVFMT_TS_DISCONT 0x0200
00377 #define AVFMT_VARIABLE_FPS 0x0400
00378 #define AVFMT_NODIMENSIONS 0x0800
00379 #define AVFMT_NOSTREAMS 0x1000
00380 #define AVFMT_NOBINSEARCH 0x2000
00381 #define AVFMT_NOGENSEARCH 0x4000
00382 #define AVFMT_NO_BYTE_SEEK 0x8000
00388 typedef struct AVOutputFormat {
00389 const char *name;
00395 const char *long_name;
00396 const char *mime_type;
00397 const char *extensions;
00401 int priv_data_size;
00402
00403 enum CodecID audio_codec;
00404 enum CodecID video_codec;
00405 int (*write_header)(struct AVFormatContext *);
00406 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
00407 int (*write_trailer)(struct AVFormatContext *);
00413 int flags;
00417 int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *);
00418 int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
00419 AVPacket *in, int flush);
00420
00425 const struct AVCodecTag * const *codec_tag;
00426
00427 enum CodecID subtitle_codec;
00429 #if FF_API_OLD_METADATA2
00430 const AVMetadataConv *metadata_conv;
00431 #endif
00432
00433 const AVClass *priv_class;
00434
00441 int (*query_codec)(enum CodecID id, int std_compliance);
00442
00443
00444 struct AVOutputFormat *next;
00445 } AVOutputFormat;
00454 typedef struct AVInputFormat {
00459 const char *name;
00460
00466 const char *long_name;
00467
00471 int priv_data_size;
00472
00478 int (*read_probe)(AVProbeData *);
00479
00486 int (*read_header)(struct AVFormatContext *,
00487 AVFormatParameters *ap);
00488
00498 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
00499
00504 int (*read_close)(struct AVFormatContext *);
00505
00514 int (*read_seek)(struct AVFormatContext *,
00515 int stream_index, int64_t timestamp, int flags);
00516
00521 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
00522 int64_t *pos, int64_t pos_limit);
00523
00529 int flags;
00530
00536 const char *extensions;
00537
00541 int value;
00542
00547 int (*read_play)(struct AVFormatContext *);
00548
00553 int (*read_pause)(struct AVFormatContext *);
00554
00555 const struct AVCodecTag * const *codec_tag;
00556
00563 int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
00564
00565 #if FF_API_OLD_METADATA2
00566 const AVMetadataConv *metadata_conv;
00567 #endif
00568
00569 const AVClass *priv_class;
00570
00571
00572 struct AVInputFormat *next;
00573 } AVInputFormat;
00578 enum AVStreamParseType {
00579 AVSTREAM_PARSE_NONE,
00580 AVSTREAM_PARSE_FULL,
00581 AVSTREAM_PARSE_HEADERS,
00582 AVSTREAM_PARSE_TIMESTAMPS,
00583 AVSTREAM_PARSE_FULL_ONCE,
00584 };
00585
00586 typedef struct AVIndexEntry {
00587 int64_t pos;
00588 int64_t timestamp;
00589 #define AVINDEX_KEYFRAME 0x0001
00590 int flags:2;
00591 int size:30;
00592 int min_distance;
00593 } AVIndexEntry;
00594
00595 #define AV_DISPOSITION_DEFAULT 0x0001
00596 #define AV_DISPOSITION_DUB 0x0002
00597 #define AV_DISPOSITION_ORIGINAL 0x0004
00598 #define AV_DISPOSITION_COMMENT 0x0008
00599 #define AV_DISPOSITION_LYRICS 0x0010
00600 #define AV_DISPOSITION_KARAOKE 0x0020
00601
00607 #define AV_DISPOSITION_FORCED 0x0040
00608 #define AV_DISPOSITION_HEARING_IMPAIRED 0x0080
00609 #define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100
00610 #define AV_DISPOSITION_CLEAN_EFFECTS 0x0200
00619 typedef struct AVStream {
00620 int index;
00621 int id;
00622 AVCodecContext *codec;
00631 AVRational r_frame_rate;
00632 void *priv_data;
00633
00634 #if FF_API_REORDER_PRIVATE
00635
00636 int64_t first_dts;
00637 #endif
00638
00642 struct AVFrac pts;
00643
00651 AVRational time_base;
00652 #if FF_API_REORDER_PRIVATE
00653 int pts_wrap_bits;
00654 #endif
00655 #if FF_API_STREAM_COPY
00656
00657 attribute_deprecated int stream_copy;
00658 #endif
00659 enum AVDiscard discard;
00660
00661 #if FF_API_AVSTREAM_QUALITY
00662
00667 attribute_deprecated float quality;
00668 #endif
00669
00676 int64_t start_time;
00677
00683 int64_t duration;
00684
00685 #if FF_API_REORDER_PRIVATE
00686
00687 enum AVStreamParseType need_parsing;
00688 struct AVCodecParserContext *parser;
00689
00690 int64_t cur_dts;
00691 int last_IP_duration;
00692 int64_t last_IP_pts;
00693
00694 AVIndexEntry *index_entries;
00696 int nb_index_entries;
00697 unsigned int index_entries_allocated_size;
00698 #endif
00699
00700 int64_t nb_frames;
00701
00702 int disposition;
00704 #if FF_API_REORDER_PRIVATE
00705 AVProbeData probe_data;
00706 #define MAX_REORDER_DELAY 16
00707 int64_t pts_buffer[MAX_REORDER_DELAY+1];
00708 #endif
00709
00715 AVRational sample_aspect_ratio;
00716
00717 AVDictionary *metadata;
00718
00719 #if FF_API_REORDER_PRIVATE
00720
00721
00722 const uint8_t *cur_ptr;
00723 int cur_len;
00724 AVPacket cur_pkt;
00725
00726
00734 int64_t reference_dts;
00735
00740 #define MAX_PROBE_PACKETS 2500
00741 int probe_packets;
00742
00748 struct AVPacketList *last_in_packet_buffer;
00749 #endif
00750
00754 AVRational avg_frame_rate;
00755
00756
00757
00758
00759
00760
00761
00762
00763
00767 int codec_info_nb_frames;
00768
00772 #define MAX_STD_TIMEBASES (60*12+5)
00773 struct {
00774 int64_t last_dts;
00775 int64_t duration_gcd;
00776 int duration_count;
00777 double duration_error[MAX_STD_TIMEBASES];
00778 int64_t codec_info_duration;
00779 int nb_decoded_frames;
00780 } *info;
00781 #if !FF_API_REORDER_PRIVATE
00782 const uint8_t *cur_ptr;
00783 int cur_len;
00784 AVPacket cur_pkt;
00785
00786
00794 int64_t reference_dts;
00795 int64_t first_dts;
00796 int64_t cur_dts;
00797 int last_IP_duration;
00798 int64_t last_IP_pts;
00799
00803 #define MAX_PROBE_PACKETS 2500
00804 int probe_packets;
00805
00809 struct AVPacketList *last_in_packet_buffer;
00810 AVProbeData probe_data;
00811 #define MAX_REORDER_DELAY 16
00812 int64_t pts_buffer[MAX_REORDER_DELAY+1];
00813
00814 enum AVStreamParseType need_parsing;
00815 struct AVCodecParserContext *parser;
00816
00817 AVIndexEntry *index_entries;
00819 int nb_index_entries;
00820 unsigned int index_entries_allocated_size;
00821
00822 int pts_wrap_bits;
00823 #endif
00824 } AVStream;
00825
00826 #define AV_PROGRAM_RUNNING 1
00827
00834 typedef struct AVProgram {
00835 int id;
00836 int flags;
00837 enum AVDiscard discard;
00838 unsigned int *stream_index;
00839 unsigned int nb_stream_indexes;
00840 AVDictionary *metadata;
00841 } AVProgram;
00842
00843 #define AVFMTCTX_NOHEADER 0x0001
00846 typedef struct AVChapter {
00847 int id;
00848 AVRational time_base;
00849 int64_t start, end;
00850 AVDictionary *metadata;
00851 } AVChapter;
00852
00861 typedef struct AVFormatContext {
00866 const AVClass *av_class;
00867
00874 struct AVInputFormat *iformat;
00875 struct AVOutputFormat *oformat;
00876
00881 void *priv_data;
00882
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894 AVIOContext *pb;
00895
00905 unsigned int nb_streams;
00906 AVStream **streams;
00907
00908 char filename[1024];
00909
00910 #if FF_API_TIMESTAMP
00911
00914 attribute_deprecated int64_t timestamp;
00915 #endif
00916
00917 int ctx_flags;
00918 #if FF_API_REORDER_PRIVATE
00919
00925 struct AVPacketList *packet_buffer;
00926 #endif
00927
00933 int64_t start_time;
00934
00941 int64_t duration;
00942
00943 #if FF_API_FILESIZE
00944
00947 attribute_deprecated int64_t file_size;
00948 #endif
00949
00955 int bit_rate;
00956
00957 #if FF_API_REORDER_PRIVATE
00958
00959 AVStream *cur_st;
00960
00961
00962 int64_t data_offset;
00963 #endif
00964
00965 #if FF_API_MUXRATE
00966
00969 attribute_deprecated int mux_rate;
00970 #endif
00971 unsigned int packet_size;
00972 #if FF_API_PRELOAD
00973 attribute_deprecated int preload;
00974 #endif
00975 int max_delay;
00976
00977 #if FF_API_LOOP_OUTPUT
00978 #define AVFMT_NOOUTPUTLOOP -1
00979 #define AVFMT_INFINITEOUTPUTLOOP 0
00980
00985 attribute_deprecated int loop_output;
00986 #endif
00987
00988 int flags;
00989 #define AVFMT_FLAG_GENPTS 0x0001 ///< Generate missing pts even if it requires parsing future frames.
00990 #define AVFMT_FLAG_IGNIDX 0x0002 ///< Ignore index.
00991 #define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
00992 #define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
00993 #define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container
00994 #define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
00995 #if FF_API_FLAG_RTP_HINT
00996 #define AVFMT_FLAG_RTP_HINT 0x0040 ///< Deprecated, use the -movflags rtphint muxer specific AVOption instead
00997 #endif
00998 #define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
00999 #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted
01000
01001 #if FF_API_LOOP_INPUT
01002
01005 attribute_deprecated int loop_input;
01006 #endif
01007
01011 unsigned int probesize;
01012
01017 int max_analyze_duration;
01018
01019 const uint8_t *key;
01020 int keylen;
01021
01022 unsigned int nb_programs;
01023 AVProgram **programs;
01024
01029 enum CodecID video_codec_id;
01030
01035 enum CodecID audio_codec_id;
01036
01041 enum CodecID subtitle_codec_id;
01042
01053 unsigned int max_index_size;
01054
01059 unsigned int max_picture_buffer;
01060
01061 unsigned int nb_chapters;
01062 AVChapter **chapters;
01063
01067 int debug;
01068 #define FF_FDEBUG_TS 0x0001
01069
01070 #if FF_API_REORDER_PRIVATE
01071
01077 struct AVPacketList *raw_packet_buffer;
01078 struct AVPacketList *raw_packet_buffer_end;
01079
01080 struct AVPacketList *packet_buffer_end;
01081 #endif
01082
01083 AVDictionary *metadata;
01084
01085 #if FF_API_REORDER_PRIVATE
01086
01090 #define RAW_PACKET_BUFFER_SIZE 2500000
01091 int raw_packet_buffer_remaining_size;
01092 #endif
01093
01101 int64_t start_time_realtime;
01102
01106 int fps_probe_size;
01107
01114 int error_recognition;
01115
01125 AVIOInterruptCB interrupt_callback;
01126
01127
01128
01129
01130
01131
01132
01133
01134 #if !FF_API_REORDER_PRIVATE
01135
01141 struct AVPacketList *raw_packet_buffer;
01142 struct AVPacketList *raw_packet_buffer_end;
01146 #define RAW_PACKET_BUFFER_SIZE 2500000
01147 int raw_packet_buffer_remaining_size;
01148
01154 struct AVPacketList *packet_buffer;
01155 struct AVPacketList *packet_buffer_end;
01156
01157
01158 AVStream *cur_st;
01159
01160
01161 int64_t data_offset;
01162 #endif
01163 } AVFormatContext;
01164
01165 typedef struct AVPacketList {
01166 AVPacket pkt;
01167 struct AVPacketList *next;
01168 } AVPacketList;
01169
01170
01183 unsigned avformat_version(void);
01184
01188 const char *avformat_configuration(void);
01189
01193 const char *avformat_license(void);
01194
01204 void av_register_all(void);
01205
01206 void av_register_input_format(AVInputFormat *format);
01207 void av_register_output_format(AVOutputFormat *format);
01208
01217 int avformat_network_init(void);
01218
01222 int avformat_network_deinit(void);
01223
01229 AVInputFormat *av_iformat_next(AVInputFormat *f);
01230
01236 AVOutputFormat *av_oformat_next(AVOutputFormat *f);
01237
01243 AVFormatContext *avformat_alloc_context(void);
01244
01249 void avformat_free_context(AVFormatContext *s);
01250
01257 const AVClass *avformat_get_class(void);
01258
01274 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c);
01275
01276 AVProgram *av_new_program(AVFormatContext *s, int id);
01277
01283 #if FF_API_GUESS_IMG2_CODEC
01284 attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename);
01285 #endif
01286
01287 #if FF_API_PKT_DUMP
01288 attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
01289 attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
01290 int dump_payload);
01291 #endif
01292
01293
01302 AVInputFormat *av_find_input_format(const char *short_name);
01303
01310 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
01311
01323 AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
01324
01340 int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
01341 const char *filename, void *logctx,
01342 unsigned int offset, unsigned int max_probe_size);
01343
01344 #if FF_API_FORMAT_PARAMETERS
01345
01350 attribute_deprecated int av_open_input_stream(AVFormatContext **ic_ptr,
01351 AVIOContext *pb, const char *filename,
01352 AVInputFormat *fmt, AVFormatParameters *ap);
01353
01368 attribute_deprecated int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
01369 AVInputFormat *fmt,
01370 int buf_size,
01371 AVFormatParameters *ap);
01372 #endif
01373
01393 int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
01394
01395 #if FF_API_FORMAT_PARAMETERS
01396
01411 attribute_deprecated
01412 int av_find_stream_info(AVFormatContext *ic);
01413 #endif
01414
01436 int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
01437
01462 int av_find_best_stream(AVFormatContext *ic,
01463 enum AVMediaType type,
01464 int wanted_stream_nb,
01465 int related_stream,
01466 AVCodec **decoder_ret,
01467 int flags);
01468
01479 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
01480
01505 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
01506
01518 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
01519 int flags);
01520
01547 int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
01548
01553 int av_read_play(AVFormatContext *s);
01554
01560 int av_read_pause(AVFormatContext *s);
01561
01562 #if FF_API_FORMAT_PARAMETERS
01563
01568 attribute_deprecated
01569 void av_close_input_stream(AVFormatContext *s);
01570 #endif
01571
01572 #if FF_API_CLOSE_INPUT_FILE
01573
01579 attribute_deprecated
01580 void av_close_input_file(AVFormatContext *s);
01581 #endif
01582
01587 void avformat_close_input(AVFormatContext **s);
01592 #if FF_API_NEW_STREAM
01593
01603 attribute_deprecated
01604 AVStream *av_new_stream(AVFormatContext *s, int id);
01605 #endif
01606
01607 #if FF_API_SET_PTS_INFO
01608
01611 attribute_deprecated
01612 void av_set_pts_info(AVStream *s, int pts_wrap_bits,
01613 unsigned int pts_num, unsigned int pts_den);
01614 #endif
01615
01616 #define AVSEEK_FLAG_BACKWARD 1 ///< seek backward
01617 #define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes
01618 #define AVSEEK_FLAG_ANY 4 ///< seek to any frame, even non-keyframes
01619 #define AVSEEK_FLAG_FRAME 8 ///< seeking based on frame number
01620
01621 #if FF_API_SEEK_PUBLIC
01622 attribute_deprecated
01623 int av_seek_frame_binary(AVFormatContext *s, int stream_index,
01624 int64_t target_ts, int flags);
01625 attribute_deprecated
01626 void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
01627 attribute_deprecated
01628 int64_t av_gen_search(AVFormatContext *s, int stream_index,
01629 int64_t target_ts, int64_t pos_min,
01630 int64_t pos_max, int64_t pos_limit,
01631 int64_t ts_min, int64_t ts_max,
01632 int flags, int64_t *ts_ret,
01633 int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
01634 #endif
01635
01636 #if FF_API_FORMAT_PARAMETERS
01637
01640 attribute_deprecated int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap);
01641 #endif
01642
01662 int avformat_write_header(AVFormatContext *s, AVDictionary **options);
01663
01664 #if FF_API_FORMAT_PARAMETERS
01665
01676 attribute_deprecated int av_write_header(AVFormatContext *s);
01677 #endif
01678
01691 int av_write_frame(AVFormatContext *s, AVPacket *pkt);
01692
01717 int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
01718
01734 int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
01735 AVPacket *pkt, int flush);
01736
01746 int av_write_trailer(AVFormatContext *s);
01747
01760 AVOutputFormat *av_guess_format(const char *short_name,
01761 const char *filename,
01762 const char *mime_type);
01763
01767 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
01768 const char *filename, const char *mime_type,
01769 enum AVMediaType type);
01770
01794 void av_hex_dump(FILE *f, uint8_t *buf, int size);
01795
01808 void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
01809
01818 void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st);
01819
01820
01832 void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
01833 AVStream *st);
01834
01842 enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
01843
01851 unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);
01852
01853 int av_find_default_stream_index(AVFormatContext *s);
01854
01863 int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
01864
01871 int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
01872 int size, int distance, int flags);
01873
01874
01894 void av_url_split(char *proto, int proto_size,
01895 char *authorization, int authorization_size,
01896 char *hostname, int hostname_size,
01897 int *port_ptr,
01898 char *path, int path_size,
01899 const char *url);
01900
01901 #if FF_API_DUMP_FORMAT
01902 attribute_deprecated void dump_format(AVFormatContext *ic,
01903 int index,
01904 const char *url,
01905 int is_output);
01906 #endif
01907
01908 void av_dump_format(AVFormatContext *ic,
01909 int index,
01910 const char *url,
01911 int is_output);
01912
01913 #if FF_API_PARSE_DATE
01914
01921 attribute_deprecated
01922 int64_t parse_date(const char *datestr, int duration);
01923 #endif
01924
01928 int64_t av_gettime(void);
01929
01930 #if FF_API_FIND_INFO_TAG
01931
01934 attribute_deprecated int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
01935 #endif
01936
01949 int av_get_frame_filename(char *buf, int buf_size,
01950 const char *path, int number);
01951
01958 int av_filename_number_test(const char *filename);
01959
01974 int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
01975
01976 #if FF_API_SDP_CREATE
01977 attribute_deprecated int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
01978 #endif
01979
01986 int av_match_ext(const char *filename, const char *extensions);
01987
01996 int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance);
01997
02013 const struct AVCodecTag *avformat_get_riff_video_tags(void);
02017 const struct AVCodecTag *avformat_get_riff_audio_tags(void);
02026 #endif