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
00068 unsigned avformat_version(void);
00069
00073 const char *avformat_configuration(void);
00074
00078 const char *avformat_license(void);
00079
00080 #include <time.h>
00081 #include <stdio.h>
00082 #include "libavcodec/avcodec.h"
00083 #include "libavutil/dict.h"
00084 #include "libavutil/log.h"
00085
00086 #include "avio.h"
00087 #include "libavformat/version.h"
00088
00089 struct AVFormatContext;
00090
00091
00165 #if FF_API_OLD_METADATA2
00166
00173 #define AV_METADATA_MATCH_CASE AV_DICT_MATCH_CASE
00174 #define AV_METADATA_IGNORE_SUFFIX AV_DICT_IGNORE_SUFFIX
00175 #define AV_METADATA_DONT_STRDUP_KEY AV_DICT_DONT_STRDUP_KEY
00176 #define AV_METADATA_DONT_STRDUP_VAL AV_DICT_DONT_STRDUP_VAL
00177 #define AV_METADATA_DONT_OVERWRITE AV_DICT_DONT_OVERWRITE
00178
00179 typedef attribute_deprecated AVDictionary AVMetadata;
00180 typedef attribute_deprecated AVDictionaryEntry AVMetadataTag;
00181
00182 typedef struct AVMetadataConv AVMetadataConv;
00183
00192 attribute_deprecated AVDictionaryEntry *
00193 av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
00194
00205 attribute_deprecated int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags);
00206
00210 attribute_deprecated void av_metadata_conv(struct AVFormatContext *ctx, const AVMetadataConv *d_conv,
00211 const AVMetadataConv *s_conv);
00212
00221 attribute_deprecated void av_metadata_copy(AVDictionary **dst, AVDictionary *src, int flags);
00222
00226 attribute_deprecated void av_metadata_free(AVDictionary **m);
00230 #endif
00231
00232
00233
00234
00235
00244 int av_get_packet(AVIOContext *s, AVPacket *pkt, int size);
00245
00246
00260 int av_append_packet(AVIOContext *s, AVPacket *pkt, int size);
00261
00262
00263
00264
00269 typedef struct AVFrac {
00270 int64_t val, num, den;
00271 } AVFrac;
00272
00273
00274
00275
00276 struct AVCodecTag;
00277
00281 typedef struct AVProbeData {
00282 const char *filename;
00283 unsigned char *buf;
00284 int buf_size;
00285 } AVProbeData;
00286
00287 #define AVPROBE_SCORE_MAX 100
00288 #define AVPROBE_PADDING_SIZE 32
00289
00290 typedef struct AVFormatParameters {
00291 #if FF_API_FORMAT_PARAMETERS
00292 attribute_deprecated AVRational time_base;
00293 attribute_deprecated int sample_rate;
00294 attribute_deprecated int channels;
00295 attribute_deprecated int width;
00296 attribute_deprecated int height;
00297 attribute_deprecated enum PixelFormat pix_fmt;
00298 attribute_deprecated int channel;
00299 attribute_deprecated const char *standard;
00300 attribute_deprecated unsigned int mpeg2ts_raw:1;
00302 attribute_deprecated unsigned int mpeg2ts_compute_pcr:1;
00303 attribute_deprecated unsigned int initial_pause:1;
00305 attribute_deprecated unsigned int prealloced_context:1;
00306 #endif
00307 } AVFormatParameters;
00308
00310 #define AVFMT_NOFILE 0x0001
00311 #define AVFMT_NEEDNUMBER 0x0002
00312 #define AVFMT_SHOW_IDS 0x0008
00313 #define AVFMT_RAWPICTURE 0x0020
00315 #define AVFMT_GLOBALHEADER 0x0040
00316 #define AVFMT_NOTIMESTAMPS 0x0080
00317 #define AVFMT_GENERIC_INDEX 0x0100
00318 #define AVFMT_TS_DISCONT 0x0200
00319 #define AVFMT_VARIABLE_FPS 0x0400
00320 #define AVFMT_NODIMENSIONS 0x0800
00321 #define AVFMT_NOSTREAMS 0x1000
00322 #define AVFMT_NOBINSEARCH 0x2000
00323 #define AVFMT_NOGENSEARCH 0x4000
00324 #define AVFMT_NO_BYTE_SEEK 0x8000
00325 #define AVFMT_TS_NONSTRICT 0x8000000
00333 typedef struct AVOutputFormat {
00334 const char *name;
00340 const char *long_name;
00341 const char *mime_type;
00342 const char *extensions;
00346 int priv_data_size;
00347
00348 enum CodecID audio_codec;
00349 enum CodecID video_codec;
00350 int (*write_header)(struct AVFormatContext *);
00351 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
00352 int (*write_trailer)(struct AVFormatContext *);
00358 int flags;
00359
00360 void *dummy;
00361
00362 int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
00363 AVPacket *in, int flush);
00364
00369 const struct AVCodecTag * const *codec_tag;
00370
00371 enum CodecID subtitle_codec;
00373 #if FF_API_OLD_METADATA2
00374 const AVMetadataConv *metadata_conv;
00375 #endif
00376
00377 const AVClass *priv_class;
00378
00385 int (*query_codec)(enum CodecID id, int std_compliance);
00386
00387 void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
00388 int64_t *dts, int64_t *wall);
00389
00390
00391 struct AVOutputFormat *next;
00392 } AVOutputFormat;
00401 typedef struct AVInputFormat {
00406 const char *name;
00407
00413 const char *long_name;
00414
00418 int priv_data_size;
00419
00425 int (*read_probe)(AVProbeData *);
00426
00433 int (*read_header)(struct AVFormatContext *,
00434 AVFormatParameters *ap);
00435
00445 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
00446
00451 int (*read_close)(struct AVFormatContext *);
00452
00453 #if FF_API_READ_SEEK
00454
00462 attribute_deprecated int (*read_seek)(struct AVFormatContext *,
00463 int stream_index, int64_t timestamp, int flags);
00464 #endif
00465
00469 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
00470 int64_t *pos, int64_t pos_limit);
00471
00477 int flags;
00478
00484 const char *extensions;
00485
00489 int value;
00490
00495 int (*read_play)(struct AVFormatContext *);
00496
00501 int (*read_pause)(struct AVFormatContext *);
00502
00503 const struct AVCodecTag * const *codec_tag;
00504
00511 int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
00512
00513 #if FF_API_OLD_METADATA2
00514 const AVMetadataConv *metadata_conv;
00515 #endif
00516
00517 const AVClass *priv_class;
00518
00519
00520 struct AVInputFormat *next;
00521 } AVInputFormat;
00526 enum AVStreamParseType {
00527 AVSTREAM_PARSE_NONE,
00528 AVSTREAM_PARSE_FULL,
00529 AVSTREAM_PARSE_HEADERS,
00530 AVSTREAM_PARSE_TIMESTAMPS,
00531 AVSTREAM_PARSE_FULL_ONCE,
00532 };
00533
00534 typedef struct AVIndexEntry {
00535 int64_t pos;
00536 int64_t timestamp;
00542 #define AVINDEX_KEYFRAME 0x0001
00543 int flags:2;
00544 int size:30;
00545 int min_distance;
00546 } AVIndexEntry;
00547
00548 #define AV_DISPOSITION_DEFAULT 0x0001
00549 #define AV_DISPOSITION_DUB 0x0002
00550 #define AV_DISPOSITION_ORIGINAL 0x0004
00551 #define AV_DISPOSITION_COMMENT 0x0008
00552 #define AV_DISPOSITION_LYRICS 0x0010
00553 #define AV_DISPOSITION_KARAOKE 0x0020
00554
00560 #define AV_DISPOSITION_FORCED 0x0040
00561 #define AV_DISPOSITION_HEARING_IMPAIRED 0x0080
00562 #define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100
00563 #define AV_DISPOSITION_CLEAN_EFFECTS 0x0200
00572 typedef struct AVStream {
00573 int index;
00574 int id;
00575 AVCodecContext *codec;
00584 AVRational r_frame_rate;
00585 void *priv_data;
00586
00587 #if FF_API_REORDER_PRIVATE
00588
00589 int64_t first_dts;
00590 #endif
00591
00595 struct AVFrac pts;
00596
00604 AVRational time_base;
00605 #if FF_API_REORDER_PRIVATE
00606 int pts_wrap_bits;
00607 #endif
00608 #if FF_API_STREAM_COPY
00609
00610 attribute_deprecated int stream_copy;
00611 #endif
00612 enum AVDiscard discard;
00613
00614 #if FF_API_AVSTREAM_QUALITY
00615
00620 attribute_deprecated float quality;
00621 #endif
00622
00631 int64_t start_time;
00632
00638 int64_t duration;
00639
00640 #if FF_API_REORDER_PRIVATE
00641
00642 enum AVStreamParseType need_parsing;
00643 struct AVCodecParserContext *parser;
00644
00645 int64_t cur_dts;
00646 int last_IP_duration;
00647 int64_t last_IP_pts;
00648
00649 AVIndexEntry *index_entries;
00651 int nb_index_entries;
00652 unsigned int index_entries_allocated_size;
00653 #endif
00654
00655 int64_t nb_frames;
00656
00657 int disposition;
00659 #if FF_API_REORDER_PRIVATE
00660 AVProbeData probe_data;
00661 #define MAX_REORDER_DELAY 16
00662 int64_t pts_buffer[MAX_REORDER_DELAY+1];
00663 #endif
00664
00670 AVRational sample_aspect_ratio;
00671
00672 AVDictionary *metadata;
00673
00674 #if FF_API_REORDER_PRIVATE
00675
00676
00677 const uint8_t *cur_ptr;
00678 int cur_len;
00679 AVPacket cur_pkt;
00680
00681
00689 int64_t reference_dts;
00690
00695 #define MAX_PROBE_PACKETS 2500
00696 int probe_packets;
00697
00702 struct AVPacketList *last_in_packet_buffer;
00703 #endif
00704
00708 AVRational avg_frame_rate;
00709
00710
00711
00712
00713
00714
00715
00716
00717
00721 int codec_info_nb_frames;
00722
00728 int stream_identifier;
00729
00730 int64_t interleaver_chunk_size;
00731 int64_t interleaver_chunk_duration;
00732
00736 #define MAX_STD_TIMEBASES (60*12+5)
00737 struct {
00738 int64_t last_dts;
00739 int64_t duration_gcd;
00740 int duration_count;
00741 double duration_error[2][2][MAX_STD_TIMEBASES];
00742 int64_t codec_info_duration;
00743 int nb_decoded_frames;
00744 } *info;
00745
00750 int request_probe;
00751 #if !FF_API_REORDER_PRIVATE
00752 const uint8_t *cur_ptr;
00753 int cur_len;
00754 AVPacket cur_pkt;
00755
00756
00764 int64_t reference_dts;
00765 int64_t first_dts;
00766 int64_t cur_dts;
00767 int last_IP_duration;
00768 int64_t last_IP_pts;
00769
00773 #define MAX_PROBE_PACKETS 2500
00774 int probe_packets;
00775
00779 struct AVPacketList *last_in_packet_buffer;
00780 AVProbeData probe_data;
00781 #define MAX_REORDER_DELAY 16
00782 int64_t pts_buffer[MAX_REORDER_DELAY+1];
00783
00784 enum AVStreamParseType need_parsing;
00785 struct AVCodecParserContext *parser;
00786
00787 AVIndexEntry *index_entries;
00789 int nb_index_entries;
00790 unsigned int index_entries_allocated_size;
00791
00792 int pts_wrap_bits;
00793 #endif
00794 } AVStream;
00795
00796 #define AV_PROGRAM_RUNNING 1
00797
00804 typedef struct AVProgram {
00805 int id;
00806 int flags;
00807 enum AVDiscard discard;
00808 unsigned int *stream_index;
00809 unsigned int nb_stream_indexes;
00810 AVDictionary *metadata;
00811
00812 int program_num;
00813 int pmt_pid;
00814 int pcr_pid;
00815 } AVProgram;
00816
00817 #define AVFMTCTX_NOHEADER 0x0001
00820 typedef struct AVChapter {
00821 int id;
00822 AVRational time_base;
00823 int64_t start, end;
00824 AVDictionary *metadata;
00825 } AVChapter;
00826
00835 typedef struct AVFormatContext {
00840 const AVClass *av_class;
00841
00848 struct AVInputFormat *iformat;
00849 struct AVOutputFormat *oformat;
00850
00855 void *priv_data;
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868 AVIOContext *pb;
00869
00879 unsigned int nb_streams;
00880 AVStream **streams;
00881
00882 char filename[1024];
00883
00884 #if FF_API_TIMESTAMP
00885
00888 attribute_deprecated int64_t timestamp;
00889 #endif
00890
00891 int ctx_flags;
00892 #if FF_API_REORDER_PRIVATE
00893
00899 struct AVPacketList *packet_buffer;
00900 #endif
00901
00907 int64_t start_time;
00908
00915 int64_t duration;
00916
00917 #if FF_API_FILESIZE
00918
00921 attribute_deprecated int64_t file_size;
00922 #endif
00923
00929 int bit_rate;
00930
00931 #if FF_API_REORDER_PRIVATE
00932
00933 AVStream *cur_st;
00934
00935
00936 int64_t data_offset;
00937 #endif
00938
00939 #if FF_API_MUXRATE
00940
00943 attribute_deprecated int mux_rate;
00944 #endif
00945 unsigned int packet_size;
00946 #if FF_API_PRELOAD
00947 attribute_deprecated int preload;
00948 #endif
00949 int max_delay;
00950
00951 #if FF_API_LOOP_OUTPUT
00952 #define AVFMT_NOOUTPUTLOOP -1
00953 #define AVFMT_INFINITEOUTPUTLOOP 0
00954
00959 attribute_deprecated int loop_output;
00960 #endif
00961
00962 int flags;
00963 #define AVFMT_FLAG_GENPTS 0x0001
00964 #define AVFMT_FLAG_IGNIDX 0x0002
00965 #define AVFMT_FLAG_NONBLOCK 0x0004
00966 #define AVFMT_FLAG_IGNDTS 0x0008
00967 #define AVFMT_FLAG_NOFILLIN 0x0010
00968 #define AVFMT_FLAG_NOPARSE 0x0020
00969 #if FF_API_FLAG_RTP_HINT
00970 #define AVFMT_FLAG_RTP_HINT 0x0040
00971 #endif
00972 #define AVFMT_FLAG_CUSTOM_IO 0x0080
00973 #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100
00974 #define AVFMT_FLAG_MP4A_LATM 0x8000
00975 #define AVFMT_FLAG_SORT_DTS 0x10000
00976 #define AVFMT_FLAG_PRIV_OPT 0x20000
00977 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000
00978
00979 #if FF_API_LOOP_INPUT
00980
00983 attribute_deprecated int loop_input;
00984 #endif
00985
00989 unsigned int probesize;
00990
00995 int max_analyze_duration;
00996
00997 const uint8_t *key;
00998 int keylen;
00999
01000 unsigned int nb_programs;
01001 AVProgram **programs;
01002
01007 enum CodecID video_codec_id;
01008
01013 enum CodecID audio_codec_id;
01014
01019 enum CodecID subtitle_codec_id;
01020
01031 unsigned int max_index_size;
01032
01037 unsigned int max_picture_buffer;
01038
01039 unsigned int nb_chapters;
01040 AVChapter **chapters;
01041
01045 int debug;
01046 #define FF_FDEBUG_TS 0x0001
01047
01048 #if FF_API_REORDER_PRIVATE
01049
01055 struct AVPacketList *raw_packet_buffer;
01056 struct AVPacketList *raw_packet_buffer_end;
01057
01058 struct AVPacketList *packet_buffer_end;
01059 #endif
01060
01061 AVDictionary *metadata;
01062
01063 #if FF_API_REORDER_PRIVATE
01064
01068 #define RAW_PACKET_BUFFER_SIZE 2500000
01069 int raw_packet_buffer_remaining_size;
01070 #endif
01071
01079 int64_t start_time_realtime;
01080
01084 int fps_probe_size;
01085
01092 int error_recognition;
01093
01103 AVIOInterruptCB interrupt_callback;
01104
01109 int ts_id;
01110
01117 int audio_preload;
01118
01125 int max_chunk_duration;
01126
01133 int max_chunk_size;
01134
01135
01136
01137
01138
01139
01140
01141
01142 #if !FF_API_REORDER_PRIVATE
01143
01149 struct AVPacketList *raw_packet_buffer;
01150 struct AVPacketList *raw_packet_buffer_end;
01154 #define RAW_PACKET_BUFFER_SIZE 2500000
01155 int raw_packet_buffer_remaining_size;
01156
01162 struct AVPacketList *packet_buffer;
01163 struct AVPacketList *packet_buffer_end;
01164
01165
01166 AVStream *cur_st;
01167
01168
01169 int64_t data_offset;
01170 #endif
01171 } AVFormatContext;
01172
01173 typedef struct AVPacketList {
01174 AVPacket pkt;
01175 struct AVPacketList *next;
01176 } AVPacketList;
01177
01183 AVInputFormat *av_iformat_next(AVInputFormat *f);
01184
01190 AVOutputFormat *av_oformat_next(AVOutputFormat *f);
01191
01192 #if FF_API_GUESS_IMG2_CODEC
01193 attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename);
01194 #endif
01195
01196
01197
01198
01199
01200 void av_register_input_format(AVInputFormat *format);
01201 void av_register_output_format(AVOutputFormat *format);
01202
01215 AVOutputFormat *av_guess_format(const char *short_name,
01216 const char *filename,
01217 const char *mime_type);
01218
01222 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
01223 const char *filename, const char *mime_type,
01224 enum AVMediaType type);
01225
01235 void av_hex_dump(FILE *f, uint8_t *buf, int size);
01236
01249 void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
01250
01259 void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st);
01260
01261
01273 void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
01274 AVStream *st);
01275
01276 #if FF_API_PKT_DUMP
01277 attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
01278 attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
01279 int dump_payload);
01280 #endif
01281
01291 void av_register_all(void);
01292
01300 enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
01301
01309 unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);
01310
01316 AVFormatContext *avformat_alloc_context(void);
01317
01318 #if FF_API_ALLOC_OUTPUT_CONTEXT
01319
01322 attribute_deprecated
01323 AVFormatContext *avformat_alloc_output_context(const char *format,
01324 AVOutputFormat *oformat,
01325 const char *filename);
01326 #endif
01327
01344 int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oformat,
01345 const char *format_name, const char *filename);
01346
01355 AVInputFormat *av_find_input_format(const char *short_name);
01356
01363 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
01364
01376 AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
01377
01385 AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);
01386
01402 int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
01403 const char *filename, void *logctx,
01404 unsigned int offset, unsigned int max_probe_size);
01405
01406 #if FF_API_FORMAT_PARAMETERS
01407
01412 attribute_deprecated int av_open_input_stream(AVFormatContext **ic_ptr,
01413 AVIOContext *pb, const char *filename,
01414 AVInputFormat *fmt, AVFormatParameters *ap);
01415
01430 attribute_deprecated int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
01431 AVInputFormat *fmt,
01432 int buf_size,
01433 AVFormatParameters *ap);
01434 #endif
01435
01455 int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
01456
01457 int av_demuxer_open(AVFormatContext *ic, AVFormatParameters *ap);
01458
01459 #if FF_API_FORMAT_PARAMETERS
01460
01475 attribute_deprecated
01476 int av_find_stream_info(AVFormatContext *ic);
01477 #endif
01478
01500 int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
01501
01512 AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s);
01513
01538 int av_find_best_stream(AVFormatContext *ic,
01539 enum AVMediaType type,
01540 int wanted_stream_nb,
01541 int related_stream,
01542 AVCodec **decoder_ret,
01543 int flags);
01544
01555 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
01556
01581 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
01582
01594 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
01595 int flags);
01596
01623 int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
01624
01629 int av_read_play(AVFormatContext *s);
01630
01636 int av_read_pause(AVFormatContext *s);
01637
01642 void av_close_input_stream(AVFormatContext *s);
01643
01644 #if FF_API_CLOSE_INPUT_FILE
01645
01651 attribute_deprecated
01652 void av_close_input_file(AVFormatContext *s);
01653 #endif
01654
01659 void avformat_close_input(AVFormatContext **s);
01668 void avformat_free_context(AVFormatContext *s);
01669
01670 #if FF_API_NEW_STREAM
01671
01681 attribute_deprecated
01682 AVStream *av_new_stream(AVFormatContext *s, int id);
01683 #endif
01684
01700 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c);
01701
01702 AVProgram *av_new_program(AVFormatContext *s, int id);
01703
01704 #if FF_API_SET_PTS_INFO
01705
01708 attribute_deprecated
01709 void av_set_pts_info(AVStream *s, int pts_wrap_bits,
01710 unsigned int pts_num, unsigned int pts_den);
01711 #endif
01712
01713 #define AVSEEK_FLAG_BACKWARD 1
01714 #define AVSEEK_FLAG_BYTE 2
01715 #define AVSEEK_FLAG_ANY 4
01716 #define AVSEEK_FLAG_FRAME 8
01717
01718 int av_find_default_stream_index(AVFormatContext *s);
01719
01728 int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
01729
01736 int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
01737 int size, int distance, int flags);
01738
01739 #if FF_API_SEEK_PUBLIC
01740 attribute_deprecated
01741 int av_seek_frame_binary(AVFormatContext *s, int stream_index,
01742 int64_t target_ts, int flags);
01743 attribute_deprecated
01744 void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
01745 attribute_deprecated
01746 int64_t av_gen_search(AVFormatContext *s, int stream_index,
01747 int64_t target_ts, int64_t pos_min,
01748 int64_t pos_max, int64_t pos_limit,
01749 int64_t ts_min, int64_t ts_max,
01750 int flags, int64_t *ts_ret,
01751 int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
01752 #endif
01753
01754 #if FF_API_FORMAT_PARAMETERS
01755
01758 attribute_deprecated int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap);
01759 #endif
01760
01780 void av_url_split(char *proto, int proto_size,
01781 char *authorization, int authorization_size,
01782 char *hostname, int hostname_size,
01783 int *port_ptr,
01784 char *path, int path_size,
01785 const char *url);
01805 int avformat_write_header(AVFormatContext *s, AVDictionary **options);
01806
01807 #if FF_API_FORMAT_PARAMETERS
01808
01819 attribute_deprecated int av_write_header(AVFormatContext *s);
01820 #endif
01821
01834 int av_write_frame(AVFormatContext *s, AVPacket *pkt);
01835
01851 int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
01852
01868 int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
01869 AVPacket *pkt, int flush);
01870
01880 int av_write_trailer(AVFormatContext *s);
01900 int av_get_output_timestamp(struct AVFormatContext *s, int stream,
01901 int64_t *dts, int64_t *wall);
01902
01903 #if FF_API_DUMP_FORMAT
01904
01907 attribute_deprecated void dump_format(AVFormatContext *ic,
01908 int index,
01909 const char *url,
01910 int is_output);
01911 #endif
01912
01913 void av_dump_format(AVFormatContext *ic,
01914 int index,
01915 const char *url,
01916 int is_output);
01917
01918 #if FF_API_PARSE_DATE
01919
01926 attribute_deprecated
01927 int64_t parse_date(const char *datestr, int duration);
01928 #endif
01929
01933 int64_t av_gettime(void);
01934
01935 #if FF_API_FIND_INFO_TAG
01936
01939 attribute_deprecated int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
01940 #endif
01941
01954 int av_get_frame_filename(char *buf, int buf_size,
01955 const char *path, int number);
01956
01963 int av_filename_number_test(const char *filename);
01964
01979 int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
01980
01981 #if FF_API_SDP_CREATE
01982 attribute_deprecated int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
01983 #endif
01984
01991 int av_match_ext(const char *filename, const char *extensions);
01992
02001 int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance);
02002
02009 const AVClass *avformat_get_class(void);
02010
02019 int avformat_network_init(void);
02020
02024 int avformat_network_deinit(void);
02025
02026 #endif