FFmpeg
dump.c
Go to the documentation of this file.
1 /*
2  * Various pretty-printing functions for use within FFmpeg
3  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include <stdio.h>
23 #include <stdint.h>
24 
25 #include "libavutil/avstring.h"
27 #include "libavutil/display.h"
28 #include "libavutil/iamf.h"
29 #include "libavutil/intreadwrite.h"
30 #include "libavutil/log.h"
33 #include "libavutil/dovi_meta.h"
34 #include "libavutil/mathematics.h"
35 #include "libavutil/opt.h"
36 #include "libavutil/replaygain.h"
37 #include "libavutil/spherical.h"
38 #include "libavutil/stereo3d.h"
39 #include "libavutil/timecode.h"
40 
41 #include "libavcodec/avcodec.h"
42 
43 #include "avformat.h"
44 #include "internal.h"
45 
46 #define HEXDUMP_PRINT(...) \
47  do { \
48  if (!f) \
49  av_log(avcl, level, __VA_ARGS__); \
50  else \
51  fprintf(f, __VA_ARGS__); \
52  } while (0)
53 
54 static void hex_dump_internal(void *avcl, FILE *f, int level,
55  const uint8_t *buf, int size)
56 {
57  int len, i, j, c;
58 
59  for (i = 0; i < size; i += 16) {
60  len = size - i;
61  if (len > 16)
62  len = 16;
63  HEXDUMP_PRINT("%08x ", i);
64  for (j = 0; j < 16; j++) {
65  if (j < len)
66  HEXDUMP_PRINT(" %02x", buf[i + j]);
67  else
68  HEXDUMP_PRINT(" ");
69  }
70  HEXDUMP_PRINT(" ");
71  for (j = 0; j < len; j++) {
72  c = buf[i + j];
73  if (c < ' ' || c > '~')
74  c = '.';
75  HEXDUMP_PRINT("%c", c);
76  }
77  HEXDUMP_PRINT("\n");
78  }
79 }
80 
81 void av_hex_dump(FILE *f, const uint8_t *buf, int size)
82 {
83  hex_dump_internal(NULL, f, 0, buf, size);
84 }
85 
86 void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
87 {
88  hex_dump_internal(avcl, NULL, level, buf, size);
89 }
90 
91 static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt,
92  int dump_payload, AVRational time_base)
93 {
94  HEXDUMP_PRINT("stream #%d:\n", pkt->stream_index);
95  HEXDUMP_PRINT(" keyframe=%d\n", (pkt->flags & AV_PKT_FLAG_KEY) != 0);
96  HEXDUMP_PRINT(" duration=%0.3f\n", pkt->duration * av_q2d(time_base));
97  /* DTS is _always_ valid after av_read_frame() */
98  HEXDUMP_PRINT(" dts=");
99  if (pkt->dts == AV_NOPTS_VALUE)
100  HEXDUMP_PRINT("N/A");
101  else
102  HEXDUMP_PRINT("%0.3f", pkt->dts * av_q2d(time_base));
103  /* PTS may not be known if B-frames are present. */
104  HEXDUMP_PRINT(" pts=");
105  if (pkt->pts == AV_NOPTS_VALUE)
106  HEXDUMP_PRINT("N/A");
107  else
108  HEXDUMP_PRINT("%0.3f", pkt->pts * av_q2d(time_base));
109  HEXDUMP_PRINT("\n");
110  HEXDUMP_PRINT(" size=%d\n", pkt->size);
111  if (dump_payload)
112  hex_dump_internal(avcl, f, level, pkt->data, pkt->size);
113 }
114 
115 void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
116 {
117  pkt_dump_internal(NULL, f, 0, pkt, dump_payload, st->time_base);
118 }
119 
120 void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload,
121  const AVStream *st)
122 {
123  pkt_dump_internal(avcl, NULL, level, pkt, dump_payload, st->time_base);
124 }
125 
126 
127 static void print_fps(double d, const char *postfix, int log_level)
128 {
129  uint64_t v = lrintf(d * 100);
130  if (!v)
131  av_log(NULL, log_level, "%1.4f %s", d, postfix);
132  else if (v % 100)
133  av_log(NULL, log_level, "%3.2f %s", d, postfix);
134  else if (v % (100 * 1000))
135  av_log(NULL, log_level, "%1.0f %s", d, postfix);
136  else
137  av_log(NULL, log_level, "%1.0fk %s", d / 1000, postfix);
138 }
139 
140 static void dump_dictionary(void *ctx, const AVDictionary *m,
141  const char *name, const char *indent,
142  int log_level)
143 {
144  const AVDictionaryEntry *tag = NULL;
145 
146  if (!m)
147  return;
148 
149  av_log(ctx, log_level, "%s%s:\n", indent, name);
150  while ((tag = av_dict_iterate(m, tag)))
151  if (strcmp("language", tag->key)) {
152  const char *p = tag->value;
153  av_log(ctx, log_level,
154  "%s %-16s: ", indent, tag->key);
155  while (*p) {
156  size_t len = strcspn(p, "\x8\xa\xb\xc\xd");
157  av_log(ctx, log_level, "%.*s", (int)(FFMIN(255, len)), p);
158  p += len;
159  if (*p == 0xd) av_log(ctx, log_level, " ");
160  if (*p == 0xa) av_log(ctx, log_level, "\n%s %-16s: ", indent, "");
161  if (*p) p++;
162  }
163  av_log(ctx, log_level, "\n");
164  }
165 }
166 
167 static void dump_metadata(void *ctx, const AVDictionary *m, const char *indent,
168  int log_level)
169 {
170  if (m && !(av_dict_count(m) == 1 && av_dict_get(m, "language", NULL, 0)))
171  dump_dictionary(ctx, m, "Metadata", indent, log_level);
172 }
173 
174 /* param change side data*/
175 static void dump_paramchange(void *ctx, const AVPacketSideData *sd, int log_level)
176 {
177  int size = sd->size;
178  const uint8_t *data = sd->data;
179  uint32_t flags, sample_rate, width, height;
180 #if FF_API_OLD_CHANNEL_LAYOUT
181  uint32_t channels;
182  uint64_t layout;
183 #endif
184 
185  if (!data || sd->size < 4)
186  goto fail;
187 
188  flags = AV_RL32(data);
189  data += 4;
190  size -= 4;
191 
192 #if FF_API_OLD_CHANNEL_LAYOUT
194  if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) {
195  if (size < 4)
196  goto fail;
197  channels = AV_RL32(data);
198  data += 4;
199  size -= 4;
200  av_log(ctx, log_level, "channel count %"PRIu32", ", channels);
201  }
202  if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) {
203  if (size < 8)
204  goto fail;
205  layout = AV_RL64(data);
206  data += 8;
207  size -= 8;
208  av_log(ctx, log_level,
209  "channel layout: %s, ", av_get_channel_name(layout));
210  }
212 #endif /* FF_API_OLD_CHANNEL_LAYOUT */
214  if (size < 4)
215  goto fail;
217  data += 4;
218  size -= 4;
219  av_log(ctx, log_level, "sample_rate %"PRIu32", ", sample_rate);
220  }
222  if (size < 8)
223  goto fail;
224  width = AV_RL32(data);
225  data += 4;
226  size -= 4;
227  height = AV_RL32(data);
228  data += 4;
229  size -= 4;
230  av_log(ctx, log_level, "width %"PRIu32" height %"PRIu32, width, height);
231  }
232 
233  return;
234 fail:
235  av_log(ctx, AV_LOG_ERROR, "unknown param\n");
236 }
237 
238 /* replaygain side data*/
239 static void print_gain(void *ctx, const char *str, int32_t gain, int log_level)
240 {
241  av_log(ctx, log_level, "%s - ", str);
242  if (gain == INT32_MIN)
243  av_log(ctx, log_level, "unknown");
244  else
245  av_log(ctx, log_level, "%f", gain / 100000.0f);
246  av_log(ctx, log_level, ", ");
247 }
248 
249 static void print_peak(void *ctx, const char *str, uint32_t peak, int log_level)
250 {
251  av_log(ctx, log_level, "%s - ", str);
252  if (!peak)
253  av_log(ctx, log_level, "unknown");
254  else
255  av_log(ctx, log_level, "%f", (float) peak / UINT32_MAX);
256  av_log(ctx, log_level, ", ");
257 }
258 
259 static void dump_replaygain(void *ctx, const AVPacketSideData *sd, int log_level)
260 {
261  const AVReplayGain *rg;
262 
263  if (sd->size < sizeof(*rg)) {
264  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
265  return;
266  }
267  rg = (const AVReplayGain *)sd->data;
268 
269  print_gain(ctx, "track gain", rg->track_gain, log_level);
270  print_peak(ctx, "track peak", rg->track_peak, log_level);
271  print_gain(ctx, "album gain", rg->album_gain, log_level);
272  print_peak(ctx, "album peak", rg->album_peak, log_level);
273 }
274 
275 static void dump_stereo3d(void *ctx, const AVPacketSideData *sd, int log_level)
276 {
277  const AVStereo3D *stereo;
278 
279  if (sd->size < sizeof(*stereo)) {
280  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
281  return;
282  }
283 
284  stereo = (const AVStereo3D *)sd->data;
285 
286  av_log(ctx, log_level, "%s", av_stereo3d_type_name(stereo->type));
287 
288  if (stereo->flags & AV_STEREO3D_FLAG_INVERT)
289  av_log(ctx, log_level, " (inverted)");
290 }
291 
292 static void dump_audioservicetype(void *ctx, const AVPacketSideData *sd, int log_level)
293 {
294  const enum AVAudioServiceType *ast = (const enum AVAudioServiceType *)sd->data;
295 
296  if (sd->size < sizeof(*ast)) {
297  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
298  return;
299  }
300 
301  switch (*ast) {
303  av_log(ctx, log_level, "main");
304  break;
306  av_log(ctx, log_level, "effects");
307  break;
309  av_log(ctx, log_level, "visually impaired");
310  break;
312  av_log(ctx, log_level, "hearing impaired");
313  break;
315  av_log(ctx, log_level, "dialogue");
316  break;
318  av_log(ctx, log_level, "commentary");
319  break;
321  av_log(ctx, log_level, "emergency");
322  break;
324  av_log(ctx, log_level, "voice over");
325  break;
327  av_log(ctx, log_level, "karaoke");
328  break;
329  default:
330  av_log(ctx, AV_LOG_WARNING, "unknown");
331  break;
332  }
333 }
334 
335 static void dump_cpb(void *ctx, const AVPacketSideData *sd, int log_level)
336 {
337  const AVCPBProperties *cpb = (const AVCPBProperties *)sd->data;
338 
339  if (sd->size < sizeof(*cpb)) {
340  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
341  return;
342  }
343 
344  av_log(ctx, log_level,
345  "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %"PRId64" ",
346  cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate,
347  cpb->buffer_size);
348  if (cpb->vbv_delay == UINT64_MAX)
349  av_log(ctx, log_level, "vbv_delay: N/A");
350  else
351  av_log(ctx, log_level, "vbv_delay: %"PRIu64"", cpb->vbv_delay);
352 }
353 
355  int log_level)
356 {
357  const AVMasteringDisplayMetadata *metadata =
358  (const AVMasteringDisplayMetadata *)sd->data;
359  av_log(ctx, log_level, "Mastering Display Metadata, "
360  "has_primaries:%d has_luminance:%d "
361  "r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f) "
362  "min_luminance=%f, max_luminance=%f",
363  metadata->has_primaries, metadata->has_luminance,
364  av_q2d(metadata->display_primaries[0][0]),
365  av_q2d(metadata->display_primaries[0][1]),
366  av_q2d(metadata->display_primaries[1][0]),
367  av_q2d(metadata->display_primaries[1][1]),
368  av_q2d(metadata->display_primaries[2][0]),
369  av_q2d(metadata->display_primaries[2][1]),
370  av_q2d(metadata->white_point[0]), av_q2d(metadata->white_point[1]),
371  av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance));
372 }
373 
374 static void dump_content_light_metadata(void *ctx, const AVPacketSideData *sd,
375  int log_level)
376 {
377  const AVContentLightMetadata *metadata =
378  (const AVContentLightMetadata *)sd->data;
379  av_log(ctx, log_level, "Content Light Level Metadata, "
380  "MaxCLL=%d, MaxFALL=%d",
381  metadata->MaxCLL, metadata->MaxFALL);
382 }
383 
385 {
386  const AVAmbientViewingEnvironment *ambient =
387  (const AVAmbientViewingEnvironment *)sd->data;
388  av_log(ctx, AV_LOG_INFO, "Ambient Viewing Environment, "
389  "ambient_illuminance=%f, ambient_light_x=%f, ambient_light_y=%f",
390  av_q2d(ambient->ambient_illuminance),
391  av_q2d(ambient->ambient_light_x),
392  av_q2d(ambient->ambient_light_y));
393 }
394 
395 static void dump_spherical(void *ctx, const AVCodecParameters *par,
396  const AVPacketSideData *sd, int log_level)
397 {
398  const AVSphericalMapping *spherical = (const AVSphericalMapping *)sd->data;
399  double yaw, pitch, roll;
400 
401  if (sd->size < sizeof(*spherical)) {
402  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
403  return;
404  }
405 
406  av_log(ctx, log_level, "%s ", av_spherical_projection_name(spherical->projection));
407 
408  yaw = ((double)spherical->yaw) / (1 << 16);
409  pitch = ((double)spherical->pitch) / (1 << 16);
410  roll = ((double)spherical->roll) / (1 << 16);
411  av_log(ctx, log_level, "(%f/%f/%f) ", yaw, pitch, roll);
412 
413  if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
414  size_t l, t, r, b;
415  av_spherical_tile_bounds(spherical, par->width, par->height,
416  &l, &t, &r, &b);
417  av_log(ctx, log_level,
419  l, t, r, b);
420  } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
421  av_log(ctx, log_level, "[pad %"PRIu32"] ", spherical->padding);
422  }
423 }
424 
425 static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd,
426  int log_level)
427 {
430 
431  av_log(ctx, log_level, "version: %d.%d, profile: %d, level: %d, "
432  "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d",
433  dovi->dv_version_major, dovi->dv_version_minor,
434  dovi->dv_profile, dovi->dv_level,
435  dovi->rpu_present_flag,
436  dovi->el_present_flag,
437  dovi->bl_present_flag,
439 }
440 
441 static void dump_s12m_timecode(void *ctx, const AVStream *st, const AVPacketSideData *sd,
442  int log_level)
443 {
444  const uint32_t *tc = (const uint32_t *)sd->data;
445 
446  if ((sd->size != sizeof(uint32_t) * 4) || (tc[0] > 3)) {
447  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
448  return;
449  }
450 
451  for (int j = 1; j <= tc[0]; j++) {
452  char tcbuf[AV_TIMECODE_STR_SIZE];
454  av_log(ctx, log_level, "timecode - %s%s", tcbuf, j != tc[0] ? ", " : "");
455  }
456 }
457 
458 static void dump_sidedata(void *ctx, const AVStream *st, const char *indent,
459  int log_level)
460 {
461  int i;
462 
463  if (st->codecpar->nb_coded_side_data)
464  av_log(ctx, log_level, "%sSide data:\n", indent);
465 
466  for (i = 0; i < st->codecpar->nb_coded_side_data; i++) {
467  const AVPacketSideData *sd = &st->codecpar->coded_side_data[i];
468  av_log(ctx, log_level, "%s ", indent);
469 
470  switch (sd->type) {
471  case AV_PKT_DATA_PALETTE:
472  av_log(ctx, log_level, "palette");
473  break;
475  av_log(ctx, log_level, "new extradata");
476  break;
478  av_log(ctx, log_level, "paramchange: ");
479  dump_paramchange(ctx, sd, log_level);
480  break;
482  av_log(ctx, log_level, "H.263 macroblock info");
483  break;
485  av_log(ctx, log_level, "replaygain: ");
486  dump_replaygain(ctx, sd, log_level);
487  break;
489  av_log(ctx, log_level, "displaymatrix: rotation of %.2f degrees",
490  av_display_rotation_get((const int32_t *)sd->data));
491  break;
493  av_log(ctx, log_level, "stereo3d: ");
494  dump_stereo3d(ctx, sd, log_level);
495  break;
497  av_log(ctx, log_level, "audio service type: ");
498  dump_audioservicetype(ctx, sd, log_level);
499  break;
501  av_log(ctx, log_level, "quality factor: %"PRId32", pict_type: %c",
502  AV_RL32(sd->data), av_get_picture_type_char(sd->data[4]));
503  break;
505  av_log(ctx, log_level, "cpb: ");
506  dump_cpb(ctx, sd, log_level);
507  break;
509  dump_mastering_display_metadata(ctx, sd, log_level);
510  break;
512  av_log(ctx, log_level, "spherical: ");
513  dump_spherical(ctx, st->codecpar, sd, log_level);
514  break;
516  dump_content_light_metadata(ctx, sd, log_level);
517  break;
519  av_log(ctx, log_level, "ICC Profile");
520  break;
522  av_log(ctx, log_level, "DOVI configuration record: ");
523  dump_dovi_conf(ctx, sd, log_level);
524  break;
526  av_log(ctx, log_level, "SMPTE ST 12-1:2014: ");
527  dump_s12m_timecode(ctx, st, sd, log_level);
528  break;
531  break;
532  default:
533  av_log(ctx, log_level, "unknown side data type %d "
534  "(%"SIZE_SPECIFIER" bytes)", sd->type, sd->size);
535  break;
536  }
537 
538  av_log(ctx, log_level, "\n");
539  }
540 }
541 
542 static void dump_disposition(int disposition, int log_level)
543 {
544  if (disposition & AV_DISPOSITION_DEFAULT)
545  av_log(NULL, log_level, " (default)");
546  if (disposition & AV_DISPOSITION_DUB)
547  av_log(NULL, log_level, " (dub)");
548  if (disposition & AV_DISPOSITION_ORIGINAL)
549  av_log(NULL, log_level, " (original)");
550  if (disposition & AV_DISPOSITION_COMMENT)
551  av_log(NULL, log_level, " (comment)");
552  if (disposition & AV_DISPOSITION_LYRICS)
553  av_log(NULL, log_level, " (lyrics)");
554  if (disposition & AV_DISPOSITION_KARAOKE)
555  av_log(NULL, log_level, " (karaoke)");
556  if (disposition & AV_DISPOSITION_FORCED)
557  av_log(NULL, log_level, " (forced)");
558  if (disposition & AV_DISPOSITION_HEARING_IMPAIRED)
559  av_log(NULL, log_level, " (hearing impaired)");
560  if (disposition & AV_DISPOSITION_VISUAL_IMPAIRED)
561  av_log(NULL, log_level, " (visual impaired)");
562  if (disposition & AV_DISPOSITION_CLEAN_EFFECTS)
563  av_log(NULL, log_level, " (clean effects)");
564  if (disposition & AV_DISPOSITION_ATTACHED_PIC)
565  av_log(NULL, log_level, " (attached pic)");
566  if (disposition & AV_DISPOSITION_TIMED_THUMBNAILS)
567  av_log(NULL, log_level, " (timed thumbnails)");
568  if (disposition & AV_DISPOSITION_CAPTIONS)
569  av_log(NULL, log_level, " (captions)");
570  if (disposition & AV_DISPOSITION_DESCRIPTIONS)
571  av_log(NULL, log_level, " (descriptions)");
572  if (disposition & AV_DISPOSITION_METADATA)
573  av_log(NULL, log_level, " (metadata)");
574  if (disposition & AV_DISPOSITION_DEPENDENT)
575  av_log(NULL, log_level, " (dependent)");
576  if (disposition & AV_DISPOSITION_STILL_IMAGE)
577  av_log(NULL, log_level, " (still image)");
578  if (disposition & AV_DISPOSITION_NON_DIEGETIC)
579  av_log(NULL, log_level, " (non-diegetic)");
580 }
581 
582 /* "user interface" functions */
583 static void dump_stream_format(const AVFormatContext *ic, int i,
584  int group_index, int index, int is_output,
585  int log_level)
586 {
587  char buf[256];
588  int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
589  const AVStream *st = ic->streams[i];
590  const FFStream *const sti = cffstream(st);
591  const AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
592  const char *separator = ic->dump_separator;
593  const char *group_indent = group_index >= 0 ? " " : "";
594  const char *extra_indent = group_index >= 0 ? " " : " ";
595  AVCodecContext *avctx;
596  int ret;
597 
598  avctx = avcodec_alloc_context3(NULL);
599  if (!avctx)
600  return;
601 
603  if (ret < 0) {
604  avcodec_free_context(&avctx);
605  return;
606  }
607 
608  // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext
609  if (sti->avctx) {
610  avctx->properties = sti->avctx->properties;
611  avctx->codec = sti->avctx->codec;
612  avctx->qmin = sti->avctx->qmin;
613  avctx->qmax = sti->avctx->qmax;
614  avctx->coded_width = sti->avctx->coded_width;
615  avctx->coded_height = sti->avctx->coded_height;
616  }
617 
618  if (separator)
619  av_opt_set(avctx, "dump_separator", separator, 0);
620  avcodec_string(buf, sizeof(buf), avctx, is_output);
621  avcodec_free_context(&avctx);
622 
623  av_log(NULL, log_level, "%s Stream #%d", group_indent, index);
624  av_log(NULL, log_level, ":%d", i);
625 
626  /* the pid is an important information, so we display it */
627  /* XXX: add a generic system */
628  if (flags & AVFMT_SHOW_IDS)
629  av_log(NULL, log_level, "[0x%x]", st->id);
630  if (lang)
631  av_log(NULL, log_level, "(%s)", lang->value);
632  av_log(NULL, AV_LOG_DEBUG, ", %d, %d/%d", sti->codec_info_nb_frames,
633  st->time_base.num, st->time_base.den);
634  av_log(NULL, log_level, ": %s", buf);
635 
636  if (st->sample_aspect_ratio.num &&
638  AVRational display_aspect_ratio;
639  av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
640  st->codecpar->width * (int64_t)st->sample_aspect_ratio.num,
641  st->codecpar->height * (int64_t)st->sample_aspect_ratio.den,
642  1024 * 1024);
643  av_log(NULL, log_level, ", SAR %d:%d DAR %d:%d",
645  display_aspect_ratio.num, display_aspect_ratio.den);
646  }
647 
648  if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
649  int fps = st->avg_frame_rate.den && st->avg_frame_rate.num;
650  int tbr = st->r_frame_rate.den && st->r_frame_rate.num;
651  int tbn = st->time_base.den && st->time_base.num;
652 
653  if (fps || tbr || tbn)
654  av_log(NULL, log_level, "%s", separator);
655 
656  if (fps)
657  print_fps(av_q2d(st->avg_frame_rate), tbr || tbn ? "fps, " : "fps", log_level);
658  if (tbr)
659  print_fps(av_q2d(st->r_frame_rate), tbn ? "tbr, " : "tbr", log_level);
660  if (tbn)
661  print_fps(1 / av_q2d(st->time_base), "tbn", log_level);
662  }
663 
664  dump_disposition(st->disposition, log_level);
665  av_log(NULL, log_level, "\n");
666 
667  dump_metadata(NULL, st->metadata, extra_indent, log_level);
668 
669  dump_sidedata(NULL, st, extra_indent, log_level);
670 }
671 
672 static void dump_stream_group(const AVFormatContext *ic, uint8_t *printed,
673  int i, int index, int is_output)
674 {
675  const AVStreamGroup *stg = ic->stream_groups[i];
676  int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
677  char buf[512];
678  int ret;
679 
680  av_log(NULL, AV_LOG_INFO, " Stream group #%d:%d", index, i);
681  if (flags & AVFMT_SHOW_IDS)
682  av_log(NULL, AV_LOG_INFO, "[0x%"PRIx64"]", stg->id);
683  av_log(NULL, AV_LOG_INFO, ":");
684 
685  switch (stg->type) {
687  const AVIAMFAudioElement *audio_element = stg->params.iamf_audio_element;
688  av_log(NULL, AV_LOG_INFO, " IAMF Audio Element:");
690  av_log(NULL, AV_LOG_INFO, "\n");
691  dump_metadata(NULL, stg->metadata, " ", AV_LOG_INFO);
692  for (int j = 0; j < audio_element->nb_layers; j++) {
693  const AVIAMFLayer *layer = audio_element->layers[j];
694  int channel_count = layer->ch_layout.nb_channels;
695  av_log(NULL, AV_LOG_INFO, " Layer %d:", j);
696  ret = av_channel_layout_describe(&layer->ch_layout, buf, sizeof(buf));
697  if (ret >= 0)
698  av_log(NULL, AV_LOG_INFO, " %s", buf);
699  av_log(NULL, AV_LOG_INFO, "\n");
700  for (int k = 0; channel_count > 0 && k < stg->nb_streams; k++) {
701  AVStream *st = stg->streams[k];
702  dump_stream_format(ic, st->index, i, index, is_output, AV_LOG_VERBOSE);
703  printed[st->index] = 1;
704  channel_count -= st->codecpar->ch_layout.nb_channels;
705  }
706  }
707  break;
708  }
710  const AVIAMFMixPresentation *mix_presentation = stg->params.iamf_mix_presentation;
711  av_log(NULL, AV_LOG_INFO, " IAMF Mix Presentation:");
713  av_log(NULL, AV_LOG_INFO, "\n");
714  dump_metadata(NULL, stg->metadata, " ", AV_LOG_INFO);
715  dump_dictionary(NULL, mix_presentation->annotations, "Annotations", " ", AV_LOG_INFO);
716  for (int j = 0; j < mix_presentation->nb_submixes; j++) {
717  AVIAMFSubmix *sub_mix = mix_presentation->submixes[j];
718  av_log(NULL, AV_LOG_INFO, " Submix %d:\n", j);
719  for (int k = 0; k < sub_mix->nb_elements; k++) {
720  const AVIAMFSubmixElement *submix_element = sub_mix->elements[k];
721  const AVStreamGroup *audio_element = NULL;
722  for (int l = 0; l < ic->nb_stream_groups; l++)
724  ic->stream_groups[l]->id == submix_element->audio_element_id) {
725  audio_element = ic->stream_groups[l];
726  break;
727  }
728  if (audio_element) {
729  av_log(NULL, AV_LOG_INFO, " IAMF Audio Element #%d:%d",
730  index, audio_element->index);
731  if (flags & AVFMT_SHOW_IDS)
732  av_log(NULL, AV_LOG_INFO, "[0x%"PRIx64"]", audio_element->id);
733  av_log(NULL, AV_LOG_INFO, "\n");
734  dump_dictionary(NULL, submix_element->annotations, "Annotations", " ", AV_LOG_INFO);
735  }
736  }
737  for (int k = 0; k < sub_mix->nb_layouts; k++) {
738  const AVIAMFSubmixLayout *submix_layout = sub_mix->layouts[k];
739  av_log(NULL, AV_LOG_INFO, " Layout #%d:", k);
740  if (submix_layout->layout_type == 2) {
741  ret = av_channel_layout_describe(&submix_layout->sound_system, buf, sizeof(buf));
742  if (ret >= 0)
743  av_log(NULL, AV_LOG_INFO, " %s", buf);
744  } else if (submix_layout->layout_type == 3)
745  av_log(NULL, AV_LOG_INFO, " Binaural");
746  av_log(NULL, AV_LOG_INFO, "\n");
747  }
748  }
749  break;
750  }
752  const AVStreamGroupTileGrid *tile_grid = stg->params.tile_grid;
754  const char *ptr = NULL;
755  av_log(NULL, AV_LOG_INFO, " Tile Grid:");
756  if (avctx && stg->nb_streams && !avcodec_parameters_to_context(avctx, stg->streams[0]->codecpar)) {
757  avctx->width = tile_grid->width;
758  avctx->height = tile_grid->height;
759  avctx->coded_width = tile_grid->coded_width;
760  avctx->coded_height = tile_grid->coded_height;
761  if (ic->dump_separator)
762  av_opt_set(avctx, "dump_separator", ic->dump_separator, 0);
763  buf[0] = 0;
764  avcodec_string(buf, sizeof(buf), avctx, is_output);
765  ptr = av_stristr(buf, " ");
766  }
767  avcodec_free_context(&avctx);
768  if (ptr)
769  av_log(NULL, AV_LOG_INFO, "%s", ptr);
771  av_log(NULL, AV_LOG_INFO, "\n");
772  dump_metadata(NULL, stg->metadata, " ", AV_LOG_INFO);
773  for (int i = 0; i < stg->nb_streams; i++) {
774  const AVStream *st = stg->streams[i];
775  dump_stream_format(ic, st->index, i, index, is_output, AV_LOG_VERBOSE);
776  printed[st->index] = 1;
777  }
778  break;
779  }
780  default:
781  break;
782  }
783 }
784 
786  const char *url, int is_output)
787 {
788  int i;
789  uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
790  if (ic->nb_streams && !printed)
791  return;
792 
793  av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
794  is_output ? "Output" : "Input",
795  index,
796  is_output ? ic->oformat->name : ic->iformat->name,
797  is_output ? "to" : "from", url);
799 
800  if (!is_output) {
801  av_log(NULL, AV_LOG_INFO, " Duration: ");
802  if (ic->duration != AV_NOPTS_VALUE) {
803  int64_t hours, mins, secs, us;
804  int64_t duration = ic->duration + (ic->duration <= INT64_MAX - 5000 ? 5000 : 0);
805  secs = duration / AV_TIME_BASE;
807  mins = secs / 60;
808  secs %= 60;
809  hours = mins / 60;
810  mins %= 60;
811  av_log(NULL, AV_LOG_INFO, "%02"PRId64":%02"PRId64":%02"PRId64".%02"PRId64"", hours, mins, secs,
812  (100 * us) / AV_TIME_BASE);
813  } else {
814  av_log(NULL, AV_LOG_INFO, "N/A");
815  }
816  if (ic->start_time != AV_NOPTS_VALUE) {
817  int secs, us;
818  av_log(NULL, AV_LOG_INFO, ", start: ");
819  secs = llabs(ic->start_time / AV_TIME_BASE);
820  us = llabs(ic->start_time % AV_TIME_BASE);
821  av_log(NULL, AV_LOG_INFO, "%s%d.%06d",
822  ic->start_time >= 0 ? "" : "-",
823  secs,
824  (int) av_rescale(us, 1000000, AV_TIME_BASE));
825  }
826  av_log(NULL, AV_LOG_INFO, ", bitrate: ");
827  if (ic->bit_rate)
828  av_log(NULL, AV_LOG_INFO, "%"PRId64" kb/s", ic->bit_rate / 1000);
829  else
830  av_log(NULL, AV_LOG_INFO, "N/A");
831  av_log(NULL, AV_LOG_INFO, "\n");
832  }
833 
834  if (ic->nb_chapters)
835  av_log(NULL, AV_LOG_INFO, " Chapters:\n");
836  for (i = 0; i < ic->nb_chapters; i++) {
837  const AVChapter *ch = ic->chapters[i];
838  av_log(NULL, AV_LOG_INFO, " Chapter #%d:%d: ", index, i);
840  "start %f, ", ch->start * av_q2d(ch->time_base));
842  "end %f\n", ch->end * av_q2d(ch->time_base));
843 
845  }
846 
847  if (ic->nb_programs) {
848  int j, k, total = 0;
849  for (j = 0; j < ic->nb_programs; j++) {
850  const AVProgram *program = ic->programs[j];
851  const AVDictionaryEntry *name = av_dict_get(program->metadata,
852  "name", NULL, 0);
853  av_log(NULL, AV_LOG_INFO, " Program %d %s\n", program->id,
854  name ? name->value : "");
855  dump_metadata(NULL, program->metadata, " ", AV_LOG_INFO);
856  for (k = 0; k < program->nb_stream_indexes; k++) {
857  dump_stream_format(ic, program->stream_index[k],
858  -1, index, is_output, AV_LOG_INFO);
859  printed[program->stream_index[k]] = 1;
860  }
861  total += program->nb_stream_indexes;
862  }
863  if (total < ic->nb_streams)
864  av_log(NULL, AV_LOG_INFO, " No Program\n");
865  }
866 
867  for (i = 0; i < ic->nb_stream_groups; i++)
868  dump_stream_group(ic, printed, i, index, is_output);
869 
870  for (i = 0; i < ic->nb_streams; i++)
871  if (!printed[i])
872  dump_stream_format(ic, i, -1, index, is_output, AV_LOG_INFO);
873 
874  av_free(printed);
875 }
AVMasteringDisplayMetadata::has_primaries
int has_primaries
Flag indicating whether the display primaries (and white point) are set.
Definition: mastering_display_metadata.h:62
iamf.h
AV_PKT_DATA_DISPLAYMATRIX
@ AV_PKT_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: packet.h:109
av_pkt_dump2
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the specified file stream.
Definition: dump.c:115
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:73
AVIAMFSubmix::elements
AVIAMFSubmixElement ** elements
Array of submix elements.
Definition: iamf.h:552
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:186
AVIAMFAudioElement::nb_layers
unsigned int nb_layers
Number of layers, or channel groups, in the Audio Element.
Definition: iamf.h:359
AV_TIMECODE_STR_SIZE
#define AV_TIMECODE_STR_SIZE
Definition: timecode.h:33
AVMasteringDisplayMetadata::max_luminance
AVRational max_luminance
Max luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:57
AVFormatContext::stream_groups
AVStreamGroup ** stream_groups
A list of all stream groups in the file.
Definition: avformat.h:1994
name
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 default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
dump_dovi_conf
static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:425
level
uint8_t level
Definition: svq3.c:204
AVStreamGroup::id
int64_t id
Group type-specific group ID.
Definition: avformat.h:1207
program
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C program
Definition: undefined.txt:6
AVIAMFSubmix::layouts
AVIAMFSubmixLayout ** layouts
Array of submix layouts.
Definition: iamf.h:567
AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT
@ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
Definition: packet.h:331
AVOutputFormat::name
const char * name
Definition: avformat.h:511
AVChapter::metadata
AVDictionary * metadata
Definition: avformat.h:1326
r
const char * r
Definition: vf_curves.c:126
opt.h
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: codec_par.h:51
AVStreamGroup::tile_grid
struct AVStreamGroupTileGrid * tile_grid
Definition: avformat.h:1223
AVFMT_SHOW_IDS
#define AVFMT_SHOW_IDS
Show format stream IDs numbers.
Definition: avformat.h:478
AVSphericalMapping::projection
enum AVSphericalProjection projection
Projection type.
Definition: spherical.h:82
AV_PKT_DATA_QUALITY_STATS
@ AV_PKT_DATA_QUALITY_STATS
This side data contains quality related information from the encoder.
Definition: packet.h:133
AVFormatContext::nb_chapters
unsigned int nb_chapters
Number of chapters in AVChapter array.
Definition: avformat.h:1580
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:47
AVAmbientViewingEnvironment
Ambient viewing environment metadata as defined by H.274.
Definition: ambient_viewing_environment.h:36
av_stristr
char * av_stristr(const char *s1, const char *s2)
Locate the first case-independent occurrence in the string haystack of the string needle.
Definition: avstring.c:58
AV_PKT_DATA_NEW_EXTRADATA
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
Definition: packet.h:56
AV_RL64
uint64_t_TMPL AV_RL64
Definition: bytestream.h:91
AV_DISPOSITION_ATTACHED_PIC
#define AV_DISPOSITION_ATTACHED_PIC
The stream is stored in the file as an attached picture/"cover art" (e.g.
Definition: avformat.h:772
AVIAMFAudioElement::layers
AVIAMFLayer ** layers
Definition: iamf.h:350
av_dict_count
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
Definition: dict.c:39
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
@ AV_PKT_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata (based on SMPTE-2086:2014).
Definition: packet.h:223
dump_stereo3d
static void dump_stereo3d(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:275
AVMasteringDisplayMetadata::display_primaries
AVRational display_primaries[3][2]
CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
Definition: mastering_display_metadata.h:42
AVMasteringDisplayMetadata::has_luminance
int has_luminance
Flag indicating whether the luminance (min_ and max_) have been set.
Definition: mastering_display_metadata.h:67
avcodec_string
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
Definition: avcodec.c:515
av_get_channel_name
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
Definition: channel_layout.c:353
hex_dump_internal
static void hex_dump_internal(void *avcl, FILE *f, int level, const uint8_t *buf, int size)
Definition: dump.c:54
AVIAMFMixPresentation::nb_submixes
unsigned int nb_submixes
Number of submixes in the presentation.
Definition: iamf.h:616
AVStreamGroup::disposition
int disposition
Stream group disposition - a combination of AV_DISPOSITION_* flags.
Definition: avformat.h:1264
AV_DISPOSITION_DEFAULT
#define AV_DISPOSITION_DEFAULT
The stream should be chosen by default among other streams of the same type, unless the user has expl...
Definition: avformat.h:719
AVContentLightMetadata::MaxCLL
unsigned MaxCLL
Max content light level (cd/m^2).
Definition: mastering_display_metadata.h:102
AVFormatContext::streams
AVStream ** streams
A list of all streams in the file.
Definition: avformat.h:1431
AVPacketSideData
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
Definition: packet.h:373
AVPacket::data
uint8_t * data
Definition: packet.h:522
av_spherical_tile_bounds
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.
Definition: spherical.c:38
AVAmbientViewingEnvironment::ambient_light_x
AVRational ambient_light_x
Normalized x chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
Definition: ambient_viewing_environment.h:47
b
#define b
Definition: input.c:41
AVReplayGain::album_gain
int32_t album_gain
Same as track_gain, but for the whole album.
Definition: replaygain.h:43
AVStream::avg_frame_rate
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:930
spherical.h
AVChapter::start
int64_t start
Definition: avformat.h:1325
data
const char data[16]
Definition: mxf.c:148
AV_AUDIO_SERVICE_TYPE_VOICE_OVER
@ AV_AUDIO_SERVICE_TYPE_VOICE_OVER
Definition: defs.h:230
AV_PKT_DATA_S12M_TIMECODE
@ AV_PKT_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1:2014.
Definition: packet.h:292
dump_disposition
static void dump_disposition(int disposition, int log_level)
Definition: dump.c:542
AVIAMFSubmixLayout::layout_type
enum AVIAMFSubmixLayoutType layout_type
Definition: iamf.h:504
AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
@ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
Definition: packet.h:606
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:196
AVFormatContext::programs
AVProgram ** programs
Definition: avformat.h:1531
AVPacket::duration
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: packet.h:540
AV_SPHERICAL_EQUIRECTANGULAR_TILE
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection.
Definition: spherical.h:68
mathematics.h
AVDictionary
Definition: dict.c:34
cffstream
static const av_always_inline FFStream * cffstream(const AVStream *st)
Definition: internal.h:428
AVCodecContext::qmax
int qmax
maximum quantizer
Definition: avcodec.h:1259
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:323
replaygain.h
AV_PKT_FLAG_KEY
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: packet.h:577
sample_rate
sample_rate
Definition: ffmpeg_filter.c:424
print_fps
static void print_fps(double d, const char *postfix, int log_level)
Definition: dump.c:127
dump_s12m_timecode
static void dump_s12m_timecode(void *ctx, const AVStream *st, const AVPacketSideData *sd, int log_level)
Definition: dump.c:441
AVContentLightMetadata
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
Definition: mastering_display_metadata.h:98
AV_PKT_DATA_DOVI_CONF
@ AV_PKT_DATA_DOVI_CONF
DOVI configuration ref: dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2....
Definition: packet.h:284
print_gain
static void print_gain(void *ctx, const char *str, int32_t gain, int log_level)
Definition: dump.c:239
AVPacketSideData::size
size_t size
Definition: packet.h:375
AV_PKT_DATA_REPLAYGAIN
@ AV_PKT_DATA_REPLAYGAIN
This side data should be associated with an audio stream and contains ReplayGain information in form ...
Definition: packet.h:100
dump_mastering_display_metadata
static void dump_mastering_display_metadata(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:354
AVCodecContext::codec
const struct AVCodec * codec
Definition: avcodec.h:454
AV_PKT_DATA_PALETTE
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
Definition: packet.h:47
fail
#define fail()
Definition: checkasm.h:179
AVStreamGroupTileGrid
AVStreamGroupTileGrid holds information on how to combine several independent images on a single canv...
Definition: avformat.h:1080
timecode.h
AVIAMFSubmixLayout
Submix layout as defined in section 3.7.6 of IAMF.
Definition: iamf.h:501
AVStreamGroupTileGrid::coded_width
int coded_width
Width of the canvas.
Definition: avformat.h:1095
AV_DISPOSITION_STILL_IMAGE
#define AV_DISPOSITION_STILL_IMAGE
The video stream contains still images.
Definition: avformat.h:811
FFStream::avctx
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
Definition: internal.h:227
AVChapter
Definition: avformat.h:1322
dump_cpb
static void dump_cpb(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:335
AV_DISPOSITION_FORCED
#define AV_DISPOSITION_FORCED
Track should be used during playback by default.
Definition: avformat.h:752
dump_content_light_metadata
static void dump_content_light_metadata(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:374
AVFormatContext::dump_separator
uint8_t * dump_separator
dump format separator.
Definition: avformat.h:1887
AV_DISPOSITION_TIMED_THUMBNAILS
#define AV_DISPOSITION_TIMED_THUMBNAILS
The stream is sparse, and contains thumbnail images, often corresponding to chapter markers.
Definition: avformat.h:777
AVStreamGroupTileGrid::coded_height
int coded_height
Width of the canvas.
Definition: avformat.h:1101
AVCodecContext::coded_height
int coded_height
Definition: avcodec.h:640
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_h2645.c:262
av_opt_set
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
Definition: opt.c:497
AVAmbientViewingEnvironment::ambient_illuminance
AVRational ambient_illuminance
Environmental illuminance of the ambient viewing environment in lux.
Definition: ambient_viewing_environment.h:40
av_reduce
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
Definition: rational.c:35
AVRational::num
int num
Numerator.
Definition: rational.h:59
AVFormatContext::bit_rate
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
Definition: avformat.h:1472
AV_DISPOSITION_CLEAN_EFFECTS
#define AV_DISPOSITION_CLEAN_EFFECTS
The audio stream contains music and sound effects without voice.
Definition: avformat.h:764
AVIAMFSubmixElement::annotations
AVDictionary * annotations
A dictionary of strings describing the submix in different languages.
Definition: iamf.h:481
dump_ambient_viewing_environment_metadata
static void dump_ambient_viewing_environment_metadata(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:384
AV_PKT_DATA_PARAM_CHANGE
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
Definition: packet.h:73
pkt
AVPacket * pkt
Definition: movenc.c:59
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
AVFormatContext::metadata
AVDictionary * metadata
Metadata that applies to the whole file.
Definition: avformat.h:1591
av_dump_format
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,...
Definition: dump.c:785
duration
int64_t duration
Definition: movenc.c:64
dump_sidedata
static void dump_sidedata(void *ctx, const AVStream *st, const char *indent, int log_level)
Definition: dump.c:458
av_dict_get
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:62
av_channel_layout_describe
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.
Definition: channel_layout.c:847
dump_audioservicetype
static void dump_audioservicetype(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:292
AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION
@ AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION
Definition: avformat.h:1181
AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
Definition: packet.h:607
avcodec_alloc_context3
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:154
AVChapter::end
int64_t end
chapter start/end time in time_base units
Definition: avformat.h:1325
width
#define width
stereo3d.h
AVMasteringDisplayMetadata::white_point
AVRational white_point[2]
CIE 1931 xy chromaticity coords of white point.
Definition: mastering_display_metadata.h:47
intreadwrite.h
AVCodecParameters::sample_aspect_ratio
AVRational sample_aspect_ratio
Video only.
Definition: codec_par.h:131
AVFormatContext::nb_programs
unsigned int nb_programs
Definition: avformat.h:1530
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:554
AVFormatContext::iformat
const struct AVInputFormat * iformat
The input container format.
Definition: avformat.h:1375
AVFormatContext::chapters
AVChapter ** chapters
Definition: avformat.h:1581
dump_replaygain
static void dump_replaygain(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:259
AVCodecParameters::width
int width
Video only.
Definition: codec_par.h:121
av_q2d
static double av_q2d(AVRational a)
Convert an AVRational to a double.
Definition: rational.h:104
AVStreamGroup::index
unsigned int index
Group index in AVFormatContext.
Definition: avformat.h:1199
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:201
AVPacketSideData::data
uint8_t * data
Definition: packet.h:374
AVDOVIDecoderConfigurationRecord::dv_profile
uint8_t dv_profile
Definition: dovi_meta.h:55
ctx
AVFormatContext * ctx
Definition: movenc.c:48
dump_metadata
static void dump_metadata(void *ctx, const AVDictionary *m, const char *indent, int log_level)
Definition: dump.c:167
FFStream::codec_info_nb_frames
int codec_info_nb_frames
Number of frames that have been demuxed during avformat_find_stream_info()
Definition: internal.h:398
channels
channels
Definition: aptx.h:31
AVIAMFLayer::ch_layout
AVChannelLayout ch_layout
Definition: iamf.h:288
AV_PKT_DATA_STEREO3D
@ AV_PKT_DATA_STEREO3D
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
Definition: packet.h:115
nb_streams
static int nb_streams
Definition: ffprobe.c:330
AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
@ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
Definition: defs.h:226
AVCodecParameters::nb_coded_side_data
int nb_coded_side_data
Amount of entries in coded_side_data.
Definition: codec_par.h:231
AVReplayGain::track_peak
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
Definition: replaygain.h:39
AVCPBProperties
This structure describes the bitrate properties of an encoded bitstream.
Definition: defs.h:269
AVDOVIDecoderConfigurationRecord::dv_version_major
uint8_t dv_version_major
Definition: dovi_meta.h:53
dump_paramchange
static void dump_paramchange(void *ctx, const AVPacketSideData *sd, int log_level)
Definition: dump.c:175
AVStereo3D::flags
int flags
Additional information about the frame packing.
Definition: stereo3d.h:182
if
if(ret)
Definition: filter_design.txt:179
AVFormatContext
Format I/O context.
Definition: avformat.h:1363
internal.h
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:864
avcodec_parameters_to_context
int avcodec_parameters_to_context(AVCodecContext *codec, const struct AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
AVStream::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
Definition: avformat.h:880
NULL
#define NULL
Definition: coverity.c:32
AVDOVIDecoderConfigurationRecord::dv_level
uint8_t dv_level
Definition: dovi_meta.h:56
AVDOVIDecoderConfigurationRecord::dv_bl_signal_compatibility_id
uint8_t dv_bl_signal_compatibility_id
Definition: dovi_meta.h:60
avcodec_free_context
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
Definition: options.c:169
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AVPacketSideData::type
enum AVPacketSideDataType type
Definition: packet.h:376
AV_DISPOSITION_COMMENT
#define AV_DISPOSITION_COMMENT
The stream is a commentary track.
Definition: avformat.h:737
AVIAMFLayer
A layer defining a Channel Layout in the Audio Element.
Definition: iamf.h:285
AVStream::metadata
AVDictionary * metadata
Definition: avformat.h:921
AV_DISPOSITION_METADATA
#define AV_DISPOSITION_METADATA
The subtitle stream contains time-aligned metadata that is not intended to be directly presented to t...
Definition: avformat.h:801
double
double
Definition: af_crystalizer.c:131
AV_AUDIO_SERVICE_TYPE_EMERGENCY
@ AV_AUDIO_SERVICE_TYPE_EMERGENCY
Definition: defs.h:229
AV_DISPOSITION_ORIGINAL
#define AV_DISPOSITION_ORIGINAL
The stream is in original language.
Definition: avformat.h:733
AVCodecParameters::ch_layout
AVChannelLayout ch_layout
Audio only.
Definition: codec_par.h:206
dump_dictionary
static void dump_dictionary(void *ctx, const AVDictionary *m, const char *name, const char *indent, int log_level)
Definition: dump.c:140
AV_PKT_DATA_CONTENT_LIGHT_LEVEL
@ AV_PKT_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
Definition: packet.h:236
index
int index
Definition: gxfenc.c:89
c
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
Definition: undefined.txt:32
AVAudioServiceType
AVAudioServiceType
Definition: defs.h:222
AVIAMFSubmixElement::audio_element_id
unsigned int audio_element_id
The id of the Audio Element this submix element references.
Definition: iamf.h:443
AV_PKT_DATA_SPHERICAL
@ AV_PKT_DATA_SPHERICAL
This side data should be associated with a video stream and corresponds to the AVSphericalMapping str...
Definition: packet.h:229
AVIAMFSubmix
Submix layout as defined in section 3.7 of IAMF.
Definition: iamf.h:543
AVFormatContext::nb_streams
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition: avformat.h:1419
AVOutputFormat::flags
int flags
can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS,...
Definition: avformat.h:530
AV_STREAM_GROUP_PARAMS_TILE_GRID
@ AV_STREAM_GROUP_PARAMS_TILE_GRID
Definition: avformat.h:1182
AV_DISPOSITION_CAPTIONS
#define AV_DISPOSITION_CAPTIONS
The subtitle stream contains captions, providing a transcription and possibly a translation of audio.
Definition: avformat.h:790
av_spherical_projection_name
const char * av_spherical_projection_name(enum AVSphericalProjection projection)
Provide a human-readable name of a given AVSphericalProjection.
Definition: spherical.c:62
f
f
Definition: af_crystalizer.c:121
AV_SPHERICAL_CUBEMAP
@ AV_SPHERICAL_CUBEMAP
Video frame is split into 6 faces of a cube, and arranged on a 3x2 layout.
Definition: spherical.h:61
AVPacket::size
int size
Definition: packet.h:523
FFStream
Definition: internal.h:199
size
int size
Definition: twinvq_data.h:10344
AV_NOPTS_VALUE
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:248
AVStreamGroup::iamf_audio_element
struct AVIAMFAudioElement * iamf_audio_element
Definition: avformat.h:1221
AVReplayGain::track_gain
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
Definition: replaygain.h:34
AV_DISPOSITION_DUB
#define AV_DISPOSITION_DUB
The stream is not in original language.
Definition: avformat.h:727
AVCPBProperties::min_bitrate
int64_t min_bitrate
Minimum bitrate of the stream, in bits per second.
Definition: defs.h:279
AVStream::sample_aspect_ratio
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
Definition: avformat.h:919
AV_DISPOSITION_HEARING_IMPAIRED
#define AV_DISPOSITION_HEARING_IMPAIRED
The stream is intended for hearing impaired audiences.
Definition: avformat.h:756
AVPacket::dts
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
Definition: packet.h:521
height
#define height
AVSphericalMapping::padding
uint32_t padding
Number of pixels to pad from the edge of each cube face.
Definition: spherical.h:178
AVIAMFAudioElement
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
Definition: iamf.h:347
AVPacket::flags
int flags
A combination of AV_PKT_FLAG values.
Definition: packet.h:528
AVCPBProperties::avg_bitrate
int64_t avg_bitrate
Average bitrate of the stream, in bits per second.
Definition: defs.h:284
AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT
@ AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT
Definition: avformat.h:1180
AV_STEREO3D_FLAG_INVERT
#define AV_STEREO3D_FLAG_INVERT
Inverted views, Right/Bottom represents the left view.
Definition: stereo3d.h:164
AVStreamGroup::streams
AVStream ** streams
A list of streams in the group.
Definition: avformat.h:1254
dump_stream_format
static void dump_stream_format(const AVFormatContext *ic, int i, int group_index, int index, int is_output, int log_level)
Definition: dump.c:583
AVStreamGroup::iamf_mix_presentation
struct AVIAMFMixPresentation * iamf_mix_presentation
Definition: avformat.h:1222
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
layout
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 layout
Definition: filter_design.txt:18
av_get_picture_type_char
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
Definition: utils.c:40
AVCPBProperties::vbv_delay
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
Definition: defs.h:299
HEXDUMP_PRINT
#define HEXDUMP_PRINT(...)
Definition: dump.c:46
AV_PKT_DATA_CPB_PROPERTIES
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
Definition: packet.h:146
AVStreamGroupTileGrid::width
int width
Width of the final image for presentation.
Definition: avformat.h:1165
AVSphericalMapping::roll
int32_t roll
Rotation around the forward vector [-180, 180].
Definition: spherical.h:124
AV_PKT_DATA_H263_MB_INFO
@ AV_PKT_DATA_H263_MB_INFO
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
Definition: packet.h:94
log.h
lrintf
#define lrintf(x)
Definition: libm_mips.h:72
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AVPacket::pts
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: packet.h:515
av_timecode_make_smpte_tc_string2
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.
Definition: timecode.c:138
AVCodecContext::properties
unsigned properties
Properties of the stream that gets decoded.
Definition: avcodec.h:1908
AVCodecParameters::height
int height
Definition: codec_par.h:122
AV_TIME_BASE
#define AV_TIME_BASE
Internal time base represented as integer.
Definition: avutil.h:254
display.h
AV_PKT_DATA_ICC_PROFILE
@ AV_PKT_DATA_ICC_PROFILE
ICC profile data consisting of an opaque octet buffer following the format described by ISO 15076-1.
Definition: packet.h:275
AVIAMFMixPresentation
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
Definition: iamf.h:600
AVCPBProperties::max_bitrate
int64_t max_bitrate
Maximum bitrate of the stream, in bits per second.
Definition: defs.h:274
AV_DISPOSITION_KARAOKE
#define AV_DISPOSITION_KARAOKE
The stream contains karaoke audio.
Definition: avformat.h:745
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
@ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
Definition: defs.h:225
av_mallocz
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
Definition: mem.c:254
AVProgram
New fields can be added to the end with minor version bumps.
Definition: avformat.h:1287
AV_DISPOSITION_DEPENDENT
#define AV_DISPOSITION_DEPENDENT
The stream is intended to be mixed with another stream before presentation.
Definition: avformat.h:807
AVMasteringDisplayMetadata
Mastering display metadata capable of representing the color volume of the display used to master the...
Definition: mastering_display_metadata.h:38
len
int len
Definition: vorbis_enc_data.h:426
av_rescale
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
Definition: mathematics.c:129
AVCodecContext::height
int height
Definition: avcodec.h:625
AVCodecParameters::coded_side_data
AVPacketSideData * coded_side_data
Additional data associated with the entire stream.
Definition: codec_par.h:226
ambient_viewing_environment.h
avcodec.h
av_cmp_q
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
Definition: rational.h:89
AVStreamGroup::params
union AVStreamGroup::@295 params
Group type-specific parameters.
AVIAMFSubmix::nb_layouts
unsigned int nb_layouts
Number of layouts in the submix.
Definition: iamf.h:574
AVStream::disposition
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
Definition: avformat.h:910
AV_DISPOSITION_VISUAL_IMPAIRED
#define AV_DISPOSITION_VISUAL_IMPAIRED
The stream is intended for visually impaired audiences.
Definition: avformat.h:760
tag
uint32_t tag
Definition: movenc.c:1786
AVStream::id
int id
Format-specific stream ID.
Definition: avformat.h:853
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:841
av_hex_dump_log
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the log.
Definition: dump.c:86
AVFormatContext::oformat
const struct AVOutputFormat * oformat
The output container format.
Definition: avformat.h:1382
AVCPBProperties::buffer_size
int64_t buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
Definition: defs.h:290
dump_spherical
static void dump_spherical(void *ctx, const AVCodecParameters *par, const AVPacketSideData *sd, int log_level)
Definition: dump.c:395
AVSphericalMapping::pitch
int32_t pitch
Rotation around the right vector [-90, 90].
Definition: spherical.h:123
AVStreamGroup::metadata
AVDictionary * metadata
Metadata that applies to the whole group.
Definition: avformat.h:1234
AVStereo3D::type
enum AVStereo3DType type
How views are packed within the video.
Definition: stereo3d.h:177
avformat.h
dovi_meta.h
AV_AUDIO_SERVICE_TYPE_KARAOKE
@ AV_AUDIO_SERVICE_TYPE_KARAOKE
Definition: defs.h:231
AV_DISPOSITION_DESCRIPTIONS
#define AV_DISPOSITION_DESCRIPTIONS
The subtitle stream contains a textual description of the video content.
Definition: avformat.h:796
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
SIZE_SPECIFIER
#define SIZE_SPECIFIER
Definition: internal.h:141
AVStreamGroup
Definition: avformat.h:1188
AVCodecContext
main external API structure.
Definition: avcodec.h:445
AVStream::index
int index
stream index in AVFormatContext
Definition: avformat.h:847
AVStreamGroup::nb_streams
unsigned int nb_streams
Number of elements in AVStreamGroup.streams.
Definition: avformat.h:1241
channel_layout.h
AVInputFormat::flags
int flags
Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS,...
Definition: avformat.h:568
AVCodecContext::qmin
int qmin
minimum quantizer
Definition: avcodec.h:1252
AVRational::den
int den
Denominator.
Definition: rational.h:60
AVDOVIDecoderConfigurationRecord::bl_present_flag
uint8_t bl_present_flag
Definition: dovi_meta.h:59
AV_AUDIO_SERVICE_TYPE_COMMENTARY
@ AV_AUDIO_SERVICE_TYPE_COMMENTARY
Definition: defs.h:228
AVIAMFSubmixLayout::sound_system
AVChannelLayout sound_system
Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus 7.1.2ch and 3....
Definition: iamf.h:512
AVReplayGain::album_peak
uint32_t album_peak
Same as track_peak, but for the whole album,.
Definition: replaygain.h:47
AVStream::r_frame_rate
AVRational r_frame_rate
Real base framerate of the stream.
Definition: avformat.h:1007
AVDOVIDecoderConfigurationRecord::rpu_present_flag
uint8_t rpu_present_flag
Definition: dovi_meta.h:57
AVDOVIDecoderConfigurationRecord::el_present_flag
uint8_t el_present_flag
Definition: dovi_meta.h:58
AVMasteringDisplayMetadata::min_luminance
AVRational min_luminance
Min luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:52
AVFormatContext::duration
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
Definition: avformat.h:1465
AVPacket::stream_index
int stream_index
Definition: packet.h:524
pkt_dump_internal
static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt, int dump_payload, AVRational time_base)
Definition: dump.c:91
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:72
AVReplayGain
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1....
Definition: replaygain.h:29
AVIAMFSubmix::nb_elements
unsigned int nb_elements
Number of elements in the submix.
Definition: iamf.h:559
AVCodecContext::coded_width
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:640
AV_PKT_DATA_AUDIO_SERVICE_TYPE
@ AV_PKT_DATA_AUDIO_SERVICE_TYPE
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.
Definition: packet.h:121
tc
#define tc
Definition: regdef.h:69
AVDOVIDecoderConfigurationRecord::dv_version_minor
uint8_t dv_version_minor
Definition: dovi_meta.h:54
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AVStreamGroup::type
enum AVStreamGroupParamsType type
Group type.
Definition: avformat.h:1215
mastering_display_metadata.h
print_peak
static void print_peak(void *ctx, const char *str, uint32_t peak, int log_level)
Definition: dump.c:249
AVIAMFMixPresentation::annotations
AVDictionary * annotations
A dictionary of strings describing the mix in different languages.
Definition: iamf.h:628
AVFormatContext::nb_stream_groups
unsigned int nb_stream_groups
Number of elements in AVFormatContext.stream_groups.
Definition: avformat.h:1981
AVStreamGroupTileGrid::height
int height
Height of the final image for presentation.
Definition: avformat.h:1175
av_free
#define av_free(p)
Definition: tableprint_vlc.h:33
AVDictionaryEntry
Definition: dict.h:89
AV_AUDIO_SERVICE_TYPE_EFFECTS
@ AV_AUDIO_SERVICE_TYPE_EFFECTS
Definition: defs.h:224
AVContentLightMetadata::MaxFALL
unsigned MaxFALL
Max average light level per frame (cd/m^2).
Definition: mastering_display_metadata.h:107
AVPacket
This structure stores compressed data.
Definition: packet.h:499
d
d
Definition: ffmpeg_filter.c:424
AVCodecContext::width
int width
picture width / height.
Definition: avcodec.h:625
int32_t
int32_t
Definition: audioconvert.c:56
AVIAMFSubmixElement
Submix element as defined in section 3.7 of IAMF.
Definition: iamf.h:437
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVFormatContext::start_time
int64_t start_time
Position of the first frame of the component, in AV_TIME_BASE fractional seconds.
Definition: avformat.h:1455
av_stereo3d_type_name
const char * av_stereo3d_type_name(unsigned int type)
Provide a human-readable name of a given stereo3d type.
Definition: stereo3d.c:58
av_pkt_dump_log2
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the log.
Definition: dump.c:120
AV_AUDIO_SERVICE_TYPE_DIALOGUE
@ AV_AUDIO_SERVICE_TYPE_DIALOGUE
Definition: defs.h:227
AVStereo3D
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
Definition: stereo3d.h:173
AVDictionaryEntry::value
char * value
Definition: dict.h:91
avstring.h
AVAmbientViewingEnvironment::ambient_light_y
AVRational ambient_light_y
Normalized y chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
Definition: ambient_viewing_environment.h:54
AVChapter::time_base
AVRational time_base
time base in which the start/end timestamps are specified
Definition: avformat.h:1324
AVIAMFMixPresentation::submixes
AVIAMFSubmix ** submixes
Array of submixes.
Definition: iamf.h:609
dump_stream_group
static void dump_stream_group(const AVFormatContext *ic, uint8_t *printed, int i, int index, int is_output)
Definition: dump.c:672
AV_AUDIO_SERVICE_TYPE_MAIN
@ AV_AUDIO_SERVICE_TYPE_MAIN
Definition: defs.h:223
AVSphericalMapping
This structure describes how to handle spherical videos, outlining information about projection,...
Definition: spherical.h:78
av_dict_iterate
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
Definition: dict.c:44
AVSphericalMapping::yaw
int32_t yaw
Rotation around the up vector [-180, 180].
Definition: spherical.h:122
av_display_rotation_get
double av_display_rotation_get(const int32_t matrix[9])
Extract the rotation component of the transformation matrix.
Definition: display.c:35
AV_DISPOSITION_LYRICS
#define AV_DISPOSITION_LYRICS
The stream contains song lyrics.
Definition: avformat.h:741
AVDOVIDecoderConfigurationRecord
Definition: dovi_meta.h:52
AV_DISPOSITION_NON_DIEGETIC
#define AV_DISPOSITION_NON_DIEGETIC
The stream is intended to be mixed with a spatial audio track.
Definition: avformat.h:784
av_hex_dump
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the specified file stream.
Definition: dump.c:81