Libav
dump.c
Go to the documentation of this file.
1 /*
2  * Various pretty-printing functions for use within Libav
3  *
4  * This file is part of Libav.
5  *
6  * Libav is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * Libav is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with Libav; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #include <stdio.h>
22 #include <stdint.h>
23 
25 #include "libavutil/display.h"
26 #include "libavutil/intreadwrite.h"
27 #include "libavutil/log.h"
28 #include "libavutil/mathematics.h"
29 #include "libavutil/replaygain.h"
30 
31 #include "avformat.h"
32 
33 #define HEXDUMP_PRINT(...) \
34  do { \
35  if (!f) \
36  av_log(avcl, level, __VA_ARGS__); \
37  else \
38  fprintf(f, __VA_ARGS__); \
39  } while (0)
40 
41 static void hex_dump_internal(void *avcl, FILE *f, int level,
42  const uint8_t *buf, int size)
43 {
44  int len, i, j, c;
45 
46  for (i = 0; i < size; i += 16) {
47  len = size - i;
48  if (len > 16)
49  len = 16;
50  HEXDUMP_PRINT("%08x ", i);
51  for (j = 0; j < 16; j++) {
52  if (j < len)
53  HEXDUMP_PRINT(" %02x", buf[i + j]);
54  else
55  HEXDUMP_PRINT(" ");
56  }
57  HEXDUMP_PRINT(" ");
58  for (j = 0; j < len; j++) {
59  c = buf[i + j];
60  if (c < ' ' || c > '~')
61  c = '.';
62  HEXDUMP_PRINT("%c", c);
63  }
64  HEXDUMP_PRINT("\n");
65  }
66 }
67 
68 void av_hex_dump(FILE *f, const uint8_t *buf, int size)
69 {
70  hex_dump_internal(NULL, f, 0, buf, size);
71 }
72 
73 void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
74 {
75  hex_dump_internal(avcl, NULL, level, buf, size);
76 }
77 
78 static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt,
79  int dump_payload, AVRational time_base)
80 {
81  HEXDUMP_PRINT("stream #%d:\n", pkt->stream_index);
82  HEXDUMP_PRINT(" keyframe=%d\n", (pkt->flags & AV_PKT_FLAG_KEY) != 0);
83  HEXDUMP_PRINT(" duration=%0.3f\n", pkt->duration * av_q2d(time_base));
84  /* DTS is _always_ valid after av_read_frame() */
85  HEXDUMP_PRINT(" dts=");
86  if (pkt->dts == AV_NOPTS_VALUE)
87  HEXDUMP_PRINT("N/A");
88  else
89  HEXDUMP_PRINT("%0.3f", pkt->dts * av_q2d(time_base));
90  /* PTS may not be known if B-frames are present. */
91  HEXDUMP_PRINT(" pts=");
92  if (pkt->pts == AV_NOPTS_VALUE)
93  HEXDUMP_PRINT("N/A");
94  else
95  HEXDUMP_PRINT("%0.3f", pkt->pts * av_q2d(time_base));
96  HEXDUMP_PRINT("\n");
97  HEXDUMP_PRINT(" size=%d\n", pkt->size);
98  if (dump_payload)
99  av_hex_dump(f, pkt->data, pkt->size);
100 }
101 
102 void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st)
103 {
104  pkt_dump_internal(NULL, f, 0, pkt, dump_payload, st->time_base);
105 }
106 
107 void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
108  AVStream *st)
109 {
110  pkt_dump_internal(avcl, NULL, level, pkt, dump_payload, st->time_base);
111 }
112 
113 
114 static void print_fps(double d, const char *postfix)
115 {
116  uint64_t v = lrintf(d * 100);
117  if (v % 100)
118  av_log(NULL, AV_LOG_INFO, ", %3.2f %s", d, postfix);
119  else if (v % (100 * 1000))
120  av_log(NULL, AV_LOG_INFO, ", %1.0f %s", d, postfix);
121  else
122  av_log(NULL, AV_LOG_INFO, ", %1.0fk %s", d / 1000, postfix);
123 }
124 
125 static void dump_metadata(void *ctx, AVDictionary *m, const char *indent)
126 {
127  if (m && !(av_dict_count(m) == 1 && av_dict_get(m, "language", NULL, 0))) {
129 
130  av_log(ctx, AV_LOG_INFO, "%sMetadata:\n", indent);
131  while ((tag = av_dict_get(m, "", tag, AV_DICT_IGNORE_SUFFIX)))
132  if (strcmp("language", tag->key))
133  av_log(ctx, AV_LOG_INFO,
134  "%s %-16s: %s\n", indent, tag->key, tag->value);
135  }
136 }
137 
138 /* param change side data*/
139 static void dump_paramchange(void *ctx, AVPacketSideData *sd)
140 {
141  int size = sd->size;
142  const uint8_t *data = sd->data;
143  uint32_t flags, channels, sample_rate, width, height;
144  uint64_t layout;
145 
146  if (!data || sd->size < 4)
147  goto fail;
148 
149  flags = AV_RL32(data);
150  data += 4;
151  size -= 4;
152 
154  if (size < 4)
155  goto fail;
156  channels = AV_RL32(data);
157  data += 4;
158  size -= 4;
159  av_log(ctx, AV_LOG_INFO, "channel count %"PRIu32", ", channels);
160  }
162  if (size < 8)
163  goto fail;
164  layout = AV_RL64(data);
165  data += 8;
166  size -= 8;
167  av_log(ctx, AV_LOG_INFO,
168  "channel layout: %s, ", av_get_channel_name(layout));
169  }
171  if (size < 4)
172  goto fail;
173  sample_rate = AV_RL32(data);
174  data += 4;
175  size -= 4;
176  av_log(ctx, AV_LOG_INFO, "sample_rate %"PRIu32", ", sample_rate);
177  }
179  if (size < 8)
180  goto fail;
181  width = AV_RL32(data);
182  data += 4;
183  size -= 4;
184  height = AV_RL32(data);
185  data += 4;
186  size -= 4;
187  av_log(ctx, AV_LOG_INFO, "width %"PRIu32" height %"PRIu32, width, height);
188  }
189 
190  return;
191 fail:
192  av_log(ctx, AV_LOG_INFO, "unknown param");
193 }
194 
195 /* replaygain side data*/
196 static void print_gain(void *ctx, const char *str, int32_t gain)
197 {
198  av_log(ctx, AV_LOG_INFO, "%s - ", str);
199  if (gain == INT32_MIN)
200  av_log(ctx, AV_LOG_INFO, "unknown");
201  else
202  av_log(ctx, AV_LOG_INFO, "%f", gain / 100000.0f);
203  av_log(ctx, AV_LOG_INFO, ", ");
204 }
205 
206 static void print_peak(void *ctx, const char *str, uint32_t peak)
207 {
208  av_log(ctx, AV_LOG_INFO, "%s - ", str);
209  if (!peak)
210  av_log(ctx, AV_LOG_INFO, "unknown");
211  else
212  av_log(ctx, AV_LOG_INFO, "%f", (float) peak / UINT32_MAX);
213  av_log(ctx, AV_LOG_INFO, ", ");
214 }
215 
216 static void dump_replaygain(void *ctx, AVPacketSideData *sd)
217 {
218  AVReplayGain *rg;
219 
220  if (sd->size < sizeof(*rg)) {
221  av_log(ctx, AV_LOG_INFO, "invalid data");
222  return;
223  }
224  rg = (AVReplayGain*)sd->data;
225 
226  print_gain(ctx, "track gain", rg->track_gain);
227  print_peak(ctx, "track peak", rg->track_peak);
228  print_gain(ctx, "album gain", rg->album_gain);
229  print_peak(ctx, "album peak", rg->album_peak);
230 }
231 
232 static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
233 {
234  int i;
235 
236  if (st->nb_side_data)
237  av_log(ctx, AV_LOG_INFO, "%sSide data:\n", indent);
238 
239  for (i = 0; i < st->nb_side_data; i++) {
240  AVPacketSideData sd = st->side_data[i];
241  av_log(ctx, AV_LOG_INFO, "%s ", indent);
242 
243  switch (sd.type) {
244  case AV_PKT_DATA_PALETTE:
245  av_log(ctx, AV_LOG_INFO, "palette");
246  break;
248  av_log(ctx, AV_LOG_INFO, "new extradata");
249  break;
251  av_log(ctx, AV_LOG_INFO, "paramchange: ");
252  dump_paramchange(ctx, &sd);
253  break;
255  av_log(ctx, AV_LOG_INFO, "h263 macroblock info");
256  break;
258  av_log(ctx, AV_LOG_INFO, "replaygain: ");
259  dump_replaygain(ctx, &sd);
260  break;
262  av_log(ctx, AV_LOG_INFO, "displaymatrix: rotation of %.2f degrees",
264  break;
265  default:
266  av_log(ctx, AV_LOG_WARNING,
267  "unknown side data type %d (%d bytes)", sd.type, sd.size);
268  break;
269  }
270 
271  av_log(ctx, AV_LOG_INFO, "\n");
272  }
273 }
274 
275 /* "user interface" functions */
276 static void dump_stream_format(AVFormatContext *ic, int i,
277  int index, int is_output)
278 {
279  char buf[256];
280  int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
281  AVStream *st = ic->streams[i];
282  AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
283 
284  avcodec_string(buf, sizeof(buf), st->codec, is_output);
285  av_log(NULL, AV_LOG_INFO, " Stream #%d.%d", index, i);
286 
287  /* the pid is an important information, so we display it */
288  /* XXX: add a generic system */
289  if (flags & AVFMT_SHOW_IDS)
290  av_log(NULL, AV_LOG_INFO, "[0x%x]", st->id);
291  if (lang)
292  av_log(NULL, AV_LOG_INFO, "(%s)", lang->value);
293  av_log(NULL, AV_LOG_DEBUG, ", %d, %d/%d", st->codec_info_nb_frames,
294  st->time_base.num, st->time_base.den);
295  av_log(NULL, AV_LOG_INFO, ": %s", buf);
296 
297  if (st->sample_aspect_ratio.num && // default
299  AVRational display_aspect_ratio;
300  av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
301  st->codec->width * st->sample_aspect_ratio.num,
302  st->codec->height * st->sample_aspect_ratio.den,
303  1024 * 1024);
304  av_log(NULL, AV_LOG_INFO, ", PAR %d:%d DAR %d:%d",
306  display_aspect_ratio.num, display_aspect_ratio.den);
307  }
308 
309  if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
310  if (st->avg_frame_rate.den && st->avg_frame_rate.num)
311  print_fps(av_q2d(st->avg_frame_rate), "fps");
312  if (st->time_base.den && st->time_base.num)
313  print_fps(1 / av_q2d(st->time_base), "tbn");
314  if (st->codec->time_base.den && st->codec->time_base.num)
315  print_fps(1 / av_q2d(st->codec->time_base), "tbc");
316  }
317 
319  av_log(NULL, AV_LOG_INFO, " (default)");
321  av_log(NULL, AV_LOG_INFO, " (dub)");
323  av_log(NULL, AV_LOG_INFO, " (original)");
325  av_log(NULL, AV_LOG_INFO, " (comment)");
327  av_log(NULL, AV_LOG_INFO, " (lyrics)");
329  av_log(NULL, AV_LOG_INFO, " (karaoke)");
331  av_log(NULL, AV_LOG_INFO, " (forced)");
333  av_log(NULL, AV_LOG_INFO, " (hearing impaired)");
335  av_log(NULL, AV_LOG_INFO, " (visual impaired)");
337  av_log(NULL, AV_LOG_INFO, " (clean effects)");
338  av_log(NULL, AV_LOG_INFO, "\n");
339 
340  dump_metadata(NULL, st->metadata, " ");
341 
342  dump_sidedata(NULL, st, " ");
343 }
344 
346  const char *url, int is_output)
347 {
348  int i;
349  uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
350  if (ic->nb_streams && !printed)
351  return;
352 
353  av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
354  is_output ? "Output" : "Input",
355  index,
356  is_output ? ic->oformat->name : ic->iformat->name,
357  is_output ? "to" : "from", url);
358  dump_metadata(NULL, ic->metadata, " ");
359 
360  if (!is_output) {
361  av_log(NULL, AV_LOG_INFO, " Duration: ");
362  if (ic->duration != AV_NOPTS_VALUE) {
363  int hours, mins, secs, us;
364  secs = ic->duration / AV_TIME_BASE;
365  us = ic->duration % AV_TIME_BASE;
366  mins = secs / 60;
367  secs %= 60;
368  hours = mins / 60;
369  mins %= 60;
370  av_log(NULL, AV_LOG_INFO, "%02d:%02d:%02d.%02d", hours, mins, secs,
371  (100 * us) / AV_TIME_BASE);
372  } else {
373  av_log(NULL, AV_LOG_INFO, "N/A");
374  }
375  if (ic->start_time != AV_NOPTS_VALUE) {
376  int secs, us;
377  av_log(NULL, AV_LOG_INFO, ", start: ");
378  secs = ic->start_time / AV_TIME_BASE;
379  us = abs(ic->start_time % AV_TIME_BASE);
380  av_log(NULL, AV_LOG_INFO, "%d.%06d",
381  secs, (int) av_rescale(us, 1000000, AV_TIME_BASE));
382  }
383  av_log(NULL, AV_LOG_INFO, ", bitrate: ");
384  if (ic->bit_rate)
385  av_log(NULL, AV_LOG_INFO, "%d kb/s", ic->bit_rate / 1000);
386  else
387  av_log(NULL, AV_LOG_INFO, "N/A");
388  av_log(NULL, AV_LOG_INFO, "\n");
389  }
390 
391  for (i = 0; i < ic->nb_chapters; i++) {
392  AVChapter *ch = ic->chapters[i];
393  av_log(NULL, AV_LOG_INFO, " Chapter #%d.%d: ", index, i);
395  "start %f, ", ch->start * av_q2d(ch->time_base));
397  "end %f\n", ch->end * av_q2d(ch->time_base));
398 
399  dump_metadata(NULL, ch->metadata, " ");
400  }
401 
402  if (ic->nb_programs) {
403  int j, k, total = 0;
404  for (j = 0; j < ic->nb_programs; j++) {
406  "name", NULL, 0);
407  av_log(NULL, AV_LOG_INFO, " Program %d %s\n", ic->programs[j]->id,
408  name ? name->value : "");
409  dump_metadata(NULL, ic->programs[j]->metadata, " ");
410  for (k = 0; k < ic->programs[j]->nb_stream_indexes; k++) {
412  index, is_output);
413  printed[ic->programs[j]->stream_index[k]] = 1;
414  }
415  total += ic->programs[j]->nb_stream_indexes;
416  }
417  if (total < ic->nb_streams)
418  av_log(NULL, AV_LOG_INFO, " No Program\n");
419  }
420 
421  for (i = 0; i < ic->nb_streams; i++)
422  if (!printed[i])
423  dump_stream_format(ic, i, index, is_output);
424 
425  av_free(printed);
426 }
unsigned int nb_chapters
Number of chapters in AVChapter array.
Definition: avformat.h:1119
int size
static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt, int dump_payload, AVRational time_base)
Definition: dump.c:78
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:129
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
Definition: avformat.h:769
int num
numerator
Definition: rational.h:44
int size
Definition: avcodec.h:968
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
Definition: dict.c:33
#define AV_DISPOSITION_DUB
Definition: avformat.h:669
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel...
Definition: avcodec.h:1423
void av_pkt_dump2(FILE *f, AVPacket *pkt, int dump_payload, AVStream *st)
Send a nice dump of a packet to the specified file stream.
Definition: dump.c:102
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
Definition: rational.h:55
#define AV_DISPOSITION_HEARING_IMPAIRED
stream for hearing impaired audiences
Definition: avformat.h:681
#define AV_DISPOSITION_CLEAN_EFFECTS
stream without voice
Definition: avformat.h:683
AVPacketSideData * side_data
An array of side data that applies to the whole stream (i.e.
Definition: avformat.h:807
AVDictionary * metadata
Definition: avformat.h:909
int id
Definition: avformat.h:893
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
Definition: avcodec.h:898
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
Definition: replaygain.h:40
#define AV_DISPOSITION_KARAOKE
Definition: avformat.h:673
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avcodec.h:1169
#define AVFMT_SHOW_IDS
Show format stream IDs numbers.
Definition: avformat.h:411
Format I/O context.
Definition: avformat.h:922
#define AV_RL64
Definition: intreadwrite.h:173
unsigned int nb_stream_indexes
Definition: avformat.h:897
int flags
can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH, AVFMT_TS_NONSTRICT
Definition: avformat.h:465
uint8_t
int flags
Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK.
Definition: avformat.h:539
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: avcodec.h:913
int id
Format-specific stream ID.
Definition: avformat.h:706
int nb_side_data
The number of elements in the AVStream.side_data array.
Definition: avformat.h:811
const char * name
AVStream ** streams
A list of all streams in the file.
Definition: avformat.h:990
const char data[16]
Definition: mxf.c:70
static double av_q2d(AVRational a)
Convert rational to double.
Definition: rational.h:69
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:38
uint8_t * data
Definition: avcodec.h:967
static int flags
Definition: log.c:44
uint32_t tag
Definition: movenc.c:844
uint8_t * data
Definition: avcodec.h:917
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:985
unsigned int * stream_index
Definition: avformat.h:896
int32_t album_gain
Same as track_gain, but for the whole album.
Definition: replaygain.h:44
static void print_fps(double d, const char *postfix)
Definition: dump.c:114
struct AVOutputFormat * oformat
The output container format.
Definition: avformat.h:941
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: avcodec.h:1013
static void dump_metadata(void *ctx, AVDictionary *m, const char *indent)
Definition: dump.c:125
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, streams, container, programs, metadata, side data, codec and time base.
Definition: dump.c:345
AVDictionary * metadata
Metadata that applies to the whole file.
Definition: avformat.h:1130
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
Definition: mem.c:186
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:68
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
Definition: avcodec.h:877
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:144
unsigned int nb_programs
Definition: avformat.h:1069
AVChapter ** chapters
Definition: avformat.h:1120
enum AVPacketSideDataType type
Definition: avcodec.h:919
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:168
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:780
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:973
AVCodecContext * codec
Codec context associated with this stream.
Definition: avformat.h:718
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
#define AV_DISPOSITION_LYRICS
Definition: avformat.h:672
#define AV_DISPOSITION_FORCED
Track should be used during playback by default.
Definition: avformat.h:680
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition: avformat.h:978
audio channel layout utility functions
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:116
#define AV_TIME_BASE
Internal time base represented as integer.
Definition: avutil.h:234
#define HEXDUMP_PRINT(...)
Definition: dump.c:33
int width
picture width / height.
Definition: avcodec.h:1218
static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_output)
Definition: dump.c:276
const char * name
Definition: avformat.h:446
int32_t
static void dump_paramchange(void *ctx, AVPacketSideData *sd)
Definition: dump.c:139
static av_always_inline av_const long int lrintf(float x)
Definition: libm.h:144
#define AV_RL32
Definition: intreadwrite.h:146
AVDictionary * metadata
Definition: avformat.h:771
#define AV_DISPOSITION_VISUAL_IMPAIRED
stream for visual impaired audiences
Definition: avformat.h:682
Stream structure.
Definition: avformat.h:699
int64_t end
chapter start/end time in time_base units
Definition: avformat.h:908
NULL
Definition: eval.c:55
#define AV_DISPOSITION_DEFAULT
Definition: avformat.h:668
static int width
Definition: utils.c:156
#define AV_LOG_INFO
Standard information.
Definition: log.h:134
enum AVMediaType codec_type
Definition: avcodec.h:1052
static void dump_replaygain(void *ctx, AVPacketSideData *sd)
Definition: dump.c:216
int index
Definition: gxfenc.c:72
rational number numerator/denominator
Definition: rational.h:43
static void hex_dump_internal(void *avcl, FILE *f, int level, const uint8_t *buf, int size)
Definition: dump.c:41
AVDictionary * metadata
Definition: avformat.h:898
This side data should be associated with an audio stream and contains ReplayGain information in form ...
Definition: avcodec.h:904
int64_t start_time
Position of the first frame of the component, in AV_TIME_BASE fractional seconds. ...
Definition: avformat.h:1007
uint8_t level
Definition: svq3.c:147
int height
Definition: gxfenc.c:72
int64_t start
Definition: avformat.h:908
Main libavformat public API header.
static void print_peak(void *ctx, const char *str, uint32_t peak)
Definition: dump.c:206
static void print_gain(void *ctx, const char *str, int32_t gain)
Definition: dump.c:196
int disposition
AV_DISPOSITION_* bit field.
Definition: avformat.h:760
AVRational time_base
time base in which the start/end timestamps are specified
Definition: avformat.h:907
char * key
Definition: dict.h:75
int den
denominator
Definition: rational.h:45
struct AVInputFormat * iformat
The input container format.
Definition: avformat.h:934
double av_display_rotation_get(const int32_t matrix[9])
The display transformation matrix specifies an affine transformation that should be applied to video ...
Definition: display.c:34
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
Definition: utils.c:1833
uint32_t album_peak
Same as track_peak, but for the whole album,.
Definition: replaygain.h:48
char * value
Definition: dict.h:76
int len
int codec_info_nb_frames
Number of frames that have been demuxed during av_find_stream_info()
Definition: avformat.h:864
#define AV_DISPOSITION_COMMENT
Definition: avformat.h:671
uint64_t layout
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
Definition: avcodec.h:966
int bit_rate
Total stream bitrate in bit/s, 0 if not available.
Definition: avformat.h:1024
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
Definition: avformat.h:1017
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:525
#define AV_DICT_IGNORE_SUFFIX
Definition: dict.h:62
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
Definition: replaygain.h:35
void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, AVStream *st)
Send a nice dump of a packet to the log.
Definition: dump.c:107
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:73
int stream_index
Definition: avcodec.h:969
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avformat.h:741
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
Definition: replaygain.h:30
This structure stores compressed data.
Definition: avcodec.h:944
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:205
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: avcodec.h:960
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:228
AVProgram ** programs
Definition: avformat.h:1070
#define AV_DISPOSITION_ORIGINAL
Definition: avformat.h:670
static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
Definition: dump.c:232