Go to the documentation of this file.
48 if(
fc->iformat)
return fc->iformat->name;
49 else if(
fc->oformat)
return fc->oformat->name;
50 else return fc->av_class->class_name;
56 if (!prev &&
s->priv_data &&
57 ((
s->iformat &&
s->iformat->priv_class) ||
58 s->oformat &&
s->oformat->priv_class))
60 if (
s->pb &&
s->pb->av_class && prev !=
s->pb)
73 #define ITER_STATE_SHIFT 16
144 if (!strcmp(url,
s->url) ||
145 s->iformat && !strcmp(
s->iformat->name,
"image2") ||
146 s->oformat && !strcmp(
s->oformat->name,
"image2")
187 #if FF_API_LAVF_SHORTEST
194 #if FF_API_GET_DUR_ESTIMATE_METHOD
206 #define DISPOSITION_OPT(ctx) \
207 { "disposition", NULL, offsetof(ctx, disposition), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, \
208 .flags = AV_OPT_FLAG_ENCODING_PARAM, .unit = "disposition" }, \
209 { "default", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "disposition" }, \
210 { "dub", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "disposition" }, \
211 { "original", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "disposition" }, \
212 { "comment", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_COMMENT }, .unit = "disposition" }, \
213 { "lyrics", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_LYRICS }, .unit = "disposition" }, \
214 { "karaoke", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_KARAOKE }, .unit = "disposition" }, \
215 { "forced", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_FORCED }, .unit = "disposition" }, \
216 { "hearing_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_HEARING_IMPAIRED }, .unit = "disposition" }, \
217 { "visual_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_VISUAL_IMPAIRED }, .unit = "disposition" }, \
218 { "clean_effects", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "disposition" }, \
219 { "attached_pic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "disposition" }, \
220 { "timed_thumbnails", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_TIMED_THUMBNAILS }, .unit = "disposition" }, \
221 { "non_diegetic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_NON_DIEGETIC }, .unit = "disposition" }, \
222 { "captions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "disposition" }, \
223 { "descriptions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "disposition" }, \
224 { "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" }, \
225 { "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" }, \
226 { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" }, \
227 { "multilayer", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_MULTILAYER }, .unit = "disposition" }
262 if (
s->nb_streams >=
s->max_streams) {
264 " (%d), see the documentation if you wish to increase it\n",
271 s->streams = streams;
294 #if FF_API_R_FRAME_RATE
311 st->
index =
s->nb_streams;
325 #if FF_API_INTERNAL_TIMING
326 sti->transferred_mux_tb = (
AVRational) { 0, 1 };;
329 #if FF_API_AVSTREAM_SIDE_DATA
330 sti->inject_global_side_data = si->inject_global_side_data;
335 s->streams[
s->nb_streams++] = st;
342 #define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
343 #define OFFSET(x) offsetof(AVStreamGroupTileGrid, x)
345 {
"grid_size",
"size of the output canvas",
OFFSET(coded_width),
347 {
"output_size",
"size of valid pixels in output image meant for presentation",
OFFSET(
width),
349 {
"background_color",
"set a background color for unused pixels",
363 #define OFFSET(x) offsetof(AVStreamGroupLCEVC, x)
365 {
"video_size",
"size of video after LCEVC enhancement has been applied",
OFFSET(
width),
401 uintptr_t
i = (uintptr_t)*opaque;
425 *opaque = (
void*)(
i + 1);
458 sizeof(*stream_groups));
461 s->stream_groups = stream_groups;
506 stg->
index =
s->nb_stream_groups;
508 s->stream_groups[
s->nb_stream_groups++] = stg;
547 opt->
unit && !strcmp(opt->
unit,
"disposition");
554 return opt->default_val.i64;
562 if (disposition <= 0)
union AVStreamGroup::@366 params
Group type-specific parameters.
#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.
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)
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
#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_COLOR
Underlying C type is uint8_t[4].
@ AV_OPT_TYPE_IMAGE_SIZE
Underlying C type is 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.
@ 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).
#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.
struct AVStreamGroupLCEVC * lcevc
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...
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.
@ AV_OPT_TYPE_INT
Underlying C type is int.
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.
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
int64_t pts_wrap_reference
Internal data to check for wrapping of the time stamp.
#define MAX_REORDER_DELAY