Go to the documentation of this file.
21 #ifndef AVFORMAT_DEMUX_H
22 #define AVFORMAT_DEMUX_H
35 #define FF_INFMT_FLAG_INIT_CLEANUP (1 << 0)
138 #define MAX_STD_TIMEBASES (30*12+30+3+6)
171 #define FFERROR_REDO FFERRTAG('R','E','D','O')
173 #define RELATIVE_TS_BASE (INT64_MAX - (1LL << 48))
246 int *nb_index_entries,
247 unsigned int *index_entries_allocated_size,
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.
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_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().
This struct describes the properties of an encoded stream.
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))
int64_t ff_wrap_timestamp(const AVStream *st, int64_t timestamp)
Wrap a given time stamp, if there is an indication for an overflow.
void ff_read_frame_flush(AVFormatContext *s)
Flush the frame reader.
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.
int ff_generate_avci_extradata(AVStream *st)
Generate standard extradata for AVC-Intra based on width/height and field order.
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...
#define MAX_STD_TIMEBASES
int64_t fps_first_dts
Those are used for average framerate estimation.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
int ff_add_attached_pic(AVFormatContext *s, AVStream *st, AVIOContext *pb, AVBufferRef **buf, int size)
Add an attached pic to an AVStream.
int found_decoder
0 -> decoder has not been searched for yet.
int ff_index_search_timestamp(const AVIndexEntry *entries, int nb_entries, int64_t wanted_timestamp, int flags)
Internal version of av_index_search_timestamp.
int64_t codec_info_duration
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
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,...
int64_t codec_info_duration_fields
AVCodecID
Identify the syntax and semantics of the bitstream.
int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t dts)
add frame for rfps calculation.
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_find_stream_index(const AVFormatContext *s, int id)
Find stream index based on format-specific stream ID.
int64_t rfps_duration_sum
void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type)
double(* duration_error)[2][MAX_STD_TIMEBASES]
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.
void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance)
static const FFInputFormat * ffifmt(const AVInputFormat *fmt)
int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
Read a transport packet from a media file.
A reference to a data buffer.
int ff_buffer_packet(AVFormatContext *s, AVPacket *pkt)
This structure stores compressed data.
static float distance(float x, float y, int band)
#define flags(name, subs,...)
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))
static av_always_inline int is_relative(int64_t ts)
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...