Go to the documentation of this file.
46 if(
fc->iformat)
return fc->iformat->name;
47 else if(
fc->oformat)
return fc->oformat->name;
48 else return fc->av_class->class_name;
54 if (!prev &&
s->priv_data &&
55 ((
s->iformat &&
s->iformat->priv_class) ||
56 s->oformat &&
s->oformat->priv_class))
58 if (
s->pb &&
s->pb->av_class && prev !=
s->pb)
71 #define ITER_STATE_SHIFT 16
142 if (!strcmp(url,
s->url) ||
143 s->iformat && !strcmp(
s->iformat->name,
"image2") ||
144 s->oformat && !strcmp(
s->oformat->name,
"image2")
182 #if FF_API_LAVF_SHORTEST
189 #if FF_API_GET_DUR_ESTIMATE_METHOD
201 #define DISPOSITION_OPT(ctx) \
202 { "disposition", NULL, offsetof(ctx, disposition), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, \
203 .flags = AV_OPT_FLAG_ENCODING_PARAM, .unit = "disposition" }, \
204 { "default", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "disposition" }, \
205 { "dub", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "disposition" }, \
206 { "original", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "disposition" }, \
207 { "comment", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_COMMENT }, .unit = "disposition" }, \
208 { "lyrics", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_LYRICS }, .unit = "disposition" }, \
209 { "karaoke", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_KARAOKE }, .unit = "disposition" }, \
210 { "forced", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_FORCED }, .unit = "disposition" }, \
211 { "hearing_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_HEARING_IMPAIRED }, .unit = "disposition" }, \
212 { "visual_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_VISUAL_IMPAIRED }, .unit = "disposition" }, \
213 { "clean_effects", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "disposition" }, \
214 { "attached_pic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "disposition" }, \
215 { "timed_thumbnails", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_TIMED_THUMBNAILS }, .unit = "disposition" }, \
216 { "non_diegetic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_NON_DIEGETIC }, .unit = "disposition" }, \
217 { "captions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "disposition" }, \
218 { "descriptions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "disposition" }, \
219 { "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" }, \
220 { "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" }, \
221 { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" }
256 if (
s->nb_streams >=
s->max_streams) {
258 " (%d), see the documentation if you wish to increase it\n",
265 s->streams = streams;
288 #if FF_API_R_FRAME_RATE
305 st->
index =
s->nb_streams;
321 #if FF_API_AVSTREAM_SIDE_DATA
322 sti->inject_global_side_data = si->inject_global_side_data;
327 s->streams[
s->nb_streams++] = st;
334 #define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
335 #define OFFSET(x) offsetof(AVStreamGroupTileGrid, x)
337 {
"grid_size",
"size of the output canvas",
OFFSET(coded_width),
339 {
"output_size",
"size of valid pixels in output image meant for presentation",
OFFSET(
width),
341 {
"background_color",
"set a background color for unused pixels",
376 uintptr_t
i = (uintptr_t)*opaque;
397 *opaque = (
void*)(
i + 1);
430 sizeof(*stream_groups));
433 s->stream_groups = stream_groups;
471 stg->
index =
s->nb_stream_groups;
473 s->stream_groups[
s->nb_stream_groups++] = stg;
512 opt->
unit && !strcmp(opt->
unit,
"disposition");
519 return opt->default_val.i64;
527 if (disposition <= 0)
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
#define FF_ENABLE_DEPRECATION_WARNINGS
int ffio_open_whitelist(AVIOContext **s, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist)
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
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
struct AVStreamGroupTileGrid * tile_grid
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 ...
#define fc(width, name, range_min, range_max)
int64_t last_dts_for_order_check
Internal data to analyze DTS and detect faulty mpeg streams.
AVRational transferred_mux_tb
const AVClass * av_class
A class for AVOptions.
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.
@ AVDISCARD_NONE
discard nothing
static double val(void *priv, double ch)
AVIAMFAudioElement * av_iamf_audio_element_alloc(void)
Allocates a AVIAMFAudioElement, and initializes its fields with default values.
const AVClass * av_stream_group_get_class(void)
Get the AVClass for AVStreamGroup.
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
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.
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
unsigned int index
Group index in AVFormatContext.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AVDISCARD_BIDIR
discard all bidirectional frames
@ AV_CLASS_CATEGORY_DEMUXER
@ AVDISCARD_ALL
discard all
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).
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
const char * av_default_item_name(void *ptr)
Return the context name.
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
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
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st)
Add an already allocated stream to a stream group.
const OptionDef options[]
@ AVDISCARD_NONKEY
discard all frames except keyframes
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.
@ AVDISCARD_DEFAULT
discard useless packets like 0 size packets in avi
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.
struct AVIAMFAudioElement * iamf_audio_element
AVIAMFMixPresentation * av_iamf_mix_presentation_alloc(void)
Allocates a AVIAMFMixPresentation, and initializes its fields with default values.
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.
AVStream ** streams
A list of streams in the group.
struct AVIAMFMixPresentation * iamf_mix_presentation
#define AV_LOG_INFO
Standard information.
const AVClass * av_iamf_audio_element_get_class(void)
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
@ AVDISCARD_NONINTRA
discard all non intra frames
#define i(width, name, range_min, range_max)
int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
Set all the options from a given dictionary on an object.
const AVClass * av_class
A class for AVOptions.
const AVClass ff_avio_class
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...
union AVStreamGroup::@298 params
Group type-specific parameters.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
AVStreamGroup pub
The public context.
const AVClass * av_iamf_mix_presentation_get_class(void)
int index
stream index in AVFormatContext
const AVOutputFormat * av_muxer_iterate(void **opaque)
Iterate over all registered muxers.
@ AV_CLASS_CATEGORY_MUXER
unsigned int nb_streams
Number of elements in AVStreamGroup.streams.
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
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
enum AVStreamGroupParamsType type
Group type.
const char * unit
The logical unit to which the option belongs.
AVPacket * pkt
Used to hold temporary packets for the generic demuxing code.
AVStreamGroup * avformat_stream_group_create(AVFormatContext *s, enum AVStreamGroupParamsType type, AVDictionary **options)
Add a new empty stream group to a media file.
int need_context_update
Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
#define flags(name, subs,...)
int avio_close(AVIOContext *s)
Close the resource accessed by the AVIOContext s and free it.
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.
@ AVDISCARD_NONREF
discard all non reference
AVFormatContext pub
The public context.
int64_t pts_wrap_reference
Internal data to check for wrapping of the time stamp.