Go to the documentation of this file.
45 if(
fc->iformat)
return fc->iformat->name;
46 else if(
fc->oformat)
return fc->oformat->name;
53 if (!prev &&
s->priv_data &&
54 ((
s->iformat &&
s->iformat->priv_class) ||
55 s->oformat &&
s->oformat->priv_class))
57 if (
s->pb &&
s->pb->av_class && prev !=
s->pb)
70 #define ITER_STATE_SHIFT 16
141 if (!strcmp(url,
s->url) ||
142 s->iformat && !strcmp(
s->iformat->name,
"image2") ||
143 s->oformat && !strcmp(
s->oformat->name,
"image2")
154 #if FF_API_AVFORMAT_IO_CLOSE
177 #if FF_API_AVFORMAT_IO_CLOSE
250 if (
s->nb_streams >=
s->max_streams) {
252 " (%d), see the documentation if you wish to increase it\n",
259 s->streams = streams;
280 #if FF_API_R_FRAME_RATE
297 st->
index =
s->nb_streams;
316 s->streams[
s->nb_streams++] = st;
326 opt->
unit && !strcmp(opt->
unit,
"disposition");
333 return opt->default_val.i64;
341 if (disposition <= 0)
#define FF_ENABLE_DEPRECATION_WARNINGS
int inject_global_side_data
Internal data to inject global side data.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
int avio_close(AVIOContext *s)
Close the resource accessed by the AVIOContext s and free it.
int64_t first_dts
Timestamp corresponding to the last dts sync point.
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
enum AVDurationEstimationMethod duration_estimation_method
The duration field can be estimated through various ways, and this field can be used to know how the ...
int ffio_open_whitelist(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist)
#define fc(width, name, range_min, range_max)
const AVClass ff_avio_class
int64_t last_dts_for_order_check
Internal data to analyze DTS and detect faulty mpeg streams.
int64_t shortest_end
Timestamp of the end of the shortest stream.
int64_t fps_first_dts
Those are used for average framerate estimation.
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
static double val(void *priv, double ch)
int64_t duration
Decoding: duration of the stream, in stream time base.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define AVIO_FLAG_WRITE
write-only
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AV_CLASS_CATEGORY_DEMUXER
AVStream pub
The public context.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
const char * av_default_item_name(void *ptr)
Return the context name.
int inject_global_side_data
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
const OptionDef options[]
AVPacket * parse_pkt
The generic code uses this as a temporary packet to parse packets or for muxing, especially flushing.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
AVClassCategory category
Category used for visualization (like color) This is only set if the category is equal for all object...
#define AV_NOPTS_VALUE
Undefined timestamp value.
const AVInputFormat * av_demuxer_iterate(void **opaque)
Iterate over all registered demuxers.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int pts_wrap_behavior
Options for behavior, when a wrap is detected.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int probe_packets
Number of packets to buffer for codec probing.
#define AV_LOG_INFO
Standard information.
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
#define i(width, name, range_min, range_max)
const AVClass * av_class
A class for AVOptions.
int64_t pts_buffer[MAX_REORDER_DELAY+1]
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
int index
stream index in AVFormatContext
const AVOutputFormat * av_muxer_iterate(void **opaque)
Iterate over all registered muxers.
@ AV_CLASS_CATEGORY_MUXER
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
struct FFStreamInfo * info
Stream information used internally by avformat_find_stream_info()
#define FF_DISABLE_DEPRECATION_WARNINGS
const char * unit
The logical unit to which the option belongs.
AVPacket * pkt
Used to hold temporary packets for the generic demuxing code.
int need_context_update
Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
#define flags(name, subs,...)
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
const AVClass * av_stream_get_class(void)
Get the AVClass for AVStream.
AVFormatContext pub
The public context.
int64_t pts_wrap_reference
Internal data to check for wrapping of the time stamp.