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
00346 #define AVPROBE_PADDING_SIZE 32
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
00383 #define AVFMT_ALLOW_FLUSH 0x10000
00384 #define AVFMT_TS_NONSTRICT 0x8000000
00392 typedef struct AVOutputFormat {
00393 const char *name;
00399 const char *long_name;
00400 const char *mime_type;
00401 const char *extensions;
00405 int priv_data_size;
00406
00407 enum CodecID audio_codec;
00408 enum CodecID video_codec;
00409 int (*write_header)(struct AVFormatContext *);
00417 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
00418 int (*write_trailer)(struct AVFormatContext *);
00424 int flags;
00425
00426 void *dummy;
00427
00428 int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
00429 AVPacket *in, int flush);
00430
00435 const struct AVCodecTag * const *codec_tag;
00436
00437 enum CodecID subtitle_codec;
00439 #if FF_API_OLD_METADATA2
00440 const AVMetadataConv *metadata_conv;
00441 #endif
00442
00443 const AVClass *priv_class;
00444
00451 int (*query_codec)(enum CodecID id, int std_compliance);
00452
00453 void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
00454 int64_t *dts, int64_t *wall);
00455
00456
00457 struct AVOutputFormat *next;
00458 } AVOutputFormat;
00467 typedef struct AVInputFormat {
00472 const char *name;
00473
00479 const char *long_name;
00480
00484 int priv_data_size;
00485
00491 int (*read_probe)(AVProbeData *);
00492
00499 int (*read_header)(struct AVFormatContext *,
00500 AVFormatParameters *ap);
00501
00511 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
00512
00517 int (*read_close)(struct AVFormatContext *);
00518
00527 int (*read_seek)(struct AVFormatContext *,
00528 int stream_index, int64_t timestamp, int flags);
00529
00534 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
00535 int64_t *pos, int64_t pos_limit);
00536
00542 int flags;
00543
00549 const char *extensions;
00550
00554 int value;
00555
00560 int (*read_play)(struct AVFormatContext *);
00561
00566 int (*read_pause)(struct AVFormatContext *);
00567
00568 const struct AVCodecTag * const *codec_tag;
00569
00576 int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
00577
00578 #if FF_API_OLD_METADATA2
00579 const AVMetadataConv *metadata_conv;
00580 #endif
00581
00582 const AVClass *priv_class;
00583
00584
00585 struct AVInputFormat *next;
00586 } AVInputFormat;
00591 enum AVStreamParseType {
00592 AVSTREAM_PARSE_NONE,
00593 AVSTREAM_PARSE_FULL,
00594 AVSTREAM_PARSE_HEADERS,
00595 AVSTREAM_PARSE_TIMESTAMPS,
00596 AVSTREAM_PARSE_FULL_ONCE,
00597 };
00598
00599 typedef struct AVIndexEntry {
00600 int64_t pos;
00601 int64_t timestamp;
00607 #define AVINDEX_KEYFRAME 0x0001
00608 int flags:2;
00609 int size:30;
00610 int min_distance;
00611 } AVIndexEntry;
00612
00613 #define AV_DISPOSITION_DEFAULT 0x0001
00614 #define AV_DISPOSITION_DUB 0x0002
00615 #define AV_DISPOSITION_ORIGINAL 0x0004
00616 #define AV_DISPOSITION_COMMENT 0x0008
00617 #define AV_DISPOSITION_LYRICS 0x0010
00618 #define AV_DISPOSITION_KARAOKE 0x0020
00619
00625 #define AV_DISPOSITION_FORCED 0x0040
00626 #define AV_DISPOSITION_HEARING_IMPAIRED 0x0080
00627 #define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100
00628 #define AV_DISPOSITION_CLEAN_EFFECTS 0x0200
00637 typedef struct AVStream {
00638 int index;
00639 int id;
00640 AVCodecContext *codec;
00649 AVRational r_frame_rate;
00650 void *priv_data;
00651
00652 #if FF_API_REORDER_PRIVATE
00653
00654 int64_t first_dts;
00655 #endif
00656
00660 struct AVFrac pts;
00661
00669 AVRational time_base;
00670 #if FF_API_REORDER_PRIVATE
00671 int pts_wrap_bits;
00672 #endif
00673 #if FF_API_STREAM_COPY
00674
00675 attribute_deprecated int stream_copy;
00676 #endif
00677 enum AVDiscard discard;
00678
00679 #if FF_API_AVSTREAM_QUALITY
00680
00685 attribute_deprecated float quality;
00686 #endif
00687
00696 int64_t start_time;
00697
00703 int64_t duration;
00704
00705 #if FF_API_REORDER_PRIVATE
00706
00707 enum AVStreamParseType need_parsing;
00708 struct AVCodecParserContext *parser;
00709
00710 int64_t cur_dts;
00711 int last_IP_duration;
00712 int64_t last_IP_pts;
00713
00714 AVIndexEntry *index_entries;
00716 int nb_index_entries;
00717 unsigned int index_entries_allocated_size;
00718 #endif
00719
00720 int64_t nb_frames;
00721
00722 int disposition;
00724 #if FF_API_REORDER_PRIVATE
00725 AVProbeData probe_data;
00726 #define MAX_REORDER_DELAY 16
00727 int64_t pts_buffer[MAX_REORDER_DELAY+1];
00728 #endif
00729
00735 AVRational sample_aspect_ratio;
00736
00737 AVDictionary *metadata;
00738
00739 #if FF_API_REORDER_PRIVATE
00740
00741
00742 const uint8_t *cur_ptr;
00743 int cur_len;
00744 AVPacket cur_pkt;
00745
00746
00754 int64_t reference_dts;
00755
00760 #define MAX_PROBE_PACKETS 2500
00761 int probe_packets;
00762
00768 struct AVPacketList *last_in_packet_buffer;
00769 #endif
00770
00774 AVRational avg_frame_rate;
00775
00776
00777
00778
00779
00780
00781
00782
00783
00787 int codec_info_nb_frames;
00788
00794 int stream_identifier;
00795
00796 int64_t interleaver_chunk_size;
00797 int64_t interleaver_chunk_duration;
00798
00802 #define MAX_STD_TIMEBASES (60*12+5)
00803 struct {
00804 int64_t last_dts;
00805 int64_t duration_gcd;
00806 int duration_count;
00807 double duration_error[2][2][MAX_STD_TIMEBASES];
00808 int64_t codec_info_duration;
00809 int nb_decoded_frames;
00810 } *info;
00811
00816 int request_probe;
00817 #if !FF_API_REORDER_PRIVATE
00818 const uint8_t *cur_ptr;
00819 int cur_len;
00820 AVPacket cur_pkt;
00821
00822
00830 int64_t reference_dts;
00831 int64_t first_dts;
00832 int64_t cur_dts;
00833 int last_IP_duration;
00834 int64_t last_IP_pts;
00835
00839 #define MAX_PROBE_PACKETS 2500
00840 int probe_packets;
00841
00845 struct AVPacketList *last_in_packet_buffer;
00846 AVProbeData probe_data;
00847 #define MAX_REORDER_DELAY 16
00848 int64_t pts_buffer[MAX_REORDER_DELAY+1];
00849
00850 enum AVStreamParseType need_parsing;
00851 struct AVCodecParserContext *parser;
00852
00853 AVIndexEntry *index_entries;
00855 int nb_index_entries;
00856 unsigned int index_entries_allocated_size;
00857
00858 int pts_wrap_bits;
00859 #endif
00860 } AVStream;
00861
00862 #define AV_PROGRAM_RUNNING 1
00863
00870 typedef struct AVProgram {
00871 int id;
00872 int flags;
00873 enum AVDiscard discard;
00874 unsigned int *stream_index;
00875 unsigned int nb_stream_indexes;
00876 AVDictionary *metadata;
00877
00878 int program_num;
00879 int pmt_pid;
00880 int pcr_pid;
00881 } AVProgram;
00882
00883 #define AVFMTCTX_NOHEADER 0x0001
00886 typedef struct AVChapter {
00887 int id;
00888 AVRational time_base;
00889 int64_t start, end;
00890 AVDictionary *metadata;
00891 } AVChapter;
00892
00901 typedef struct AVFormatContext {
00906 const AVClass *av_class;
00907
00914 struct AVInputFormat *iformat;
00915 struct AVOutputFormat *oformat;
00916
00921 void *priv_data;
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934 AVIOContext *pb;
00935
00945 unsigned int nb_streams;
00946 AVStream **streams;
00947
00948 char filename[1024];
00949
00950 #if FF_API_TIMESTAMP
00951
00954 attribute_deprecated int64_t timestamp;
00955 #endif
00956
00957 int ctx_flags;
00958 #if FF_API_REORDER_PRIVATE
00959
00965 struct AVPacketList *packet_buffer;
00966 #endif
00967
00973 int64_t start_time;
00974
00981 int64_t duration;
00982
00983 #if FF_API_FILESIZE
00984
00987 attribute_deprecated int64_t file_size;
00988 #endif
00989
00995 int bit_rate;
00996
00997 #if FF_API_REORDER_PRIVATE
00998
00999 AVStream *cur_st;
01000
01001
01002 int64_t data_offset;
01003 #endif
01004
01005 #if FF_API_MUXRATE
01006
01009 attribute_deprecated int mux_rate;
01010 #endif
01011 unsigned int packet_size;
01012 #if FF_API_PRELOAD
01013 attribute_deprecated int preload;
01014 #endif
01015 int max_delay;
01016
01017 #if FF_API_LOOP_OUTPUT
01018 #define AVFMT_NOOUTPUTLOOP -1
01019 #define AVFMT_INFINITEOUTPUTLOOP 0
01020
01025 attribute_deprecated int loop_output;
01026 #endif
01027
01028 int flags;
01029 #define AVFMT_FLAG_GENPTS 0x0001
01030 #define AVFMT_FLAG_IGNIDX 0x0002
01031 #define AVFMT_FLAG_NONBLOCK 0x0004
01032 #define AVFMT_FLAG_IGNDTS 0x0008
01033 #define AVFMT_FLAG_NOFILLIN 0x0010
01034 #define AVFMT_FLAG_NOPARSE 0x0020
01035 #if FF_API_FLAG_RTP_HINT
01036 #define AVFMT_FLAG_RTP_HINT 0x0040
01037 #endif
01038 #define AVFMT_FLAG_CUSTOM_IO 0x0080
01039 #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100
01040 #define AVFMT_FLAG_MP4A_LATM 0x8000
01041 #define AVFMT_FLAG_SORT_DTS 0x10000
01042 #define AVFMT_FLAG_PRIV_OPT 0x20000
01043 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000
01044
01045 #if FF_API_LOOP_INPUT
01046
01049 attribute_deprecated int loop_input;
01050 #endif
01051
01055 unsigned int probesize;
01056
01061 int max_analyze_duration;
01062
01063 const uint8_t *key;
01064 int keylen;
01065
01066 unsigned int nb_programs;
01067 AVProgram **programs;
01068
01073 enum CodecID video_codec_id;
01074
01079 enum CodecID audio_codec_id;
01080
01085 enum CodecID subtitle_codec_id;
01086
01097 unsigned int max_index_size;
01098
01103 unsigned int max_picture_buffer;
01104
01105 unsigned int nb_chapters;
01106 AVChapter **chapters;
01107
01111 int debug;
01112 #define FF_FDEBUG_TS 0x0001
01113
01114 #if FF_API_REORDER_PRIVATE
01115
01121 struct AVPacketList *raw_packet_buffer;
01122 struct AVPacketList *raw_packet_buffer_end;
01123
01124 struct AVPacketList *packet_buffer_end;
01125 #endif
01126
01127 AVDictionary *metadata;
01128
01129 #if FF_API_REORDER_PRIVATE
01130
01134 #define RAW_PACKET_BUFFER_SIZE 2500000
01135 int raw_packet_buffer_remaining_size;
01136 #endif
01137
01145 int64_t start_time_realtime;
01146
01150 int fps_probe_size;
01151
01158 int error_recognition;
01159
01169 AVIOInterruptCB interrupt_callback;
01170
01175 int ts_id;
01176
01183 int audio_preload;
01184
01191 int max_chunk_duration;
01192
01199 int max_chunk_size;
01200
01201
01202
01203
01204
01205
01206
01207
01208 #if !FF_API_REORDER_PRIVATE
01209
01215 struct AVPacketList *raw_packet_buffer;
01216 struct AVPacketList *raw_packet_buffer_end;
01220 #define RAW_PACKET_BUFFER_SIZE 2500000
01221 int raw_packet_buffer_remaining_size;
01222
01228 struct AVPacketList *packet_buffer;
01229 struct AVPacketList *packet_buffer_end;
01230
01231
01232 AVStream *cur_st;
01233
01234
01235 int64_t data_offset;
01236 #endif
01237 } AVFormatContext;
01238
01239 typedef struct AVPacketList {
01240 AVPacket pkt;
01241 struct AVPacketList *next;
01242 } AVPacketList;
01243
01244
01257 unsigned avformat_version(void);
01258
01262 const char *avformat_configuration(void);
01263
01267 const char *avformat_license(void);
01268
01278 void av_register_all(void);
01279
01280 void av_register_input_format(AVInputFormat *format);
01281 void av_register_output_format(AVOutputFormat *format);
01282
01291 int avformat_network_init(void);
01292
01296 int avformat_network_deinit(void);
01297
01303 AVInputFormat *av_iformat_next(AVInputFormat *f);
01304
01310 AVOutputFormat *av_oformat_next(AVOutputFormat *f);
01311
01317 AVFormatContext *avformat_alloc_context(void);
01318
01323 void avformat_free_context(AVFormatContext *s);
01324
01331 const AVClass *avformat_get_class(void);
01332
01348 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c);
01349
01350 AVProgram *av_new_program(AVFormatContext *s, int id);
01351
01357 #if FF_API_GUESS_IMG2_CODEC
01358 attribute_deprecated enum CodecID av_guess_image2_codec(const char *filename);
01359 #endif
01360
01361 #if FF_API_PKT_DUMP
01362 attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
01363 attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt,
01364 int dump_payload);
01365 #endif
01366
01367
01368 #if FF_API_ALLOC_OUTPUT_CONTEXT
01369
01372 attribute_deprecated
01373 AVFormatContext *avformat_alloc_output_context(const char *format,
01374 AVOutputFormat *oformat,
01375 const char *filename);
01376 #endif
01377
01394 int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oformat,
01395 const char *format_name, const char *filename);
01396
01405 AVInputFormat *av_find_input_format(const char *short_name);
01406
01413 AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
01414
01426 AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
01427
01435 AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);
01436
01452 int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
01453 const char *filename, void *logctx,
01454 unsigned int offset, unsigned int max_probe_size);
01455
01456 #if FF_API_FORMAT_PARAMETERS
01457
01462 attribute_deprecated int av_open_input_stream(AVFormatContext **ic_ptr,
01463 AVIOContext *pb, const char *filename,
01464 AVInputFormat *fmt, AVFormatParameters *ap);
01465
01480 attribute_deprecated int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
01481 AVInputFormat *fmt,
01482 int buf_size,
01483 AVFormatParameters *ap);
01484 #endif
01485
01505 int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
01506
01507 int av_demuxer_open(AVFormatContext *ic, AVFormatParameters *ap);
01508
01509 #if FF_API_FORMAT_PARAMETERS
01510
01525 attribute_deprecated
01526 int av_find_stream_info(AVFormatContext *ic);
01527 #endif
01528
01550 int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
01551
01562 AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s);
01563
01588 int av_find_best_stream(AVFormatContext *ic,
01589 enum AVMediaType type,
01590 int wanted_stream_nb,
01591 int related_stream,
01592 AVCodec **decoder_ret,
01593 int flags);
01594
01605 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
01606
01631 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
01632
01644 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
01645 int flags);
01646
01673 int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
01674
01679 int av_read_play(AVFormatContext *s);
01680
01686 int av_read_pause(AVFormatContext *s);
01687
01688 #if FF_API_FORMAT_PARAMETERS
01689
01694 attribute_deprecated
01695 void av_close_input_stream(AVFormatContext *s);
01696 #endif
01697
01698 #if FF_API_CLOSE_INPUT_FILE
01699
01705 attribute_deprecated
01706 void av_close_input_file(AVFormatContext *s);
01707 #endif
01708
01713 void avformat_close_input(AVFormatContext **s);
01718 #if FF_API_NEW_STREAM
01719
01729 attribute_deprecated
01730 AVStream *av_new_stream(AVFormatContext *s, int id);
01731 #endif
01732
01733 #if FF_API_SET_PTS_INFO
01734
01737 attribute_deprecated
01738 void av_set_pts_info(AVStream *s, int pts_wrap_bits,
01739 unsigned int pts_num, unsigned int pts_den);
01740 #endif
01741
01742 #define AVSEEK_FLAG_BACKWARD 1
01743 #define AVSEEK_FLAG_BYTE 2
01744 #define AVSEEK_FLAG_ANY 4
01745 #define AVSEEK_FLAG_FRAME 8
01746
01747 #if FF_API_SEEK_PUBLIC
01748 attribute_deprecated
01749 int av_seek_frame_binary(AVFormatContext *s, int stream_index,
01750 int64_t target_ts, int flags);
01751 attribute_deprecated
01752 void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
01753 attribute_deprecated
01754 int64_t av_gen_search(AVFormatContext *s, int stream_index,
01755 int64_t target_ts, int64_t pos_min,
01756 int64_t pos_max, int64_t pos_limit,
01757 int64_t ts_min, int64_t ts_max,
01758 int flags, int64_t *ts_ret,
01759 int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
01760 #endif
01761
01762 #if FF_API_FORMAT_PARAMETERS
01763
01766 attribute_deprecated int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap);
01767 #endif
01768
01788 int avformat_write_header(AVFormatContext *s, AVDictionary **options);
01789
01790 #if FF_API_FORMAT_PARAMETERS
01791
01802 attribute_deprecated int av_write_header(AVFormatContext *s);
01803 #endif
01804
01821 int av_write_frame(AVFormatContext *s, AVPacket *pkt);
01822
01847 int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
01848
01864 int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
01865 AVPacket *pkt, int flush);
01866
01876 int av_write_trailer(AVFormatContext *s);
01877
01890 AVOutputFormat *av_guess_format(const char *short_name,
01891 const char *filename,
01892 const char *mime_type);
01893
01897 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
01898 const char *filename, const char *mime_type,
01899 enum AVMediaType type);
01900
01916 int av_get_output_timestamp(struct AVFormatContext *s, int stream,
01917 int64_t *dts, int64_t *wall);
01918
01919
01943 void av_hex_dump(FILE *f, uint8_t *buf, int size);
01944
01957 void av_hex_dump_log(void *avcl, int level, uint8_t *buf, int size);
01958
01967 void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st);
01968
01969
01981 void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
01982 AVStream *st);
01983
01991 enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
01992
02000 unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);
02001
02002 int av_find_default_stream_index(AVFormatContext *s);
02003
02012 int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
02013
02020 int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp,
02021 int size, int distance, int flags);
02022
02023
02043 void av_url_split(char *proto, int proto_size,
02044 char *authorization, int authorization_size,
02045 char *hostname, int hostname_size,
02046 int *port_ptr,
02047 char *path, int path_size,
02048 const char *url);
02049
02050 #if FF_API_DUMP_FORMAT
02051
02054 attribute_deprecated void dump_format(AVFormatContext *ic,
02055 int index,
02056 const char *url,
02057 int is_output);
02058 #endif
02059
02060 void av_dump_format(AVFormatContext *ic,
02061 int index,
02062 const char *url,
02063 int is_output);
02064
02065 #if FF_API_PARSE_DATE
02066
02073 attribute_deprecated
02074 int64_t parse_date(const char *datestr, int duration);
02075 #endif
02076
02080 int64_t av_gettime(void);
02081
02082 #if FF_API_FIND_INFO_TAG
02083
02086 attribute_deprecated int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
02087 #endif
02088
02101 int av_get_frame_filename(char *buf, int buf_size,
02102 const char *path, int number);
02103
02110 int av_filename_number_test(const char *filename);
02111
02126 int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
02127
02128 #if FF_API_SDP_CREATE
02129 attribute_deprecated int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
02130 #endif
02131
02138 int av_match_ext(const char *filename, const char *extensions);
02139
02148 int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance);
02149
02165 const struct AVCodecTag *avformat_get_riff_video_tags(void);
02169 const struct AVCodecTag *avformat_get_riff_audio_tags(void);
02178 #endif