49 if (
fc->name)
return fc->name;
50 else if(
fc->iformat)
return fc->iformat->name;
51 else if(
fc->oformat)
return fc->oformat->name;
52 else return fc->av_class->class_name;
58 if (!prev &&
s->priv_data &&
59 ((
s->iformat &&
s->iformat->priv_class) ||
60 s->oformat &&
s->oformat->priv_class))
62 if (
s->pb &&
s->pb->av_class && prev !=
s->pb)
75#define ITER_STATE_SHIFT 16
131 .class_name =
"AVFormatContext",
146 if (!strcmp(url,
s->url) ||
147 s->iformat && !strcmp(
s->iformat->name,
"image2") ||
148 s->oformat && !strcmp(
s->oformat->name,
"image2")
157 s->protocol_whitelist,
s->protocol_blacklist,
s);
198#define DISPOSITION_OPT(ctx) \
199 { "disposition", NULL, offsetof(ctx, disposition), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, \
200 .flags = AV_OPT_FLAG_ENCODING_PARAM, .unit = "disposition" }, \
201 { "default", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEFAULT }, .unit = "disposition" }, \
202 { "dub", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DUB }, .unit = "disposition" }, \
203 { "original", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ORIGINAL }, .unit = "disposition" }, \
204 { "comment", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_COMMENT }, .unit = "disposition" }, \
205 { "lyrics", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_LYRICS }, .unit = "disposition" }, \
206 { "karaoke", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_KARAOKE }, .unit = "disposition" }, \
207 { "forced", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_FORCED }, .unit = "disposition" }, \
208 { "hearing_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_HEARING_IMPAIRED }, .unit = "disposition" }, \
209 { "visual_impaired", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_VISUAL_IMPAIRED }, .unit = "disposition" }, \
210 { "clean_effects", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "disposition" }, \
211 { "attached_pic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "disposition" }, \
212 { "timed_thumbnails", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_TIMED_THUMBNAILS }, .unit = "disposition" }, \
213 { "non_diegetic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_NON_DIEGETIC }, .unit = "disposition" }, \
214 { "captions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "disposition" }, \
215 { "descriptions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "disposition" }, \
216 { "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" }, \
217 { "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" }, \
218 { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" }, \
219 { "multilayer", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_MULTILAYER }, .unit = "disposition" }
236 .class_name =
"AVStream",
253 if (
s->nb_streams >=
s->max_streams) {
255 " (%d), see the documentation if you wish to increase it\n",
262 s->streams = streams;
289#if FF_API_R_FRAME_RATE
306 st->
index =
s->nb_streams;
323 s->streams[
s->nb_streams++] = st;
330#define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
331#define OFFSET(x) offsetof(AVStreamGroupTileGrid, x)
333 {
"grid_size",
"size of the output canvas",
OFFSET(coded_width),
335 {
"output_size",
"size of valid pixels in output image meant for presentation",
OFFSET(
width),
337 {
"background_color",
"set a background color for unused pixels",
346 .class_name =
"AVStreamGroupTileGrid",
351#define OFFSET(x) offsetof(AVStreamGroupTREF, x)
353 {
"metadata_index",
"Index of the data stream within the group",
OFFSET(metadata_index),
360 .class_name =
"AVStreamGroupTREF",
365#if FF_API_LCEVC_STRUCT
368#define OFFSET(x) offsetof(AVStreamGroupLayeredVideo, x)
370#if FF_API_LCEVC_STRUCT
371 {
"lcevc_index",
"Index of the LCEVC stream within the group",
OFFSET(lcevc_index),
374 {
"el_index",
"Index of the enhancement layer stream within the group",
OFFSET(el_index),
376 {
"video_size",
"size of the final layered video presentation",
OFFSET(
width),
380#if FF_API_LCEVC_STRUCT
386 .class_name =
"AVStreamGroupLayeredVideo",
418 uintptr_t
i = (uintptr_t)*opaque;
446 *opaque = (
void*)(
i + 1);
457 .class_name =
"AVStreamGroup",
479 sizeof(*stream_groups));
482 s->stream_groups = stream_groups;
535 stg->
index =
s->nb_stream_groups;
537 s->stream_groups[
s->nb_stream_groups++] = stg;
576 opt->
unit && !strcmp(opt->
unit,
"disposition");
583 return opt->default_val.i64;
591 if (disposition <= 0)
static double val(void *priv, double ch)
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Libavcodec external API header.
int ffio_open_whitelist2(AVIOContext **s, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist, AVFormatContext *avfc)
Like ffio_open_whitelist(), but additionally records avfc on the underlying URLContext before it is c...
const AVClass ff_avio_class
int avio_close(AVIOContext *s)
Close the resource accessed by the AVIOContext s and free it.
#define AVIO_FLAG_WRITE
write-only
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
AVCodecParameters * avcodec_parameters_alloc(void)
static const uint16_t fc[]
static struct @346255127015250356166251341105367306144006377143 state
#define AV_OPT_FLAG_DEPRECATED
Set if option is deprecated, users should refer to AVOption.help text for more information.
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
@ AV_OPT_TYPE_IMAGE_SIZE
Underlying C type is two consecutive integers.
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_COLOR
Underlying C type is uint8_t[4].
@ AV_OPT_TYPE_UINT
Underlying C type is unsigned int.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
@ AVDISCARD_ALL
discard all
@ AVDISCARD_NONKEY
discard all frames except keyframes
@ AVDISCARD_BIDIR
discard all bidirectional frames
@ AVDISCARD_DEFAULT
discard useless packets like 0 size packets in avi
@ AVDISCARD_NONE
discard nothing
@ AVDISCARD_NONINTRA
discard all non intra frames
@ AVDISCARD_NONREF
discard all non reference
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
const AVClass * av_stream_group_get_class(void)
Get the AVClass for AVStreamGroup.
AVStreamGroup * avformat_stream_group_create(AVFormatContext *s, enum AVStreamGroupParamsType type, AVDictionary **options)
Add a new empty stream group to a media file.
const AVClass * av_stream_get_class(void)
Get the AVClass for AVStream.
int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st)
Add an already allocated stream to a stream group.
const AVOutputFormat * av_muxer_iterate(void **opaque)
Iterate over all registered muxers.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
const AVInputFormat * av_demuxer_iterate(void **opaque)
Iterate over all registered demuxers.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
const AVClass * av_iamf_audio_element_get_class(void)
AVIAMFAudioElement * av_iamf_audio_element_alloc(void)
Allocates a AVIAMFAudioElement, and initializes its fields with default values.
AVIAMFMixPresentation * av_iamf_mix_presentation_alloc(void)
Allocates a AVIAMFMixPresentation, and initializes its fields with default values.
const AVClass * av_iamf_mix_presentation_get_class(void)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_INFO
Standard information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define LIBAVUTIL_VERSION_INT
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
Set all the options from a given dictionary on an object.
#define MAX_REORDER_DELAY
static AVClassCategory get_category(void *ptr)
Macro definitions for various function/variable attributes.
Immersive Audio Model and Formats API header.
common internal API header
#define FF_DISABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
@ AV_CLASS_CATEGORY_MUXER
@ AV_CLASS_CATEGORY_DEMUXER
Memory handling functions.
Describe the class of an AVClass context structure.
const char * unit
The logical unit to which the option belongs.
Rational number (pair of numerator and denominator).
union AVStreamGroup::@166361102046003066253145020066347265153020354020 params
Group type-specific parameters.
enum AVStreamGroupParamsType type
Group type.
struct AVIAMFMixPresentation * iamf_mix_presentation
struct AVStreamGroupTileGrid * tile_grid
unsigned int nb_streams
Number of elements in AVStreamGroup.streams.
struct AVStreamGroupTREF * tref
unsigned int index
Group index in AVFormatContext.
struct AVIAMFAudioElement * iamf_audio_element
AVStream ** streams
A list of streams in the group.
struct AVStreamGroupLayeredVideo * layered_video
const AVClass * av_class
A class for AVOptions.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
const AVClass * av_class
A class for AVOptions.
int64_t duration
Decoding: duration of the stream, in stream time base.
int index
stream index in AVFormatContext
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
AVFormatContext pub
The public context.
AVPacket * parse_pkt
The generic code uses this as a temporary packet to parse packets or for muxing, especially flushing.
AVPacket * pkt
Used to hold temporary packets for the generic demuxing code.
AVStreamGroup pub
The public context.
int64_t fps_first_dts
Those are used for average framerate estimation.
int64_t pts_wrap_reference
Internal data to check for wrapping of the time stamp.
int probe_packets
Number of packets to buffer for codec probing.
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
int64_t pts_buffer[MAX_REORDER_DELAY+1]
int64_t last_dts_for_order_check
Internal data to analyze DTS and detect faulty mpeg streams.
AVStream pub
The public context.
int64_t first_dts
Timestamp corresponding to the last dts sync point.
int pts_wrap_behavior
Options for behavior, when a wrap is detected.
int need_context_update
Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
struct FFStreamInfo * info
Stream information used internally by avformat_find_stream_info()
AVPacket * parse_pkt
The generic code uses this as a temporary packet to parse packets or for muxing, especially flushing.