27#include "libavutil/ffversion.h"
140#define SHOW_OPTIONAL_FIELDS_AUTO -1
141#define SHOW_OPTIONAL_FIELDS_NEVER 0
142#define SHOW_OPTIONAL_FIELDS_ALWAYS 1
386 static int print_prefix = 1;
387 void *new_log_buffer;
398 if (new_log_buffer) {
411 for (
i=strlen(msg) - 1;
i>=0 && msg[
i] ==
'\n';
i--) {
417 if (parent && *parent) {
420 (*parent)->get_category ? (*parent)->get_category(parent) :(*parent)->category;
431#define print_fmt(k, f, ...) do { \
432 av_bprint_clear(&pbuf); \
433 av_bprintf(&pbuf, f, __VA_ARGS__); \
434 avtext_print_string(tfc, k, pbuf.str, 0); \
437#define print_list_fmt(k, f, n, m, ...) do { \
438 av_bprint_clear(&pbuf); \
439 for (unsigned int idx = 0; idx < n; idx++) { \
440 for (unsigned int idx2 = 0; idx2 < m; idx2++) { \
441 if (idx > 0 || idx2 > 0) \
442 av_bprint_chars(&pbuf, ' ', 1); \
443 av_bprintf(&pbuf, f, __VA_ARGS__); \
446 avtext_print_string(tfc, k, pbuf.str, 0); \
449#define print_int(k, v) avtext_print_integer(tfc, k, v, 0)
450#define print_q(k, v, s) avtext_print_rational(tfc, k, v, s)
451#define print_str(k, v) avtext_print_string(tfc, k, v, 0)
452#define print_str_opt(k, v) avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_OPTIONAL)
453#define print_str_validate(k, v) avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_VALIDATE)
454#define print_time(k, v, tb) avtext_print_time(tfc, k, v, tb, 0)
455#define print_ts(k, v) avtext_print_ts(tfc, k, v, 0)
456#define print_duration_time(k, v, tb) avtext_print_time(tfc, k, v, tb, 1)
457#define print_duration_ts(k, v) avtext_print_ts(tfc, k, v, 1)
458#define print_val(k, v, u) avtext_print_unit_integer(tfc, k, v, AV_TEXTFORMAT_VALUE_FMT_INT, u)
459#define print_int_fmt(k, v, f, u) avtext_print_unit_integer(tfc, k, v, f, u)
460#define print_decibel(k, v) avtext_print_unit_double(tfc, k, v, AV_TEXTFORMAT_VALUE_FMT_DECIBEL, 0)
464 int columns,
int bytes,
int offset_add)
486#define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n) \
488 ret = av_reallocp_array(&(ptr), (new_n), sizeof(*(ptr))); \
491 memset( (ptr) + (cur_n), 0, ((new_n) - (cur_n)) * sizeof(*(ptr)) ); \
517 print_str(
"preferred_downmix_type",
"loro");
520 print_str(
"preferred_downmix_type",
"ltrt");
523 print_str(
"preferred_downmix_type",
"dplII");
526 print_str(
"preferred_downmix_type",
"unknown");
591 print_int(
"chroma_resampling_explicit_filter_flag",
600 print_int(
"spatial_resampling_filter_flag",
602 print_int(
"el_spatial_resampling_filter_flag",
615 print_str(
"nlq_method_idc_name",
"none");
618 print_str(
"nlq_method_idc_name",
"linear_dz");
621 print_str(
"nlq_method_idc_name",
"unknown");
630 for (
int c = 0;
c < 3;
c++) {
658 print_str(
"mapping_idc_name",
"polynomial");
673 print_str(
"mapping_idc_name",
"unknown");
709 color->ycc_to_rgb_matrix[idx].num,
710 color->ycc_to_rgb_matrix[idx].den);
713 color->ycc_to_rgb_offset[idx].num,
714 color->ycc_to_rgb_offset[idx].den);
717 color->rgb_to_lms_matrix[idx].num,
718 color->rgb_to_lms_matrix[idx].den);
726 print_int(
"signal_full_range_flag",
color->signal_full_range_flag);
741 for (
int n = 1; n <
metadata->num_windows; n++) {
743 print_q(
"window_upper_left_corner_x",
744 params->window_upper_left_corner_x,
'/');
745 print_q(
"window_upper_left_corner_y",
746 params->window_upper_left_corner_y,
'/');
747 print_q(
"window_lower_right_corner_x",
748 params->window_lower_right_corner_x,
'/');
749 print_q(
"window_lower_right_corner_y",
750 params->window_lower_right_corner_y,
'/');
751 print_q(
"window_upper_left_corner_x",
752 params->window_upper_left_corner_x,
'/');
753 print_q(
"window_upper_left_corner_y",
754 params->window_upper_left_corner_y,
'/');
756 params->center_of_ellipse_x ) ;
758 params->center_of_ellipse_y );
761 print_int(
"semimajor_axis_internal_ellipse",
762 params->semimajor_axis_internal_ellipse);
763 print_int(
"semimajor_axis_external_ellipse",
764 params->semimajor_axis_external_ellipse);
765 print_int(
"semiminor_axis_external_ellipse",
766 params->semiminor_axis_external_ellipse);
768 params->overlap_process_option);
770 print_q(
"targeted_system_display_maximum_luminance",
771 metadata->targeted_system_display_maximum_luminance,
'/');
772 if (
metadata->targeted_system_display_actual_peak_luminance_flag) {
773 print_int(
"num_rows_targeted_system_display_actual_peak_luminance",
774 metadata->num_rows_targeted_system_display_actual_peak_luminance);
775 print_int(
"num_cols_targeted_system_display_actual_peak_luminance",
776 metadata->num_cols_targeted_system_display_actual_peak_luminance);
777 for (
int i = 0;
i <
metadata->num_rows_targeted_system_display_actual_peak_luminance;
i++) {
778 for (
int j = 0; j <
metadata->num_cols_targeted_system_display_actual_peak_luminance; j++) {
779 print_q(
"targeted_system_display_actual_peak_luminance",
780 metadata->targeted_system_display_actual_peak_luminance[
i][j],
'/');
784 for (
int n = 0; n <
metadata->num_windows; n++) {
786 for (
int i = 0;
i < 3;
i++) {
790 params->average_maxrgb,
'/');
791 print_int(
"num_distribution_maxrgb_percentiles",
792 params->num_distribution_maxrgb_percentiles);
793 for (
int i = 0;
i <
params->num_distribution_maxrgb_percentiles;
i++) {
794 print_int(
"distribution_maxrgb_percentage",
795 params->distribution_maxrgb[
i].percentage);
796 print_q(
"distribution_maxrgb_percentile",
797 params->distribution_maxrgb[
i].percentile,
'/');
799 print_q(
"fraction_bright_pixels",
800 params->fraction_bright_pixels,
'/');
802 if (
metadata->mastering_display_actual_peak_luminance_flag) {
803 print_int(
"num_rows_mastering_display_actual_peak_luminance",
804 metadata->num_rows_mastering_display_actual_peak_luminance);
805 print_int(
"num_cols_mastering_display_actual_peak_luminance",
806 metadata->num_cols_mastering_display_actual_peak_luminance);
807 for (
int i = 0;
i <
metadata->num_rows_mastering_display_actual_peak_luminance;
i++) {
808 for (
int j = 0; j <
metadata->num_cols_mastering_display_actual_peak_luminance; j++) {
809 print_q(
"mastering_display_actual_peak_luminance",
810 metadata->mastering_display_actual_peak_luminance[
i][j],
'/');
815 for (
int n = 0; n <
metadata->num_windows; n++) {
817 if (
params->tone_mapping_flag) {
821 params->num_bezier_curve_anchors );
822 for (
int i = 0;
i <
params->num_bezier_curve_anchors;
i++) {
823 print_q(
"bezier_curve_anchors",
824 params->bezier_curve_anchors[
i],
'/');
827 if (
params->color_saturation_mapping_flag) {
828 print_q(
"color_saturation_weight",
829 params->color_saturation_weight,
'/');
840 print_int(
"has_custom_hdr_reference_white_flag",
metadata->has_custom_hdr_reference_white_flag);
843 if (
metadata->has_custom_hdr_reference_white_flag)
846 if (!
metadata->has_adaptive_tone_map_flag)
850 print_int(
"use_reference_white_tone_mapping_flag",
metadata->use_reference_white_tone_mapping_flag);
852 if (
metadata->use_reference_white_tone_mapping_flag)
856 print_int(
"gain_application_space_chromaticities_flag",
metadata->gain_application_space_chromaticities_flag);
857 print_int(
"has_common_component_mix_params_flag",
metadata->has_common_component_mix_params_flag);
858 print_int(
"has_common_curve_params_flag",
metadata->has_common_curve_params_flag);
860 if (
metadata->gain_application_space_chromaticities_flag == 3) {
861 for (
int i = 0;
i < 8;
i++)
862 print_int(
"gain_application_space_chromaticities",
metadata->gain_application_space_chromaticities[
i]);
865 for (
int a = 0;
a <
metadata->num_alternate_images;
a++) {
869 if (
metadata->component_mixing_type[
a] == 3) {
870 for (
int k = 0; k < 6; k++) {
871 print_int(
"has_component_mixing_coefficient_flag",
metadata->has_component_mixing_coefficient_flag[
a][k]);
872 if (
metadata->has_component_mixing_coefficient_flag[
a][k])
873 print_int(
"component_mixing_coefficient",
metadata->component_mixing_coefficient[
a][k]);
877 print_int(
"gain_curve_num_control_points_minus_1",
metadata->gain_curve_num_control_points_minus_1[
a]);
878 print_int(
"gain_curve_use_pchip_slope_flag",
metadata->gain_curve_use_pchip_slope_flag[
a]);
879 for (
int c = 0;
c <=
metadata->gain_curve_num_control_points_minus_1[
a];
c++)
881 for (
int c = 0;
c <=
metadata->gain_curve_num_control_points_minus_1[
a];
c++)
883 if (!
metadata->gain_curve_use_pchip_slope_flag[
a]) {
884 for (
int c = 0;
c <=
metadata->gain_curve_num_control_points_minus_1[
a];
c++)
885 print_int(
"gain_curve_control_point_theta",
metadata->gain_curve_control_points_theta[
a][
c]);
897 for (
int n = 0; n <
metadata->num_windows; n++) {
906 for (
int n = 0; n <
metadata->num_windows; n++) {
910 if (
params->tone_mapping_mode_flag) {
912 for (
int i = 0;
i <
params->tone_mapping_param_num;
i++) {
915 print_q(
"targeted_system_display_maximum_luminance",
928 print_int(
"base_param_Delta_enable_mode",
950 print_int(
"color_saturation_mapping_flag",
params->color_saturation_mapping_flag);
951 if (
params->color_saturation_mapping_flag) {
953 for (
int i = 0;
i <
params->color_saturation_num;
i++) {
954 print_q(
"color_saturation_gain",
params->color_saturation_gain[
i],
'/');
975 const char *
const film_grain_type_names[] = {
999 print_str(
"color_trc", color_trc ? color_trc :
"unknown");
1000 print_str(
"color_space", color_space ? color_space :
"unknown");
1002 switch (fgp->
type) {
1008 const int num_ar_coeffs_uv = num_ar_coeffs_y + !!aom->
num_y_points;
1031 for (
unsigned uv = 0; uv < 2; uv++) {
1061 for (
int c = 0;
c < 3;
c++) {
1152 const char *
comp =
"unknown";
1230 while (
s[
i] &&
s[
i] == s2[
i] &&
i <
sizeof(buf) - 1) {
1381 if (
pkt->side_data_elems) {
1383 const uint8_t *side_metadata;
1394 for (
int i = 0;
i <
pkt->side_data_elems;
i++) {
1440 for (
int i = 0;
i <
frame->nb_side_data;
i++) {
1458 uint32_t *tc = (uint32_t*)sd->
data;
1459 int m =
FFMIN(tc[0],3);
1461 for (
int j = 1; j <= m ; j++) {
1530 print_ts (
"best_effort_timestamp",
frame->best_effort_timestamp);
1552 print_q(
"sample_aspect_ratio", sar,
':');
1587 if (
frame->nb_side_data)
1605 int ret = 0, got_frame = 0;
1655 for (
int i = 0;
i <
frame->nb_side_data;
i++) {
1666 return got_frame || *packet_new;
1671 av_log(log_ctx, log_level,
"id:%d", interval->
id);
1677 av_log(log_ctx, log_level,
" start:N/A");
1683 av_log(log_ctx, log_level,
"#%"PRId64, interval->
end);
1687 av_log(log_ctx, log_level,
" end:N/A");
1690 av_log(log_ctx, log_level,
"\n");
1699 int ret = 0,
i = 0, frame_count = 0;
1700 int64_t start = -INT64_MAX, end = interval->
end;
1711 "Could not seek to relative position since current "
1712 "timestamp is not defined\n");
1716 target = *cur_ts + interval->
start;
1718 target = interval->
start;
1762 end = start + interval->
end;
1767 if (frame_count >= interval->
end)
1769 }
else if (has_end && *cur_ts !=
AV_NOPTS_VALUE && *cur_ts >= end) {
1784 if (!
pkt->opaque_ref) {
1800 pkt->stream_index =
i;
1855 for (
unsigned i = 0;
i <
sizeof(disposition) * CHAR_BIT;
i++) {
1858 if (disposition_str)
1859 print_int(disposition_str, !!(disposition & (1U <<
i)));
1865#define IN_STREAM_GROUP 2
1882 const SectionID section_disposition[] = {
1922 char profile_num[12];
1939 print_str(
"mime_codec_string", pbuf.str);
1957 print_q(
"sample_aspect_ratio", sar,
':');
1962 print_q(
"display_aspect_ratio", dar,
':');
1977 print_str(
"field_order",
"progressive");
2027 if (
fmt_ctx->iformat->priv_class)
2146 for (
unsigned i = 0;
i <
fmt_ctx->nb_programs;
i++) {
2170 for (
unsigned i = 0;
i < tile_grid->
nb_tiles;
i++) {
2193 SectionID subsection_id, parameter_section_id;
2198 subsection_id =
sections[section_id].children_ids[0];
2201 parameter_section_id =
sections[subsection_id].children_ids[0];
2219 switch(param->
type) {
2223 print_int(
"subblock_duration",
mix->subblock_duration);
2225 print_q(
"start_point_value",
mix->start_point_value,
'/');
2226 print_q(
"end_point_value",
mix->end_point_value,
'/');
2227 print_q(
"control_point_value",
mix->control_point_value,
'/');
2228 print_q(
"control_point_relative_time",
mix->control_point_relative_time,
'/');
2268 for (
unsigned i = 0;
i < audio_element->
nb_layers;
i++) {
2333 print_q(
"integrated_loudness",
layout->integrated_loudness,
'/');
2336 print_q(
"dialogue_anchored_loudness",
layout->dialogue_anchored_loudness,
'/');
2337 print_q(
"album_anchored_loudness",
layout->album_anchored_loudness,
'/');
2425 for (
unsigned i = 0;
i <
fmt_ctx->nb_stream_groups;
i++) {
2442 for (
unsigned i = 0;
i <
fmt_ctx->nb_chapters;
i++) {
2502 if (codec_name ==
NULL)
2506 if (*codec ==
NULL) {
2508 "No codec could be found with name '%s'\n", codec_name);
2518#define GET_DECODER(type_) \
2519 ret = get_decoder_by_name(type_##_codec_name, &fmt_ctx->type_##_codec); \
2520 if (ret < 0) return ret;
2544 "Failed to probe codec for input stream %d\n", stream->
index);
2549 if (codec ==
NULL) {
2551 "Unsupported codec with id %d for input stream %d\n",
2560 const char *print_filename)
2565 int scan_all_pmts_set = 0;
2576 scan_all_pmts_set = 1;
2583 if (print_filename) {
2588 if (scan_all_pmts_set)
2595 int orig_nb_streams =
fmt_ctx->nb_streams;
2603 for (
int i = 0;
i < orig_nb_streams;
i++)
2621 for (
unsigned i = 0;
i <
fmt_ctx->nb_streams;
i++) {
2691 const char *print_filename)
2705#define CHECK_END if (ret < 0) goto end
2799 print_fmt(
"copyright",
"Copyright (c) %d-%d the FFmpeg developers",
2802 print_str(
"configuration", FFMPEG_CONFIGURATION);
2808#define SHOW_LIB_VERSION(libname, LIBNAME) \
2810 if (CONFIG_##LIBNAME) { \
2811 unsigned int version = libname##_version(); \
2812 avtext_print_section_header(tfc, NULL, SECTION_ID_LIBRARY_VERSION); \
2813 print_str("name", "lib" #libname); \
2814 print_int("major", LIB##LIBNAME##_VERSION_MAJOR); \
2815 print_int("minor", LIB##LIBNAME##_VERSION_MINOR); \
2816 print_int("micro", LIB##LIBNAME##_VERSION_MICRO); \
2817 print_int("version", version); \
2818 print_str("ident", LIB##LIBNAME##_IDENT); \
2819 avtext_print_section_footer(tfc); \
2836#define PRINT_PIX_FMT_FLAG(flagname, name) \
2838 print_int(name, !!(pixdesc->flags & AV_PIX_FMT_FLAG_##flagname)); \
2920 if (show_all_entries) {
2922 for (
const int *
id = section->
children_ids; *
id != -1;
id++)
2936 if (!strcmp(section_name, section->
name) ||
2939 "'%s' matches section with unique name '%s'\n", section_name,
2950 const char *p =
arg;
2956 int show_all_entries = 0;
2958 if (!section_name) {
2960 "Missing section name for option '%s'\n", opt);
2966 while (*p && *p !=
':') {
2971 "Adding '%s' to the entries to show in section '%s'\n",
2972 entry, section_name);
2978 show_all_entries = 1;
2981 ret =
match_section(section_name, show_all_entries, entries);
3002 "Argument '%s' provided as input filename, but '%s' was already specified.\n",
3006 if (!strcmp(
arg,
"-"))
3025 "Argument '%s' provided as output filename, but '%s' was already specified.\n",
3029 if (!strcmp(
arg,
"-"))
3065 char *next, *p, *spec =
av_strdup(interval_spec);
3076 next = strchr(spec,
'%');
3118 lli = strtoll(p, &tail, 10);
3119 if (*tail || lli < 0) {
3121 "Invalid or negative value '%s' for duration number of frames\n", p);
3124 interval->
end = lli;
3146 char *p, *spec =
av_strdup(intervals_spec);
3151 for (n = 0, p = spec; *p; p++)
3165 for (
i = 0; p;
i++) {
3169 next = strchr(p,
',');
3226 "W... = Section is a wrapper (contains other sections, no local entries)\n"
3227 ".A.. = Section contains an array of elements of the same type\n"
3228 "..V. = Section may contain a variable number of fields with variable keys\n"
3229 "...T = Section contain a unique type\n"
3230 "FLAGS NAME/UNIQUE_NAME\n"
3238 const char *spec = strchr(opt,
':');
3242 "No media specifier was specified for '%s' in option '%s'. Use -%s:<media_spec> "
3243 "where <media_spec> can be one of: 'a' (audio), 'v' (video), 's' (subtitle), 'd' (data)\n",
3256 "Invalid media specifier '%s' in option '%s'. "
3257 "Must be one of: 'a' (audio), 'v' (video), 's' (subtitle), 'd' (data)\n", spec, opt);
3273#define DEFINE_OPT_SHOW_SECTION(section, target_section_id) \
3274 static int opt_show_##section(void *optctx, const char *opt, const char *arg) \
3276 mark_section_show_entries(SECTION_ID_##target_section_id, 1, NULL); \
3298 "use binary prefixes for byte units" },
3300 "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
3302 "prettify the format of displayed values, make it more human readable" },
3304 "set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)",
"format" },
3312 {
"show_error",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_error },
"show probing error" },
3313 {
"show_format",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_format },
"show format/container info" },
3314 {
"show_frames",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_frames },
"show frames info" },
3316 "show a set of specified entries",
"entry_list" },
3320 {
"show_packets",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_packets },
"show packets info" },
3321 {
"show_programs",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_programs },
"show programs info" },
3322 {
"show_stream_groups",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_stream_groups },
"show stream groups info" },
3323 {
"show_streams",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_streams },
"show streams info" },
3324 {
"show_chapters",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_chapters },
"show chapters info" },
3327 {
"show_program_version",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_program_version },
"show ffprobe version" },
3328 {
"show_library_versions",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_library_versions },
"show library versions" },
3330 {
"show_pixel_formats",
OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_pixel_formats },
"show pixel format descriptions" },
3341 "read and decode the streams to fill missing information with heuristics" },
3355 for (
const int *
id = section->
children_ids; *
id != -1;
id++)
3361#define SET_DO_SHOW(id, varname) do { \
3362 if (check_section_show_entries(SECTION_ID_##id)) \
3363 do_show_##varname = 1; \
3372 char *f_name =
NULL, *f_args =
NULL;
3378 setvbuf(stderr,
NULL, _IONBF, 0);
3407 SET_DO_SHOW(PIXEL_FORMAT_FLAGS, pixel_format_flags);
3408 SET_DO_SHOW(PIXEL_FORMAT_COMPONENTS, pixel_format_components);
3411 SET_DO_SHOW(STREAM_GROUP_DISPOSITION, stream_group_disposition);
3413 SET_DO_SHOW(STREAM_GROUP_COMPONENTS, stream_group_components);
3415 SET_DO_SHOW(STREAM_DISPOSITION, stream_disposition);
3416 SET_DO_SHOW(PROGRAM_STREAM_DISPOSITION, stream_disposition);
3417 SET_DO_SHOW(STREAM_GROUP_STREAM_DISPOSITION, stream_disposition);
3423 SET_DO_SHOW(STREAM_GROUP_TAGS, stream_group_tags);
3426 SET_DO_SHOW(STREAM_GROUP_STREAM_TAGS, stream_tags);
3431 "-bitexact and -show_program_version or -show_library_versions "
3432 "options are incompatible\n");
3446 "No name specified for the output format\n");
3486 .data_dump_format = data_dump_format_id,
3527 ret =
FFMIN(ret, input_ret);
SwsAArch64OpImplParams params
static double val(void *priv, double ch)
static const char *const format[]
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.
Main libavdevice API header.
int64_t avio_size(AVIOContext *s)
Get the filesize.
int avtext_context_open(AVTextFormatContext **ptctx, const AVTextFormatter *formatter, AVTextWriterContext *writer_context, const char *args, const AVTextFormatSection *sections, int nb_sections, AVTextFormatOptions options, char *show_data_hash)
void avtext_print_data(AVTextFormatContext *tctx, const char *key, const uint8_t *data, int size)
int avtext_print_string(AVTextFormatContext *tctx, const char *key, const char *val, int flags)
int avtext_context_close(AVTextFormatContext **ptctx)
void avtext_print_data_hash(AVTextFormatContext *tctx, const char *key, const uint8_t *data, int size)
void avtext_print_section_header(AVTextFormatContext *tctx, const void *data, int section_id)
void avtext_print_section_footer(AVTextFormatContext *tctx)
const AVTextFormatter * avtext_get_formatter_by_name(const char *name)
int avtextwriter_context_close(AVTextWriterContext **pwctx)
@ AV_TEXTFORMAT_DATADUMP_BASE64
@ AV_TEXTFORMAT_DATADUMP_XXD
#define AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE
For these sections the element_name field is mandatory.
#define AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER
the section only contains other sections, but has no data at its own level
#define AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS
the section may contain a variable number of fields with variable keys.
@ AV_TEXTFORMAT_VALUE_FMT_BYTE
#define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY
the section contains an array of elements of the same type
#define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
#define AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE
the items in this array section should be numbered individually by type
const AVTextFormatter avtextformatter_xml
int avtextwriter_create_stdout(AVTextWriterContext **pwctx)
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename)
Convenience header that includes libavutil's core.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_UNLIMITED
#define AV_BPRINT_SIZE_AUTOMATIC
static int FUNC metadata(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadata *current)
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
void show_help_children(const AVClass *class, int flags)
Show help for all options with given flags in class and all its children.
void init_dynload(void)
Initialize dynamic library loading.
void parse_loglevel(int argc, char **argv, const OptionDef *options)
Find the '-loglevel' option in the command line args and apply it.
void show_help_options(const OptionDef *options, const char *msg, int req_flags, int rej_flags)
Print help for all options matching specified flags.
void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
Trivial log callback.
AVDictionary * format_opts
int parse_options(void *optctx, int argc, char **argv, const OptionDef *options, int(*parse_arg_function)(void *, const char *))
Parse the command line arguments.
int filter_codec_opts(const AVDictionary *opts, enum AVCodecID codec_id, AVFormatContext *s, AVStream *st, const AVCodec *codec, AVDictionary **dst, AVDictionary **opts_used)
Filter out options for given codec.
AVDictionary * codec_opts
void uninit_opts(void)
Uninitialize the cmdutils option system, in particular free the *_opts contexts and their contents.
int setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *local_codec_opts, AVDictionary ***dst)
Setup AVCodecContext options for avformat_find_stream_info().
int parse_number(const char *context, const char *numstr, enum OptionType type, double min, double max, double *dst)
Parse a string and return its corresponding value as a double.
const char program_name[]
program name, defined by the program for show_version().
static void print_error(const char *filename, int err)
Print an error message to stderr, indicating filename and a human readable description of the error c...
void show_banner(int argc, char **argv, const OptionDef *options)
Print the program banner to stderr.
const int program_birth_year
program birth year, defined by the program for show_banner()
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
__device__ int printf(const char *,...)
static AVFormatContext * fmt_ctx
static AVCodecContext * dec_ctx
#define AV_PROFILE_UNKNOWN
@ AV_FIELD_TT
Top coded_first, top displayed first.
@ AV_FIELD_BB
Bottom coded first, bottom displayed first.
@ AV_FIELD_BT
Bottom coded first, top displayed first.
@ AV_FIELD_TB
Top coded first, bottom displayed first.
static enum AVPixelFormat pix_fmt
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
static int opt_format(void *optctx, const char *opt, const char *arg)
static int find_stream_info
static int opt_codec(void *optctx, const char *opt, const char *arg)
static int opt_input_file(void *optctx, const char *filename)
static const char * video_codec_name
static const char * input_filename
static const char * audio_codec_name
static const char * subtitle_codec_name
static void show_usage(void)
static char * stream_specifier
static void log_callback(void *ptr, int level, const char *fmt, va_list vl)
#define print_list_fmt(k, f, n, m,...)
static void print_pixel_format(AVTextFormatContext *tfc, enum AVPixelFormat pix_fmt)
@ SECTION_ID_FRAME_SIDE_DATA
@ SECTION_ID_STREAM_GROUP_PIECES
@ SECTION_ID_PROGRAM_STREAM
@ SECTION_ID_STREAM_GROUP_SUBPIECES
@ SECTION_ID_PROGRAM_VERSION
@ SECTION_ID_STREAM_GROUP_PIECE
@ SECTION_ID_STREAM_GROUP_STREAM_TAGS
@ SECTION_ID_PIXEL_FORMAT_FLAGS
@ SECTION_ID_STREAM_GROUP_STREAM
@ SECTION_ID_STREAM_GROUP_BLOCK
@ SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION
@ SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
@ SECTION_ID_PROGRAM_TAGS
@ SECTION_ID_PIXEL_FORMATS
@ SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
@ SECTION_ID_STREAM_GROUP_SUBPIECE
@ SECTION_ID_LIBRARY_VERSION
@ SECTION_ID_STREAM_SIDE_DATA
@ SECTION_ID_PACKETS_AND_FRAMES
@ SECTION_ID_STREAM_GROUP_STREAMS
@ SECTION_ID_PACKET_SIDE_DATA_LIST
@ SECTION_ID_PROGRAM_STREAM_DISPOSITION
@ SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST
@ SECTION_ID_FRAME_SIDE_DATA_PIECE
@ SECTION_ID_LIBRARY_VERSIONS
@ SECTION_ID_STREAM_SIDE_DATA_LIST
@ SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
@ SECTION_ID_PROGRAM_STREAM_TAGS
@ SECTION_ID_FRAME_SIDE_DATA_TIMECODE
@ SECTION_ID_STREAM_GROUP_TAGS
@ SECTION_ID_PIXEL_FORMAT_COMPONENTS
@ SECTION_ID_STREAM_GROUP_COMPONENT
@ SECTION_ID_PIXEL_FORMAT_COMPONENT
@ SECTION_ID_STREAM_GROUP
@ SECTION_ID_PIXEL_FORMAT
@ SECTION_ID_FRAME_SIDE_DATA_LIST
@ SECTION_ID_FRAME_SIDE_DATA_COMPONENT
@ SECTION_ID_CHAPTER_TAGS
@ SECTION_ID_STREAM_GROUP_SUBCOMPONENT
@ SECTION_ID_STREAM_GROUP_SIDE_DATA
@ SECTION_ID_STREAM_GROUPS
@ SECTION_ID_STREAM_GROUP_SIDE_DATA_LIST
@ SECTION_ID_STREAM_GROUP_BLOCKS
@ SECTION_ID_PACKET_SIDE_DATA
@ SECTION_ID_STREAM_DISPOSITION
@ SECTION_ID_STREAM_GROUP_COMPONENTS
@ SECTION_ID_STREAM_GROUP_DISPOSITION
@ SECTION_ID_PROGRAM_STREAMS
static void ffprobe_show_program_version(AVTextFormatContext *tfc)
static void print_context_light_level(AVTextFormatContext *tfc, const AVContentLightMetadata *metadata)
static void ffprobe_show_library_versions(AVTextFormatContext *tfc)
static void print_iamf_param_definition(AVTextFormatContext *tfc, const char *name, const AVIAMFParamDefinition *param, SectionID section_id)
static int use_byte_value_binary_prefix
static int do_show_frame_tags
static int do_show_pixel_format_flags
#define SHOW_LIB_VERSION(libname, LIBNAME)
static const OptionDef real_options[]
static ReadInterval * read_intervals
static const char * print_input_filename
static int do_show_chapter_tags
static char * show_data_hash
static void print_color_trc(AVTextFormatContext *tfc, enum AVColorTransferCharacteristic color_trc)
static void print_stream_group_params(AVTextFormatContext *tfc, AVStreamGroup *stg)
static const char unit_byte_str[]
static int do_show_stream_group_components
static LogBuffer * log_buffer
#define SHOW_OPTIONAL_FIELDS_AUTO
static int opt_format(void *optctx, const char *opt, const char *arg)
static void print_alpha_mode(AVTextFormatContext *tfc, enum AVAlphaMode alpha_mode)
static int show_value_unit
static int opt_read_intervals(void *optctx, const char *opt, const char *arg)
static int * streams_with_closed_captions
static const char * get_raw_string_type(const void *data)
#define GET_DECODER(type_)
static void print_color_range(AVTextFormatContext *tfc, enum AVColorRange color_range)
static void print_displaymatrix(AVTextFormatContext *tfc, const int32_t matrix[9])
static void print_chroma_location(AVTextFormatContext *tfc, enum AVChromaLocation chroma_location)
static int opt_codec(void *optctx, const char *opt, const char *arg)
static int show_programs(AVTextFormatContext *tfc, InputFile *ifile)
static void show_error(AVTextFormatContext *tfc, int err)
static EntrySelection selected_entries[FF_ARRAY_ELEMS(sections)]
static void print_color_space(AVTextFormatContext *tfc, enum AVColorSpace color_space)
static int do_show_frames
static uint64_t * nb_streams_packets
static void print_tile_grid_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVStreamGroupTileGrid *tile_grid)
static int do_show_program_tags
static int do_show_format
static int parse_read_interval(const char *interval_spec, ReadInterval *interval)
Parse interval specification, according to the format: INTERVAL ::= [START|+START_OFFSET][%[END|+END_...
static int show_stream_groups(AVTextFormatContext *tfc, InputFile *ifile)
static int read_interval_packets(AVTextFormatContext *tfc, InputFile *ifile, const ReadInterval *interval, int64_t *cur_ts)
static int do_show_packets
static const char unit_hertz_str[]
#define print_int_fmt(k, v, f, u)
static int show_tags(AVTextFormatContext *tfc, AVDictionary *tags, int section_id)
static int opt_pretty(void *optctx, const char *opt, const char *arg)
static av_always_inline int process_frame(AVTextFormatContext *tfc, InputFile *ifile, AVFrame *frame, const AVPacket *pkt, int *packet_new)
#define print_str_validate(k, v)
static const char * get_stream_group_type(const void *data)
static int do_count_packets
static int opt_show_optional_fields(void *optctx, const char *opt, const char *arg)
static int show_stream_group(AVTextFormatContext *tfc, InputFile *ifile, AVStreamGroup *stg)
static int show_stream(AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container)
static const AVInputFormat * iformat
static const char unit_bit_per_second_str[]
static const AVTextFormatSection sections[]
static void print_dovi_metadata(AVTextFormatContext *tfc, const AVDOVIMetadata *dovi)
static void show_frame(AVTextFormatContext *tfc, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx)
static void flush_buffers(InputFile *ifile)
static void print_iamf_submix_params(AVTextFormatContext *tfc, const AVIAMFSubmix *submix)
static void ffprobe_show_pixel_formats(AVTextFormatContext *tfc)
#define print_duration_ts(k, v)
static void show_packet(AVTextFormatContext *tfc, InputFile *ifile, AVPacket *pkt, int packet_idx)
static char * data_dump_format
static int do_count_frames
static int show_format(AVTextFormatContext *tfc, InputFile *ifile)
static char * output_format
void show_help_default(const char *opt, const char *arg)
Per-fftool specific help handler.
#define print_str_opt(k, v)
static uint64_t * nb_streams_frames
static int read_packets(AVTextFormatContext *tfc, InputFile *ifile)
static void print_film_grain_params(AVTextFormatContext *tfc, const AVFilmGrainParams *fgp)
static void print_integers(AVTextFormatContext *tfc, const char *key, const void *data, int size, const char *format, int columns, int bytes, int offset_add)
static int do_show_pixel_format_components
#define print_val(k, v, u)
static int show_chapters(AVTextFormatContext *tfc, InputFile *ifile)
static int opt_input_file(void *optctx, const char *arg)
static int do_show_packet_tags
#define DEFINE_OPT_SHOW_SECTION(section, target_section_id)
static void print_mastering_display_metadata(AVTextFormatContext *tfc, const AVMasteringDisplayMetadata *metadata)
static int read_intervals_nb
static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
static int check_section_show_entries(int section_id)
static void print_primaries(AVTextFormatContext *tfc, enum AVColorPrimaries color_primaries)
static const char * get_packet_side_data_type(const void *data)
#define SET_DO_SHOW(id, varname)
static void print_ambient_viewing_environment(AVTextFormatContext *tfc, const AVAmbientViewingEnvironment *env)
static void print_iamf_audio_element_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFAudioElement *audio_element)
static int match_section(const char *section_name, int show_all_entries, AVDictionary *entries)
static int opt_show_entries(void *optctx, const char *opt, const char *arg)
static int do_show_stream_groups
static int do_show_programs
static void close_input_file(InputFile *ifile)
static void print_section(SectionID id, int level)
static const char * get_frame_side_data_type(const void *data)
static int do_show_library_versions
static const char * data_codec_name
static const char * output_filename
static int probe_file(AVTextFormatContext *tfc, const char *filename, const char *print_filename)
static int do_show_stream_tags
static const AVCodec * get_decoder_for_stream(AVFormatContext *fmt_ctx, AVStream *stream)
static int do_show_program_version
static int do_read_packets
static int opt_print_filename(void *optctx, const char *opt, const char *arg)
#define print_decibel(k, v)
static int use_value_prefix
static void print_dispositions(AVTextFormatContext *tfc, uint32_t disposition, SectionID section_id)
static int opt_input_file_i(void *optctx, const char *opt, const char *arg)
static int * selected_streams
static int show_log(AVTextFormatContext *tfc, int section_ids, int section_id, int log_level)
#define print_duration_time(k, v, tb)
static void print_dynamic_hdr_vivid(AVTextFormatContext *tfc, const AVDynamicHDRVivid *metadata)
static int show_optional_fields
static void print_pkt_side_data(AVTextFormatContext *tfc, int width, int height, const AVPacketSideData *sd, SectionID id_data)
static int do_show_streams
static int do_show_chapters
static int show_private_data
static int do_show_stream_group_tags
static void print_dynamic_hdr10_plus(AVTextFormatContext *tfc, const AVDynamicHDRPlus *metadata)
static int opt_output_file_o(void *optctx, const char *opt, const char *arg)
static int do_show_stream_group_disposition
static int do_show_pixel_formats
static int do_analyze_frames
static int do_show_stream_disposition
static void print_frame_side_data(AVTextFormatContext *tfc, const AVFrame *frame, const AVStream *stream)
static int set_decoders(AVFormatContext *fmt_ctx)
static int log_buffer_size
#define SHOW_OPTIONAL_FIELDS_ALWAYS
static int open_input_file(InputFile *ifile, const char *filename, const char *print_filename)
static void mark_section_show_entries(SectionID section_id, int show_all_entries, AVDictionary *entries)
#define print_time(k, v, tb)
static int use_value_sexagesimal_format
static int * streams_with_film_grain
static int do_read_frames
static void print_downmix_info(AVTextFormatContext *tfc, const AVDownmixInfo *downmix_info)
static int opt_sections(void *optctx, const char *opt, const char *arg)
#define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n)
static void clear_log(int need_lock)
static int is_key_selected_callback(AVTextFormatContext *tctx, const char *key)
static int show_program(AVTextFormatContext *tfc, InputFile *ifile, AVProgram *program)
static int parse_read_intervals(const char *intervals_spec)
#define PRINT_PIX_FMT_FLAG(flagname, name)
static void print_dynamic_hdr_smpte2094_app5(AVTextFormatContext *tfc, const AVDynamicHDRSmpte2094App5 *metadata)
static int do_show_format_tags
static int get_decoder_by_name(const char *codec_name, const AVCodec **codec)
static int opt_show_versions(void *optctx, const char *opt, const char *arg)
static unsigned int nb_streams
#define print_fmt(k, f,...)
static void print_iamf_mix_presentation_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFMixPresentation *mix_presentation)
static void show_subtitle(AVTextFormatContext *tfc, AVSubtitle *sub, AVStream *stream, AVFormatContext *fmt_ctx)
static int show_streams(AVTextFormatContext *tfc, InputFile *ifile)
#define SHOW_OPTIONAL_FIELDS_NEVER
static void print_private_data(AVTextFormatContext *tfc, void *priv_data)
@ AV_FILM_GRAIN_PARAMS_H274
The union is valid when interpreted as AVFilmGrainH274Params (codec.h274)
@ AV_FILM_GRAIN_PARAMS_AV1
The union is valid when interpreted as AVFilmGrainAOMParams (codec.aom)
@ AV_FILM_GRAIN_PARAMS_NONE
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
#define AV_OPT_FLAG_EXPORT
The option is intended for exporting values to the caller.
@ AV_DOWNMIX_TYPE_LTRT
Lt/Rt 2-channel downmix, Dolby Surround compatible.
@ AV_DOWNMIX_TYPE_LORO
Lo/Ro 2-channel downmix (Stereo).
@ AV_DOWNMIX_TYPE_DPLII
Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible.
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
const char * avcodec_profile_name(enum AVCodecID codec_id, int profile)
Return a name for the specified profile, if available.
const AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
const AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
@ AV_CODEC_ID_PROBE
codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Alias for avcodec_receive_frame_flags(avctx, frame, 0).
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
Decode a subtitle message.
@ AVDISCARD_ALL
discard all
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal codec state / flush internal buffers.
const char * av_packet_side_data_name(enum AVPacketSideDataType type)
@ AV_PKT_DATA_STRINGS_METADATA
A list of zero terminated key/value strings.
@ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
@ AV_PKT_DATA_SKIP_SAMPLES
Recommends skipping the specified number of samples.
@ AV_PKT_DATA_MPEGTS_STREAM_ID
MPEGTS stream ID as uint8_t, this is required to pass the stream ID information from the demuxer to t...
@ AV_PKT_DATA_DYNAMIC_HDR10_PLUS
HDR10+ dynamic metadata associated with a video frame.
@ AV_PKT_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata (based on SMPTE-2086:2014).
@ AV_PKT_DATA_AUDIO_SERVICE_TYPE
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.
@ AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
Data found in BlockAdditional element of matroska container.
@ AV_PKT_DATA_SPHERICAL
This side data should be associated with a video stream and corresponds to the AVSphericalMapping str...
@ AV_PKT_DATA_WEBVTT_SETTINGS
The optional settings (rendering instructions) that immediately follow the timestamp specifier of a W...
@ AV_PKT_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
@ AV_PKT_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
@ AV_PKT_DATA_EXIF
Extensible image file format metadata.
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
@ AV_PKT_DATA_STEREO3D
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
@ AV_PKT_DATA_WEBVTT_IDENTIFIER
The optional first identifier line of a WebVTT cue.
@ AV_PKT_DATA_FRAME_CROPPING
The number of pixels to discard from the top/bottom/left/right border of the decoded frame to obtain ...
@ AV_PKT_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
@ AV_PKT_DATA_DOVI_CONF
DOVI configuration ref: dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2....
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
#define AV_PKT_FLAG_DISCARD
Flag is used to discard packets which are required to maintain valid decoder state but are not requir...
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_packet_unpack_dictionary(const uint8_t *data, size_t size, AVDictionary **dict)
Unpack a dictionary from side_data.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
FF_VISIBILITY_POP_HIDDEN av_cold void avdevice_register_all(void)
Initialize libavdevice and register all the input and output devices.
int avformat_network_deinit(void)
Undo the initialization done by avformat_network_init.
const char * avformat_stream_group_name(enum AVStreamGroupParamsType type)
int avformat_network_init(void)
Do global initialization of network libraries.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
const AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Check if the stream st contained in s is matched by the stream specifier spec.
int av_mime_codec_str(const AVCodecParameters *par, AVRational frame_rate, struct AVBPrint *out)
Make a RFC 4281/6381 like string describing a codec for MIME types.
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
Print detailed information about the input or output format, such as duration, bitrate,...
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame)
Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_size)
Get a human-readable string describing the channel layout properties.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
AVBufferRef * av_buffer_allocz(size_t size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
#define AV_DICT_MULTIKEY
Allow to store several equal keys in the dictionary.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AV_DICT_DONT_OVERWRITE
Don't overwrite existing entries.
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function.
#define AV_DICT_MATCH_CASE
Only get an entry with exact-case key match.
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
#define AVERROR_EOF
End of file.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AVERROR_OPTION_NOT_FOUND
Option not found.
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
#define AV_FRAME_FLAG_TOP_FIELD_FIRST
A flag to mark frames where the top field is displayed first if the content is interlaced.
#define AV_FRAME_FLAG_LOSSLESS
A decoder can use this flag to mark frames which were originally encoded losslessly.
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
@ AV_FRAME_DATA_GOP_TIMECODE
The GOP timecode in 25 bit timecode format.
@ AV_FRAME_DATA_EXIF
Exchangeable image file format metadata.
@ AV_FRAME_DATA_DOVI_METADATA
Parsed Dolby Vision metadata, suitable for passing to a software implementation.
@ AV_FRAME_DATA_VIEW_ID
This side data must be associated with a video frame.
@ AV_FRAME_DATA_DYNAMIC_HDR_VIVID
HDR Vivid dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
@ AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
@ AV_FRAME_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
HDR dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM
IAMF Recon Gain Info Parameter Data associated with the audio frame.
@ AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM
IAMF Mix Gain Parameter Data associated with the audio frame.
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata associated with a video frame.
@ AV_FRAME_DATA_DOWNMIX_INFO
Metadata relevant to a downmix procedure.
@ AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5
HDR dynamic metadata associated with a video frame.
@ AV_FRAME_DATA_FILM_GRAIN_PARAMS
Film grain parameters for a frame, described by AVFilmGrainParams.
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
@ AV_FRAME_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
@ AV_FRAME_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1.
@ AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM
IAMF Demixing Info Parameter Data associated with the audio frame.
@ AV_IAMF_AMBISONICS_MODE_PROJECTION
@ AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE
@ AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL
static av_always_inline void * av_iamf_param_definition_get_subblock(const AVIAMFParamDefinition *par, unsigned int idx)
Get the subblock at the specified idx.
@ AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN
Subblocks are of struct type AVIAMFReconGain.
@ AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN
Subblocks are of struct type AVIAMFMixGain.
@ AV_IAMF_PARAMETER_DEFINITION_DEMIXING
Subblocks are of struct type AVIAMFDemixingInfo.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_VERBOSE
Detailed information.
#define AV_LOG_INFO
Standard information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
Set the logging callback.
void av_log_default_callback(void *ptr, int level, const char *fmt, va_list vl)
Default logging callback.
#define AV_LOG_SKIP_REPEATED
Skip repeated messages, this requires the user app to use av_log() instead of (f)printf as the 2 woul...
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, char *line, int line_size, int *print_prefix)
Format a line of log the same way as the default callback.
void av_log_set_flags(int arg)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
const char * av_get_media_type_string(enum AVMediaType media_type)
Return a string describing the media_type enum, NULL if media_type is unknown.
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.
#define av_fourcc2str(fourcc)
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok().
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
char * av_get_token(const char **buf, const char *term)
Unescape the given string until a non escaped terminating char, and return the token corresponding to...
#define AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES
exclude control codes not accepted by XML
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
double av_display_rotation_get(const int32_t matrix[9])
Extract the rotation component of the transformation matrix.
const char * av_spherical_projection_name(enum AVSphericalProjection projection)
Provide a human-readable name of a given AVSphericalProjection.
void av_spherical_tile_bounds(const AVSphericalMapping *map, size_t width, size_t height, size_t *left, size_t *top, size_t *right, size_t *bottom)
Convert the bounding fields from an AVSphericalVideo from 0.32 fixed point to pixels.
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection.
@ AV_SPHERICAL_CUBEMAP
Video frame is split into 6 faces of a cube, and arranged on a 3x2 layout.
const char * av_stereo3d_view_name(unsigned int view)
Provide a human-readable name of a given stereo3d view.
const char * av_stereo3d_type_name(unsigned int type)
Provide a human-readable name of a given stereo3d type.
#define AV_STEREO3D_FLAG_INVERT
Inverted views, Right/Bottom represents the left view.
const char * av_stereo3d_primary_eye_name(unsigned int eye)
Provide a human-readable name of a given stereo3d primary eye.
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
const AVOption * av_opt_next(const void *obj, const AVOption *last)
Iterate over all AVOptions belonging to obj.
static int mix(int c0, int c1)
#define us(width, name, range_min, range_max, subs,...)
Libavcodec version macros.
Libavdevice version macros.
Libavfilter version macros.
Immersive Audio Model and Formats API header.
#define AV_MUTEX_INITIALIZER
static int ff_mutex_unlock(AVMutex *mutex)
static int ff_mutex_lock(AVMutex *mutex)
Replacements for frequently missing libm functions.
Libswresample version macros.
void * av_calloc(size_t nmemb, size_t size)
Memory handling functions.
#define CMDUTILS_COMMON_OPTIONS
int av_parse_time(int64_t *timeval, const char *timestr, int duration)
Parse timestr and return in *time a corresponding number of microseconds.
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
const char * av_color_space_name(enum AVColorSpace space)
const char * av_color_range_name(enum AVColorRange range)
const char * av_alpha_mode_name(enum AVAlphaMode mode)
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
const char * av_chroma_location_name(enum AVChromaLocation location)
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
AVChromaLocation
Location of chroma samples.
@ AVCHROMA_LOC_UNSPECIFIED
AVColorRange
Visual content value range.
@ AVCOL_RANGE_UNSPECIFIED
AVAlphaMode
Correlation between the alpha channel and color values.
@ AVALPHA_MODE_UNSPECIFIED
Unknown alpha handling, or no alpha channel.
AVPixelFormat
Pixel format.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVColorSpace
YUV colorspace type.
#define FF_ARRAY_ELEMS(a)
Ambient viewing environment metadata as defined by H.274.
AVRational ambient_illuminance
Environmental illuminance of the ambient viewing environment in lux.
AVRational ambient_light_x
Normalized x chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
AVRational ambient_light_y
Normalized y chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
This structure describes the bitrate properties of an encoded bitstream.
int64_t avg_bitrate
Average bitrate of the stream, in bits per second.
int64_t max_bitrate
Maximum bitrate of the stream, in bits per second.
int64_t buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
int64_t min_bitrate
Minimum bitrate of the stream, in bits per second.
enum AVChannelOrder order
Channel order used in this layout.
int nb_channels
Number of channels in this layout.
int64_t id
unique ID to identify the chapter
int64_t end
chapter start/end time in time_base units
AVRational time_base
time base in which the start/end timestamps are specified
Describe the class of an AVClass context structure.
AVClassCategory(* get_category)(void *ctx)
Callback to return the instance category.
AVClassCategory category
Category used for visualization (like color).
int parent_log_context_offset
Offset in the structure where a pointer to the parent context for logging is stored.
const char *(* item_name)(void *ctx)
A pointer to a function which returns the name of a context instance ctx associated with the class.
main external API structure.
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
This struct describes the properties of a single codec described by an AVCodecID.
const char * long_name
A more descriptive name for this codec.
const char * name
Name of the codec described by this descriptor.
This struct describes the properties of an encoded stream.
enum AVColorSpace color_space
int extradata_size
Size of the extradata content in bytes.
enum AVFieldOrder field_order
The order of the fields in interlaced video.
int height
The height of the video frame in pixels.
int nb_coded_side_data
Amount of entries in coded_side_data.
AVChannelLayout ch_layout
The channel layout and number of channels.
int width
The width of the video frame in pixels.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
enum AVMediaType codec_type
General type of the encoded data.
int profile
Codec-specific bitstream restrictions that the stream conforms to.
int video_delay
Number of delayed frames.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
enum AVColorPrimaries color_primaries
int sample_rate
The number of audio samples per second.
enum AVColorTransferCharacteristic color_trc
int initial_padding
Number of padding audio samples at the start.
AVPacketSideData * coded_side_data
Additional data associated with the entire stream.
enum AVChromaLocation chroma_location
enum AVColorRange color_range
Additional colorspace characteristics.
int depth
Number of bits in the component.
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
Dolby Vision RPU data mapping parameters.
uint32_t num_x_partitions
uint8_t mapping_color_space
uint8_t mapping_chroma_format_idc
AVDOVIReshapingCurve curves[3]
enum AVDOVINLQMethod nlq_method_idc
uint32_t num_y_partitions
uint8_t dv_md_compression
uint8_t dv_bl_signal_compatibility_id
Coefficients of the non-linear inverse quantization.
uint64_t linear_deadzone_slope
uint64_t linear_deadzone_threshold
uint8_t poly_order[AV_DOVI_MAX_PIECES]
enum AVDOVIMappingMethod mapping_idc[AV_DOVI_MAX_PIECES]
int64_t mmr_constant[AV_DOVI_MAX_PIECES]
int64_t mmr_coef[AV_DOVI_MAX_PIECES][3][7]
int64_t poly_coef[AV_DOVI_MAX_PIECES][3]
uint16_t pivots[AV_DOVI_MAX_PIECES+1]
uint8_t mmr_order[AV_DOVI_MAX_PIECES]
This structure describes optional metadata relevant to a downmix procedure.
double lfe_mix_level
Absolute scale factor representing the level at which the LFE data is mixed into L/R channels during ...
double surround_mix_level_ltrt
Absolute scale factor representing the nominal level of the surround channels during an Lt/Rt compati...
double surround_mix_level
Absolute scale factor representing the nominal level of the surround channels during a regular downmi...
double center_mix_level
Absolute scale factor representing the nominal level of the center channel during a regular downmix.
enum AVDownmixType preferred_downmix_type
Type of downmix preferred by the mastering engineer.
double center_mix_level_ltrt
Absolute scale factor representing the nominal level of the center channel during an Lt/Rt compatible...
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
This struct represents dynamic metadata for color volume transform as specified in the SMPTE 2094-50 ...
This struct represents dynamic metadata for color volume transform - CUVA 005.1:2021 standard.
This structure describes how to handle film grain synthesis for AOM codecs.
int chroma_scaling_from_luma
Signals whether to derive the chroma scaling function from the luma.
int limit_output_range
Signals to clip to limited color levels after film grain application.
int scaling_shift
Specifies the shift applied to the chroma components.
int grain_scale_shift
Signals the down shift applied to the generated gaussian numbers during synthesis.
int num_uv_points[2]
If chroma_scaling_from_luma is set to 0, signals the chroma scaling function parameters.
int overlap_flag
Signals whether to overlap film grain blocks.
int ar_coeff_lag
Specifies the auto-regression lag.
int uv_offset[2]
Offset used for component scaling function.
int ar_coeff_shift
Specifies the range of the auto-regressive coefficients.
uint8_t uv_points[2][10][2]
int8_t ar_coeffs_uv[2][25]
Chroma auto-regression coefficients.
int uv_mult[2]
Specifies the luma/chroma multipliers for the index to the component scaling function.
int8_t ar_coeffs_y[24]
Luma auto-regression coefficients.
int num_y_points
Number of points, and the scale and value for each point of the piecewise linear scaling function for...
This structure describes how to handle film grain synthesis for codecs using the ITU-T H....
uint8_t intensity_interval_upper_bound[3][256]
Specifies the upper bound of each intensity interval for which the set of model values applies for th...
int blending_mode_id
Specifies the blending mode used to blend the simulated film grain with the decoded images.
uint8_t intensity_interval_lower_bound[3][256]
Specifies the lower ounds of each intensity interval for whichthe set of model values applies for the...
int log2_scale_factor
Specifies a scale factor used in the film grain characterization equations.
int16_t comp_model_value[3][256][6]
Specifies the model values for the component for each intensity interval.
int model_id
Specifies the film grain simulation mode.
int component_model_present[3]
Indicates if the modelling of film grain for a given component is present.
uint16_t num_intensity_intervals[3]
Specifies the number of intensity intervals for which a specific set of model values has been estimat...
uint8_t num_model_values[3]
Specifies the number of model values present for each intensity interval in which the film grain has ...
This structure describes how to handle film grain synthesis in video for specific codecs.
enum AVColorPrimaries color_primaries
AVFilmGrainH274Params h274
enum AVColorRange color_range
Intended video signal characteristics.
int subsampling_x
Intended subsampling ratio, or 0 for luma-only streams.
int bit_depth_luma
Intended bit depth, or 0 for unknown/unspecified.
union AVFilmGrainParams::@177057277273004265167152242113040056044005264354 codec
Additional fields may be added both here and in any structure included.
enum AVFilmGrainParamsType type
Specifies the codec for which this structure is valid.
int width
Intended display resolution.
uint64_t seed
Seed to use for the synthesis process, if the codec allows for it.
enum AVColorTransferCharacteristic color_trc
enum AVColorSpace color_space
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
AVStream ** streams
A list of all streams in the file.
Structure to hold side data for an AVFrame.
enum AVFrameSideDataType type
This structure describes decoded (raw) audio or video data.
HDR Vivid three spline params.
AVRational enable_strength
3Spline_enable_Strength of three Spline.
AVRational th_delta1
3Spline_TH_Delta1 of three Spline.
int th_mode
The mode of three Spline.
AVRational th_delta2
3Spline_TH_Delta2 of three Spline.
AVRational th_enable_mb
three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive and in multiples of 1....
AVRational th_enable
3Spline_TH_enable of three Spline.
Color tone mapping parameters at a processing window in a dynamic metadata for CUVA 005....
int three_Spline_enable_flag
indicates 3Spline_enable_flag in the base parameter, This flag indicates that transfer three Spline o...
int base_param_k1
indicates k1_0 in the base parameter, base_param_k1 <= 1: k1_0 = base_param_k1 base_param_k1 > 1: res...
AVRational base_param_m_m
base_param_m_m in the base parameter, in multiples of 1.0/10.
AVRational base_param_m_p
base_param_m_p in the base parameter, in multiples of 1.0/16383.
int base_param_k3
indicates k3_0 in the base parameter, base_param_k3 == 1: k3_0 = base_param_k3 base_param_k3 == 2: k3...
AVRational base_param_m_b
base_param_m_b in the base parameter, in multiples of 1/1023.
AVRational base_param_m_a
base_param_m_a in the base parameter, in multiples of 1.0/1023.
AVRational base_param_Delta
base_param_Delta in the base parameter, in multiples of 1.0/127.
int three_Spline_num
The number of three Spline.
AVRational base_param_m_n
base_param_m_n in the base parameter, in multiples of 1.0/10.
int base_param_k2
indicates k2_0 in the base parameter, base_param_k2 <= 1: k2_0 = base_param_k2 base_param_k2 > 1: res...
AVHDRVivid3SplineParams three_spline[2]
AVRational targeted_system_display_maximum_luminance
The nominal maximum display luminance of the targeted system display, in multiples of 1....
int base_enable_flag
This flag indicates that transfer the base parameter(for value of 1)
int base_param_Delta_enable_mode
This flag indicates that delta mode of base parameter(for value of 1)
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
enum AVIAMFAudioElementType audio_element_type
Audio element type as defined in section 3.6 of IAMF.
AVIAMFParamDefinition * recon_gain_info
Recon gain information used to reconstruct a scalable channel audio representation.
unsigned int default_w
Default weight value as defined in section 3.6 of IAMF.
AVIAMFParamDefinition * demixing_info
Demixing information used to reconstruct a scalable channel audio representation.
unsigned int nb_layers
Number of layers, or channel groups, in the Audio Element.
Demixing Info Parameter Data as defined in section 3.8.2 of IAMF.
unsigned int dmixp_mode
Pre-defined combination of demixing parameters.
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
A layer defining a Channel Layout in the Audio Element.
unsigned int output_gain_flags
Output gain channel flags as defined in section 3.6.2 of IAMF.
enum AVIAMFAmbisonicsMode ambisonics_mode
Ambisonics mode as defined in section 3.6.3 of IAMF.
unsigned int nb_demixing_matrix
The length of the Demixing matrix array.
AVRational * demixing_matrix
Demixing matrix as defined in section 3.6.3 of IAMF.
AVChannelLayout ch_layout
AVRational output_gain
Output gain as defined in section 3.6.2 of IAMF.
Mix Gain Parameter Data as defined in section 3.8.1 of IAMF.
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
unsigned int nb_submixes
Number of submixes in the presentation.
AVDictionary * annotations
A dictionary of strings describing the mix in different languages.
AVIAMFSubmix ** submixes
Array of submixes.
Parameters as defined in section 3.6.1 of IAMF.
unsigned int parameter_rate
Sample rate for the parameter substream.
unsigned int duration
The accumulated duration of all blocks in this parameter definition, in units of 1 / parameter_rate.
unsigned int constant_subblock_duration
The duration of every subblock in the case where all subblocks, with the optional exception of the la...
unsigned int parameter_id
Identifier for the parameter substream.
enum AVIAMFParamDefinitionType type
Parameters type.
unsigned int nb_subblocks
Number of subblocks in the array.
Recon Gain Info Parameter Data as defined in section 3.8.3 of IAMF.
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
Submix element as defined in section 3.7 of IAMF.
AVIAMFParamDefinition * element_mix_config
Information required required for applying any processing to the referenced and rendered Audio Elemen...
unsigned int audio_element_id
The id of the Audio Element this submix element references.
AVDictionary * annotations
A dictionary of strings describing the submix in different languages.
enum AVIAMFHeadphonesMode headphones_rendering_mode
A value that indicates whether the referenced channel-based Audio Element shall be rendered to stereo...
AVRational default_mix_gain
Default mix gain value to apply when there are no AVIAMFParamDefinition with element_mix_config's par...
Submix layout as defined in section 3.7.6 of IAMF.
Submix layout as defined in section 3.7 of IAMF.
AVRational default_mix_gain
Default mix gain value to apply when there are no AVIAMFParamDefinition with output_mix_config's para...
unsigned int nb_elements
Number of elements in the submix.
AVIAMFSubmixElement ** elements
Array of submix elements.
AVIAMFSubmixLayout ** layouts
Array of submix layouts.
AVIAMFParamDefinition * output_mix_config
Information required for post-processing the mixed audio signal to generate the audio signal for play...
unsigned int nb_layouts
Number of layouts in the submix.
int flags
A combination of AV_OPT_FLAG_*.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
enum AVPacketSideDataType type
This structure stores compressed data.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
uint64_t flags
Combination of AV_PIX_FMT_FLAG_... flags.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
uint8_t nb_components
The number of components each pixel has, (1-4)
New fields can be added to the end with minor version bumps.
unsigned int nb_stream_indexes
unsigned int * stream_index
Rational number (pair of numerator and denominator).
This structure describes how to handle spherical videos, outlining information about projection,...
enum AVSphericalProjection projection
Projection type.
int32_t pitch
Rotation around the right vector [-90, 90].
int32_t roll
Rotation around the forward vector [-180, 180].
int32_t yaw
Rotation around the up vector [-180, 180].
uint32_t padding
Number of pixels to pad from the edge of each cube face.
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
enum AVStereo3DType type
How views are packed within the video.
uint32_t baseline
The distance between the centres of the lenses of the camera system, in micrometers.
AVRational horizontal_disparity_adjustment
Relative shift of the left and right images, which changes the zero parallax plane.
enum AVStereo3DPrimaryEye primary_eye
Which eye is the primary eye when rendering in 2D.
int flags
Additional information about the frame packing.
AVRational horizontal_field_of_view
Horizontal field of view, in degrees.
enum AVStereo3DView view
Determines which views are packed.
AVStreamGroupTileGrid holds information on how to combine several independent images on a single canv...
int nb_coded_side_data
Amount of entries in coded_side_data.
int width
Width of the final image for presentation.
int height
Height of the final image for presentation.
int coded_width
Width of the canvas.
struct AVStreamGroupTileGrid::@036353327352337314037001273105074056331305251354 * offsets
An nb_tiles sized array of offsets in pixels from the topleft edge of the canvas, indicating where ea...
unsigned int nb_tiles
Amount of tiles in the grid.
int horizontal_offset
Offset in pixels from the left edge of the canvas where the actual image meant for presentation start...
int horizontal
Offset in pixels from the left edge of the canvas where the tile should be placed.
unsigned int idx
Index of the stream in the group this tile references.
int vertical_offset
Offset in pixels from the top edge of the canvas where the actual image meant for presentation starts...
int coded_height
Width of the canvas.
AVPacketSideData * coded_side_data
Additional data associated with the grid.
int vertical
Offset in pixels from the top edge of the canvas where the tile should be placed.
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.
AVDictionary * metadata
Metadata that applies to the whole group.
unsigned int index
Group index in AVFormatContext.
struct AVIAMFAudioElement * iamf_audio_element
int disposition
Stream group disposition - a combination of AV_DISPOSITION_* flags.
int64_t id
Group type-specific group ID.
AVStream ** streams
A list of streams in the group.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t nb_frames
number of frames in this stream if known or 0
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
int64_t duration
Decoding: duration of the stream, in stream time base.
int id
Format-specific stream ID.
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.
AVRational avg_frame_rate
Average framerate.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
AVRational r_frame_rate
Real base framerate of the stream.
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
uint32_t start_display_time
uint32_t end_display_time
int64_t pts
Same as packet pts, in AV_TIME_BASE.
const AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
int level
current level, starting from 0
unsigned int string_validation_utf8_flags
const AVTextFormatter * formatter
the AVTextFormatter of which this is an instance
const int children_ids[SECTION_MAX_NB_CHILDREN+1]
list of children section IDS, terminated by -1
const char * unique_name
unique section name, in case the name is ambiguous
int id
unique id identifying a section
int flags
a combination or AV_TEXTFORMAT__FLAG_*
AVDictionary * entries_to_show
AVClassCategory parent_category
int64_t end
start, end in second/AV_TIME_BASE units
libswresample public header
#define av_malloc_array(a, b)
static void error(const char *err)
static void ERROR(const char *str)
static AVDictionary * opts
char * av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field)
Get the timecode string from the SMPTE timecode format.
char * av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit)
Get the timecode string from the 25-bit timecode format (MPEG GOP format).
#define AV_TIMECODE_STR_SIZE
timestamp utils, mostly useful for debugging/logging purposes
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define va_copy(dst, src)
static enum AVPixelFormat pixel_formats[]