Lines Matching refs:AVFormatContext

49  * Main lavf structure used for both muxing and demuxing is AVFormatContext,
53 * AVFormatContext, use avformat_alloc_context() (some functions, like
56 * Most importantly an AVFormatContext contains:
57 * @li the @ref AVFormatContext.iformat "input" or @ref AVFormatContext.oformat
60 * @li an @ref AVFormatContext.streams "array" of AVStreams, which describe all
63 * @li an @ref AVFormatContext.pb "I/O context". It is either opened by lavf or
70 * AVFormatContext, they can be examined from a user program by calling
71 * av_opt_next() / av_opt_find() on an allocated AVFormatContext (or its AVClass
73 * AVFormatContext.priv_data if and only if AVInputFormat.priv_class /
75 * Further options may be provided by the @ref AVFormatContext.pb "I/O context",
107 * AVFormatContext *s = NULL;
112 * The above code attempts to allocate an AVFormatContext, open the
119 * In some cases you might want to preallocate an AVFormatContext yourself with
125 * AVFormatContext to newly created AVIOContext.
160 * Reading data from an opened AVFormatContext is done by repeatedly calling
194 * - The @ref AVFormatContext.oformat "oformat" field must be set to select the
196 * - Unless the format is of the AVFMT_NOFILE type, the @ref AVFormatContext.pb
213 * AVFormatContext.metadata "global" or @ref AVStream.metadata "per-stream"
214 * metadata, @ref AVFormatContext.chapters "chapters", @ref
215 * AVFormatContext.programs "programs", etc. as described in the
216 * AVFormatContext documentation. Whether such information will actually be
330 struct AVFormatContext;
345 * fields of the AVFormatContext, AVStream, AVChapter and AVProgram structs
371 * call to av_read_frame(), AVFormatContext.event_flags or AVStream.event_flags
373 * changes on a stream, you need to loop through all streams in the AVFormatContext
500 AVFormatContext.avoid_negative_ts
557 int (*write_header)(struct AVFormatContext *);
565 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
566 int (*write_trailer)(struct AVFormatContext *);
571 * @param s An AVFormatContext for output. pkt will be added to
583 int (*interleave_packet)(struct AVFormatContext *s, AVPacket *pkt,
594 void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
599 int (*control_message)(struct AVFormatContext *s, int type,
610 int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index,
616 int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
619 * Initialize format. May allocate data here, and set any AVFormatContext or
627 int (*init)(struct AVFormatContext *);
636 void (*deinit)(struct AVFormatContext *);
645 int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st,
725 * Read the format header and initialize the AVFormatContext
729 int (*read_header)(struct AVFormatContext *);
739 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
742 * Close the stream. The AVFormatContext and AVStreams are not
745 int (*read_close)(struct AVFormatContext *);
755 int (*read_seek)(struct AVFormatContext *,
762 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
769 int (*read_play)(struct AVFormatContext *);
775 int (*read_pause)(struct AVFormatContext *);
783 int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
789 int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
968 int index; /**< stream index in AVFormatContext */
1208 typedef int (*av_format_control_message)(struct AVFormatContext *s, int type,
1211 typedef int (*AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags,
1229 * sizeof(AVFormatContext) must not be used outside libav*, use
1230 * avformat_alloc_context() to create an AVFormatContext.
1238 typedef struct AVFormatContext {
1290 * Number of elements in AVFormatContext.streams.
1551 * AVFormatContext.metadata accordingly
1552 * - muxing: the user updated AVFormatContext.metadata and wishes the muxer to
1794 * additional internal format contexts. Thus the AVFormatContext pointer
1798 int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url,
1802 * A callback for closing the streams opened with AVFormatContext.io_open().
1804 void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
1835 * A callback for closing the streams opened with AVFormatContext.io_open().
1845 int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb);
1846 } AVFormatContext;
1852 void av_format_inject_global_side_data(AVFormatContext *s);
1859 enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
1930 * Allocate an AVFormatContext.
1934 AVFormatContext *avformat_alloc_context(void);
1937 * Free an AVFormatContext and all its streams.
1940 void avformat_free_context(AVFormatContext *s);
1943 * Get the AVClass for AVFormatContext. It can be used in combination with
1975 AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c);
2014 AVProgram *av_new_program(AVFormatContext *s, int id);
2022 * Allocate an AVFormatContext for an output format.
2037 int avformat_alloc_output_context2(AVFormatContext **ctx, const AVOutputFormat *oformat,
2115 * @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).
2116 * May be a pointer to NULL, in which case an AVFormatContext is allocated by this
2118 * Note that a user-supplied AVFormatContext will be freed on failure.
2122 * @param options A dictionary filled with AVFormatContext and demuxer-private options.
2130 int avformat_open_input(AVFormatContext **ps, const char *url,
2154 int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
2166 AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s);
2168 void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx);
2194 int av_find_best_stream(AVFormatContext *ic,
2228 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
2243 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
2272 int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
2282 * better to open a new AVFormatContext.
2290 int avformat_flush(AVFormatContext *s);
2296 int av_read_play(AVFormatContext *s);
2303 int av_read_pause(AVFormatContext *s);
2306 * Close an opened input AVFormatContext. Free it and all its contents
2309 void avformat_close_input(AVFormatContext **s);
2334 * @param options An AVDictionary filled with AVFormatContext and muxer-private options.
2345 int avformat_write_header(AVFormatContext *s, AVDictionary **options);
2356 * @param options An AVDictionary filled with AVFormatContext and muxer-private options.
2367 int avformat_init_output(AVFormatContext *s, AVDictionary **options);
2391 * AVFormatContext.streams "s->streams".
2406 int av_write_frame(AVFormatContext *s, AVPacket *pkt);
2435 * AVFormatContext.streams "s->streams".
2448 * @see av_write_frame(), AVFormatContext.max_interleave_delta
2450 int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
2460 int av_write_uncoded_frame(AVFormatContext *s, int stream_index,
2479 int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index,
2488 int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index);
2499 int av_write_trailer(AVFormatContext *s);
2539 int av_get_output_timestamp(struct AVFormatContext *s, int stream,
2639 int av_find_default_stream_index(AVFormatContext *s);
2670 * until any function that takes the stream or the parent AVFormatContext
2687 * until any function that takes the stream or the parent AVFormatContext
2740 void av_dump_format(AVFormatContext *ic,
2792 int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size);
2866 AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame);
2876 AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame);
2891 int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st,
2894 int avformat_queue_attached_pictures(AVFormatContext *s);