21 #ifndef AVFORMAT_AVFORMAT_H 22 #define AVFORMAT_AVFORMAT_H 448 typedef struct AVFrac {
449 int64_t val, num, den;
468 #define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) 469 #define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1) 471 #define AVPROBE_SCORE_EXTENSION 50 472 #define AVPROBE_SCORE_MIME 75 473 #define AVPROBE_SCORE_MAX 100 475 #define AVPROBE_PADDING_SIZE 32 477 #define AVFMT_NOFILE 0x0001 479 #define AVFMT_NEEDNUMBER 0x0002 480 #define AVFMT_SHOW_IDS 0x0008 481 #if FF_API_LAVF_FMT_RAWPICTURE 482 #define AVFMT_RAWPICTURE 0x0020 485 #define AVFMT_GLOBALHEADER 0x0040 486 #define AVFMT_NOTIMESTAMPS 0x0080 487 #define AVFMT_GENERIC_INDEX 0x0100 488 #define AVFMT_TS_DISCONT 0x0200 489 #define AVFMT_VARIABLE_FPS 0x0400 490 #define AVFMT_NODIMENSIONS 0x0800 491 #define AVFMT_NOSTREAMS 0x1000 492 #define AVFMT_NOBINSEARCH 0x2000 493 #define AVFMT_NOGENSEARCH 0x4000 494 #define AVFMT_NO_BYTE_SEEK 0x8000 495 #define AVFMT_ALLOW_FLUSH 0x10000 496 #define AVFMT_TS_NONSTRICT 0x20000 499 #define AVFMT_TS_NEGATIVE 0x40000 508 #define AVFMT_SEEK_TO_PTS 0x4000000 514 typedef struct AVOutputFormat { 521 const char *long_name;
522 const char *mime_type;
523 const char *extensions;
540 const struct AVCodecTag *
const *codec_tag;
580 int (*query_codec)(
enum AVCodecID id,
int std_compliance);
583 int64_t *dts, int64_t *wall);
588 void *data,
size_t data_size);
662 const char *long_name;
676 const char *extensions;
678 const struct AVCodecTag *
const *codec_tag;
687 const char *mime_type;
748 int stream_index, int64_t timestamp,
int flags);
755 int64_t *pos, int64_t pos_limit);
775 int (*read_seek2)(
struct AVFormatContext *s,
int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts,
int flags);
818 #define AVINDEX_KEYFRAME 0x0001 819 #define AVINDEX_DISCARD_FRAME 0x0002 827 #define AV_DISPOSITION_DEFAULT 0x0001 828 #define AV_DISPOSITION_DUB 0x0002 829 #define AV_DISPOSITION_ORIGINAL 0x0004 830 #define AV_DISPOSITION_COMMENT 0x0008 831 #define AV_DISPOSITION_LYRICS 0x0010 832 #define AV_DISPOSITION_KARAOKE 0x0020 839 #define AV_DISPOSITION_FORCED 0x0040 840 #define AV_DISPOSITION_HEARING_IMPAIRED 0x0080 841 #define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100 842 #define AV_DISPOSITION_CLEAN_EFFECTS 0x0200 850 #define AV_DISPOSITION_ATTACHED_PIC 0x0400 855 #define AV_DISPOSITION_TIMED_THUMBNAILS 0x0800 862 #define AV_DISPOSITION_CAPTIONS 0x10000 863 #define AV_DISPOSITION_DESCRIPTIONS 0x20000 864 #define AV_DISPOSITION_METADATA 0x40000 869 #define AV_PTS_WRAP_IGNORE 0 870 #define AV_PTS_WRAP_ADD_OFFSET 1 871 #define AV_PTS_WRAP_SUB_OFFSET -1 888 #if FF_API_LAVF_AVCTX 999 #define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001 1012 #define MAX_STD_TIMEBASES (30*12+30+3+6) 1015 int64_t duration_gcd;
1017 int64_t rfps_duration_sum;
1019 int64_t codec_info_duration;
1020 int64_t codec_info_duration_fields;
1029 int64_t last_duration;
1034 int64_t fps_first_dts;
1035 int fps_first_dts_idx;
1036 int64_t fps_last_dts;
1037 int fps_last_dts_idx;
1053 int64_t last_IP_pts;
1054 int last_IP_duration;
1064 int codec_info_nb_frames;
1075 #define MAX_REORDER_DELAY 16 1080 int nb_index_entries;
1081 unsigned int index_entries_allocated_size;
1101 int stream_identifier;
1103 int64_t interleaver_chunk_size;
1104 int64_t interleaver_chunk_duration;
1118 int skip_to_keyframe;
1132 int64_t start_skip_samples;
1140 int64_t first_discard_sample;
1147 int64_t last_discard_sample;
1153 int nb_decoded_frames;
1159 int64_t mux_ts_offset;
1164 int64_t pts_wrap_reference;
1176 int pts_wrap_behavior;
1181 int update_initial_durations_done;
1192 int64_t last_dts_for_order_check;
1193 uint8_t dts_ordered;
1194 uint8_t dts_misordered;
1199 int inject_global_side_data;
1206 char *recommended_encoder_configuration;
1215 struct FFFrac *priv_pts;
1248 #define AV_PROGRAM_RUNNING 1 1260 unsigned int *stream_index;
1261 unsigned int nb_stream_indexes;
1278 int64_t pts_wrap_reference;
1279 int pts_wrap_behavior;
1282 #define AVFMTCTX_NOHEADER 0x0001 1285 typedef struct AVChapter { 1297 void *data,
size_t data_size);
1384 unsigned int nb_streams;
1404 char filename[1024];
1432 unsigned int packet_size;
1440 #define AVFMT_FLAG_GENPTS 0x0001 1441 #define AVFMT_FLAG_IGNIDX 0x0002 1442 #define AVFMT_FLAG_NONBLOCK 0x0004 1443 #define AVFMT_FLAG_IGNDTS 0x0008 1444 #define AVFMT_FLAG_NOFILLIN 0x0010 1445 #define AVFMT_FLAG_NOPARSE 0x0020 1446 #define AVFMT_FLAG_NOBUFFER 0x0040 1447 #define AVFMT_FLAG_CUSTOM_IO 0x0080 1448 #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 1449 #define AVFMT_FLAG_FLUSH_PACKETS 0x0200 1456 #define AVFMT_FLAG_BITEXACT 0x0400 1457 #define AVFMT_FLAG_MP4A_LATM 0x8000 1458 #define AVFMT_FLAG_SORT_DTS 0x10000 1459 #define AVFMT_FLAG_PRIV_OPT 0x20000 1460 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 1461 #define AVFMT_FLAG_FAST_SEEK 0x80000 1462 #define AVFMT_FLAG_SHORTEST 0x100000 1463 #define AVFMT_FLAG_AUTO_BSF 0x200000 1478 int64_t max_analyze_duration;
1483 unsigned int nb_programs;
1514 unsigned int max_index_size;
1520 unsigned int max_picture_buffer;
1533 unsigned int nb_chapters;
1557 int64_t start_time_realtime;
1571 int error_recognition;
1588 #define FF_FDEBUG_TS 0x0001 1606 int64_t max_interleave_delta;
1612 int strict_std_compliance;
1620 #define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001 1635 int avoid_negative_ts;
1636 #define AVFMT_AVOID_NEG_TS_AUTO -1 1637 #define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1 1638 #define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2 1660 int max_chunk_duration;
1676 int use_wallclock_as_timestamps;
1698 int64_t skip_initial_bytes;
1705 unsigned int correct_ts_overflow;
1735 int format_probesize;
1743 char *codec_whitelist;
1751 char *format_whitelist;
1765 int io_repositioned;
1804 int metadata_header_padding;
1821 int64_t output_ts_offset;
1831 uint8_t *dump_separator;
1839 #if FF_API_OLD_OPEN_CALLBACKS 1919 #if FF_API_OLD_OPEN_CALLBACKS 2069 #if FF_API_NOCONST_GET_SIDE_DATA 2101 const char *format_name,
const char *filename);
2162 const char *url,
void *logctx,
2163 unsigned int offset,
unsigned int max_probe_size);
2169 const char *url,
void *logctx,
2170 unsigned int offset,
unsigned int max_probe_size);
2259 int wanted_stream_nb,
2376 #define AVSEEK_FLAG_BACKWARD 1 2377 #define AVSEEK_FLAG_BYTE 2 2378 #define AVSEEK_FLAG_ANY 4 2379 #define AVSEEK_FLAG_FRAME 8 2386 #define AVSTREAM_INIT_IN_WRITE_HEADER 0 2387 #define AVSTREAM_INIT_IN_INIT_OUTPUT 1 2577 const char *filename,
2578 const char *mime_type);
2584 const char *filename,
const char *mime_type,
2603 int64_t *dts, int64_t *wall);
2724 int size,
int distance,
int flags);
2747 char *authorization,
int authorization_size,
2748 char *hostname,
int hostname_size,
2750 char *path,
int path_size,
2770 #define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1 2786 const char *path,
int number,
int flags);
2789 const char *path,
int number);
2825 int av_match_ext(
const char *filename,
const char *extensions);
2838 int std_compliance);
2941 #if FF_API_R_FRAME_RATE 2942 AVFMT_TBCF_R_FRAMERATE,
struct AVOutputFormat AVOutputFormat
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
struct AVInputFormat AVInputFormat
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
AVPacketSideDataType
Definition: avcodec.h:1362
attribute_deprecated int av_demuxer_open(AVFormatContext *ic)
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame)
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
Definition: avformat.h:1898
int av_get_output_timestamp(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
const char * filename
Definition: avformat.h:462
Definition: avformat.h:2949
AVInputFormat * av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret)
int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index)
unsigned char * buf
Definition: avformat.h:463
Definition: avformat.h:1295
AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame)
size_t size
Definition: mem.h:207
const struct AVCodecTag * avformat_get_mov_audio_tags(void)
const struct AVCodecTag * avformat_get_riff_video_tags(void)
enum AVCodecID av_codec_get_id(const struct AVCodecTag *const *tags, unsigned int tag)
unsigned avformat_version(void)
const char * avformat_license(void)
int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb)
Definition: avformat.h:2948
int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
uint8_t * av_stream_get_side_data(const AVStream *stream, enum AVPacketSideDataType type, int *size)
int av_codec_get_tag2(const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag)
AVFormatContext * avformat_alloc_context(void)
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
const char * avformat_configuration(void)
Definition: avformat.h:1265
AVProgram * av_new_program(AVFormatContext *s, int id)
int avformat_network_init(void)
const struct AVCodecTag * avformat_get_riff_audio_tags(void)
int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
int av_match_ext(const char *filename, const char *extensions)
const AVClass * avformat_get_class(void)
int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
const struct AVCodecTag * avformat_get_mov_video_tags(void)
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, AVCodec **decoder_ret, int flags)
AVRational av_stream_get_codec_timebase(const AVStream *st)
int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
Definition: avcodec.h:5707
Definition: avcodec.h:4982
AVProgram * av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s)
AVCodecID
Definition: avcodec.h:191
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Definition: avcodec.h:1578
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
struct AVDictionary AVDictionary
Definition: dict.h:90
int av_read_play(AVFormatContext *s)
Definition: avformat.h:889
AVInputFormat * av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max)
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
int av_read_pause(AVFormatContext *s)
AVInputFormat * av_find_input_format(const char *short_name)
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx)
int buf_size
Definition: avformat.h:464
struct AVPacketList * next
Definition: avformat.h:1949
enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type)
int av_find_default_stream_index(AVFormatContext *s)
char * protocol_whitelist
Definition: avformat.h:1876
uint8_t * av_stream_new_side_data(AVStream *stream, enum AVPacketSideDataType type, int size)
AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
void av_register_input_format(AVInputFormat *format)
AVOutputFormat * av_oformat_next(const AVOutputFormat *f)
av_warn_unused_result int avformat_init_output(AVFormatContext *s, AVDictionary **options)
int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
char * protocol_blacklist
Definition: avformat.h:1911
int avformat_queue_attached_pictures(AVFormatContext *s)
void av_register_output_format(AVOutputFormat *format)
int avformat_network_deinit(void)
Definition: avformat.h:819
Definition: avcodec.h:1676
Definition: avformat.h:1947
int av_filename_number_test(const char *filename)
Definition: avdevice.h:461
int av_get_frame_filename2(char *buf, int buf_size, const char *path, int number, int flags)
Definition: avcodec.h:3973
AVMediaType
Definition: avutil.h:193
Definition: avformat.h:2950
void(* io_close)(struct AVFormatContext *s, AVIOContext *pb)
Definition: avformat.h:1904
void avformat_free_context(AVFormatContext *s)
Definition: rational.h:58
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
AVTimebaseSource
Definition: avformat.h:2947
Definition: avformat.h:461
Definition: avformat.h:1338
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
#define attribute_deprecated
Definition: attributes.h:98
#define av_warn_unused_result
Definition: attributes.h:58
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
void * opaque
Definition: avformat.h:1820
int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index, AVFrame *frame)
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Definition: avcodec.h:3601
void avformat_close_input(AVFormatContext **s)
int av_write_uncoded_frame(AVFormatContext *s, int stream_index, AVFrame *frame)
AVPacket pkt
Definition: avformat.h:1948
int avformat_open_input(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options)
AVDiscard
Definition: avcodec.h:778
const char * mime_type
Definition: avformat.h:465
int av_write_trailer(AVFormatContext *s)
int avformat_flush(AVFormatContext *s)
int flags
Definition: avformat.h:1449
struct AVCodecParser * parser
Definition: avcodec.h:4984
AVIOContext * pb
Definition: avformat.h:1380
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
Definition: avdevice.h:401
Definition: avcodec.h:1544
#define MKTAG(a, b, c, d)
Definition: common.h:342
unsigned int av_codec_get_tag(const struct AVCodecTag *const *tags, enum AVCodecID id)
AVInputFormat * av_probe_input_format(AVProbeData *pd, int is_opened)
void av_register_all(void)
AVInputFormat * av_iformat_next(const AVInputFormat *f)