37 #define HEXDUMP_PRINT(...) \
40 av_log(avcl, level, __VA_ARGS__); \
42 fprintf(f, __VA_ARGS__); \
50 for (i = 0; i <
size; i += 16) {
55 for (j = 0; j < 16; j++) {
62 for (j = 0; j <
len; j++) {
64 if (c < ' ' || c >
'~')
125 else if (v % (100 * 1000))
138 if (strcmp(
"language", tag->
key)) {
139 const char *p = tag->
value;
141 "%s %-16s: ", indent, tag->
key);
144 size_t len = strcspn(p,
"\x8\xa\xb\xc\xd");
165 if (!data || sd->
size < 4)
218 if (gain == INT32_MIN)
225 static void print_peak(
void *ctx,
const char *str, uint32_t peak)
239 if (sd->
size <
sizeof(*rg)) {
255 if (sd->
size <
sizeof(*stereo)) {
262 switch (stereo->
type) {
300 if (sd->
size <
sizeof(*ast)) {
385 "unknown side data type %d (%d bytes)", sd.
type, sd.
size);
395 int index,
int is_output)
403 int use_format_separator = !*codec_separator;
405 if (use_format_separator)
408 if (use_format_separator)
431 display_aspect_ratio.
num, display_aspect_ratio.
den);
440 if (fps || tbr || tbn || tbc)
481 const char *url,
int is_output)
489 is_output ?
"Output" :
"Input",
492 is_output ?
"to" :
"from", url);
498 int hours, mins, secs, us;
544 name ? name->
value :
"");
unsigned int nb_chapters
Number of chapters in AVChapter array.
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.
Views are packed per line, as if interlaced.
ptrdiff_t const GLvoid * data
Views are alternated temporally.
Views are next to each other, but when upscaling apply a checkerboard pattern.
#define AV_LOG_WARNING
Something somehow does not look correct.
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
uint8_t * dump_separator
dump format separator.
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel...
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
AVPacketSideData * side_data
An array of side data that applies to the whole stream (i.e.
static void dump_audioservicetype(void *ctx, AVPacketSideData *sd)
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt, int dump_payload, AVRational time_base)
unsigned int nb_stream_indexes
Stereo 3D type: this structure describes how two videos are packed within a single video surface...
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
int id
Format-specific stream ID.
int nb_side_data
The number of elements in the AVStream.side_data array.
const AVClass * av_class
information on struct for av_log
AVStream ** streams
A list of all streams in the file.
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.
static double av_q2d(AVRational a)
Convert rational to double.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
unsigned int * stream_index
int32_t album_gain
Same as track_gain, but for the whole album.
static void print_fps(double d, const char *postfix)
struct AVOutputFormat * oformat
The output container format.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static void dump_metadata(void *ctx, AVDictionary *m, const char *indent)
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.
AVDictionary * metadata
Metadata that applies to the whole file.
int flags
Additional information about the frame packing.
void * av_opt_ptr(const AVClass *class, void *obj, const char *name)
Gets a pointer to the requested field in a struct.
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.
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
enum AVPacketSideDataType type
Video is not stereoscopic (and metadata has to be there).
AVRational avg_frame_rate
Average framerate.
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
int flags
A combination of AV_PKT_FLAG values.
AVCodecContext * codec
Codec context associated with this stream.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
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.
#define AV_TIME_BASE
Internal time base represented as integer.
This side data contains quality related information from the encoder.
#define HEXDUMP_PRINT(...)
int width
picture width / height.
static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_output)
#define AV_STEREO3D_FLAG_INVERT
Inverted views, Right/Bottom represents the left view.
static void dump_paramchange(void *ctx, AVPacketSideData *sd)
int64_t end
chapter start/end time in time_base units
enum AVStereo3DType type
How views are packed within the video.
#define AV_LOG_INFO
Standard information.
enum AVMediaType codec_type
char * av_strdup(const char *s)
Duplicate the string s.
static void dump_replaygain(void *ctx, AVPacketSideData *sd)
BYTE int const BYTE int int int height
rational number numerator/denominator
static void hex_dump_internal(void *avcl, FILE *f, int level, const uint8_t *buf, int size)
Views are on top of each other.
This side data should be associated with an audio stream and contains ReplayGain information in form ...
int64_t start_time
Position of the first frame of the component, in AV_TIME_BASE fractional seconds. ...
Views are next to each other.
static void print_peak(void *ctx, const char *str, uint32_t peak)
static void print_gain(void *ctx, const char *str, int32_t gain)
int disposition
AV_DISPOSITION_* bit field.
AVRational time_base
time base in which the start/end timestamps are specified
struct AVInputFormat * iformat
The input container format.
double av_display_rotation_get(const int32_t matrix[9])
The display transformation matrix specifies an affine transformation that should be applied to video ...
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
uint32_t album_peak
Same as track_peak, but for the whole album,.
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
Views are packed in a checkerboard-like structure per pixel.
int codec_info_nb_frames
Number of frames that have been demuxed during av_find_stream_info()
Views are packed per column.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
int bit_rate
Total stream bitrate in bit/s, 0 if not available.
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
static void dump_stereo3d(void *ctx, AVPacketSideData *sd)
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string.
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
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.
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.
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_NOPTS_VALUE
Undefined timestamp value.
static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.