34 #define HEXDUMP_PRINT(...) \ 37 av_log(avcl, level, __VA_ARGS__); \ 39 fprintf(f, __VA_ARGS__); \ 47 for (i = 0; i <
size; i += 16) {
52 for (j = 0; j < 16; j++) {
59 for (j = 0; j <
len; j++) {
61 if (c < ' ' || c >
'~')
117 uint64_t v =
lrintf(d * 100);
120 else if (v % (100 * 1000))
133 if (strcmp(
"language", tag->
key))
135 "%s %-16s: %s\n", indent, tag->
key, tag->
value);
147 if (!data || sd->
size < 4)
200 if (gain == INT32_MIN)
221 if (sd->
size <
sizeof(*rg)) {
237 if (sd->
size <
sizeof(*stereo)) {
254 if (sd->
size <
sizeof(*ast)) {
297 if (sd->
size <
sizeof(*cpb)) {
303 "bitrate max/min/avg: %d/%d/%d buffer size: %d vbv_delay: %"PRId64,
359 "unknown side data type %d (%d bytes)", sd.
type, sd.
size);
369 int index,
int is_output)
411 display_aspect_ratio.
num, display_aspect_ratio.
den);
454 const char *url,
int is_output)
462 is_output ?
"Output" :
"Input",
465 is_output ?
"to" :
"from", url);
471 int hours, mins, secs, us;
516 name ? name->
value :
"");
525 if (total < ic->nb_streams)
unsigned int nb_chapters
Number of chapters in AVChapter array.
static void pkt_dump_internal(void *avcl, FILE *f, int level, AVPacket *pkt, int dump_payload, AVRational time_base)
#define AV_LOG_WARNING
Something somehow does not look correct.
int max_bitrate
Maximum bitrate of the stream, in bits per second.
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)
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
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.
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...
int min_bitrate
Minimum bitrate of the stream, in bits per second.
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
unsigned int nb_stream_indexes
const char * av_stereo3d_type_name(unsigned int type)
Provide a human-readable name of a given stereo3d type.
Stereo 3D type: this structure describes how two videos are packed within a single video surface...
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
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.
AVStream ** streams
A list of all streams in the file.
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
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.
int buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
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.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int flags
Additional information about the frame packing.
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 AVMediaType codec_type
General type of the encoded data.
enum AVPacketSideDataType type
static void dump_cpb(void *ctx, AVPacketSideData *sd)
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
AVRational avg_frame_rate
Average framerate.
int flags
A combination of AV_PKT_FLAG values.
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.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
#define HEXDUMP_PRINT(...)
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)
static av_always_inline av_const long int lrintf(float x)
if(ac->has_optimized_func)
int64_t end
chapter start/end time in time_base units
This structure describes the bitrate properties of an encoded bitstream.
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
enum AVStereo3DType type
How views are packed within the video.
#define AV_LOG_INFO
Standard information.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer...
static void dump_replaygain(void *ctx, AVPacketSideData *sd)
main external API structure.
rational number numerator/denominator
static void hex_dump_internal(void *avcl, FILE *f, int level, const uint8_t *buf, int size)
This side data contains an integer value representing the quality factor of the compressed frame...
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. ...
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,.
int avg_bitrate
Average bitrate of the stream, in bits per second.
int codec_info_nb_frames
Number of frames that have been demuxed during av_find_stream_info()
This side data corresponds to the AVCPBProperties struct.
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
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
AVCodecParameters * codecpar
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.
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...
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification).
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.