21#ifndef AVFORMAT_DEMUX_H
22#define AVFORMAT_DEMUX_H
35#define FF_INFMT_FLAG_INIT_CLEANUP (1 << 0)
40#define FF_INFMT_FLAG_PREFER_CODEC_FRAMERATE (1 << 1)
45#define FF_INFMT_FLAG_ID3V2_AUTO (1 << 2)
191#define MAX_STD_TIMEBASES (30*12+30+3+6)
224#define FFERROR_REDO FFERRTAG('R','E','D','O')
283 int *nb_index_entries,
284 unsigned int *index_entries_allocated_size,
363 uint64_t channel_layout,
int32_t sample_rate,
#define flags(name, subs,...)
int ff_buffer_packet(AVFormatContext *s, AVPacket *pkt)
AVChapter * avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, int64_t start, int64_t end, const char *title)
Add a new chapter.
int ff_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags)
Perform a binary search using av_index_search_timestamp() and FFInputFormat.read_timestamp().
void ff_rescale_interval(AVRational tb_in, AVRational tb_out, int64_t *min_ts, int64_t *ts, int64_t *max_ts)
Rescales a timestamp and the endpoints of an interval to which the temstamp belongs,...
FFInputFormatStreamState
Input format stream state The stream states to be used for FFInputFormat::read_set_state.
void ff_rfps_calculate(AVFormatContext *ic)
int ff_add_index_entry(AVIndexEntry **index_entries, int *nb_index_entries, unsigned int *index_entries_allocated_size, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Internal version of av_add_index_entry.
#define MAX_STD_TIMEBASES
FFInputFormatCommandOption
Command handling options Different options influencing the behaviour of the FFInputFormat::handle_com...
@ FF_INFMT_COMMAND_GET_REPLY
@ FF_INFMT_COMMAND_SUBMIT
int ff_index_search_timestamp(const AVIndexEntry *entries, int nb_entries, int64_t wanted_timestamp, int flags)
Internal version of av_index_search_timestamp.
int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t dts)
add frame for rfps calculation.
int ff_find_last_ts(AVFormatContext *s, int stream_index, int64_t *ts, int64_t *pos, int64_t(*read_timestamp)(struct AVFormatContext *, int, int64_t *, int64_t))
void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance)
int ff_generate_avci_extradata(AVStream *st)
Generate standard extradata for AVC-Intra based on width/height and field order.
static const FFInputFormat * ffifmt(const AVInputFormat *fmt)
int ff_find_stream_index(const AVFormatContext *s, int id)
Find stream index based on format-specific stream ID.
void ff_read_frame_flush(AVFormatContext *s)
Flush the frame reader.
void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type)
void avpriv_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
Update cur_dts of all streams based on the given timestamp and AVStream.
int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t(*read_timestamp)(struct AVFormatContext *, int, int64_t *, int64_t))
Perform a binary search using read_timestamp().
int ff_add_param_change(AVPacket *pkt, int32_t channels, uint64_t channel_layout, int32_t sample_rate, int32_t width, int32_t height)
Add side data to a packet for changing parameters to the given values.
int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
Read a transport packet from a media file.
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end which is always set to 0 and f...
int ff_add_attached_pic(AVFormatContext *s, AVStream *st, AVIOContext *pb, AVBufferRef **buf, int size)
Add an attached pic to an AVStream.
void ff_reduce_index(AVFormatContext *s, int stream_index)
Ensure the index uses less memory than the maximum specified in AVFormatContext.max_index_size by dis...
static struct @346255127015250356166251341105367306144006377143 state
AVCodecID
Identify the syntax and semantics of the bitstream.
AVFormatCommandID
Command IDs that can be sent to the demuxer.
static float distance(float x, float y, int band)
Utilities for rational number calculation.
static int64_t read_timestamp(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit, int64_t(*read_timestamp)(struct AVFormatContext *, int, int64_t *, int64_t))
A reference to a data buffer.
This struct describes the properties of an encoded stream.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
Rational number (pair of numerator and denominator).
int64_t codec_info_duration_fields
int found_decoder
0 -> decoder has not been searched for yet.
int64_t fps_first_dts
Those are used for average framerate estimation.
double(* duration_error)[2][MAX_STD_TIMEBASES]
int64_t rfps_duration_sum
int64_t codec_info_duration