"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "avprobe.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

avprobe.c  (libav-12):avprobe.c  (libav-12.1)
skipping to change at line 572 skipping to change at line 572
snprintf(buf, buf_size, "%d%s%d", rat->num, sep, rat->den); snprintf(buf, buf_size, "%d%s%d", rat->num, sep, rat->den);
return buf; return buf;
} }
static char *tag_string(char *buf, int buf_size, int tag) static char *tag_string(char *buf, int buf_size, int tag)
{ {
snprintf(buf, buf_size, "0x%04x", tag); snprintf(buf, buf_size, "0x%04x", tag);
return buf; return buf;
} }
static char *unknown_string(char *buf, int buf_size, int val)
{
snprintf(buf, buf_size, "Unknown (%d)", val);
return buf;
}
static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt) static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt)
{ {
char val_str[128]; char val_str[128];
AVStream *st = fmt_ctx->streams[pkt->stream_index]; AVStream *st = fmt_ctx->streams[pkt->stream_index];
probe_object_header("packet"); probe_object_header("packet");
probe_str("codec_type", media_type_string(st->codecpar->codec_type)); probe_str("codec_type", media_type_string(st->codecpar->codec_type));
probe_int("stream_index", pkt->stream_index); probe_int("stream_index", pkt->stream_index);
probe_str("pts", ts_value_string(val_str, sizeof(val_str), pkt->pts)); probe_str("pts", ts_value_string(val_str, sizeof(val_str), pkt->pts));
probe_str("pts_time", time_value_string(val_str, sizeof(val_str), probe_str("pts_time", time_value_string(val_str, sizeof(val_str),
skipping to change at line 623 skipping to change at line 629
{ {
AVFormatContext *fmt_ctx = ifile->fmt_ctx; AVFormatContext *fmt_ctx = ifile->fmt_ctx;
AVStream *stream = ist->st; AVStream *stream = ist->st;
AVCodecParameters *par; AVCodecParameters *par;
AVCodecContext *dec_ctx; AVCodecContext *dec_ctx;
const AVCodecDescriptor *codec_desc; const AVCodecDescriptor *codec_desc;
const char *profile; const char *profile;
char val_str[128]; char val_str[128];
AVRational display_aspect_ratio, *sar = NULL; AVRational display_aspect_ratio, *sar = NULL;
const AVPixFmtDescriptor *desc; const AVPixFmtDescriptor *desc;
const char *val;
probe_object_header("stream"); probe_object_header("stream");
probe_int("index", stream->index); probe_int("index", stream->index);
par = stream->codecpar; par = stream->codecpar;
dec_ctx = ist->dec_ctx; dec_ctx = ist->dec_ctx;
codec_desc = avcodec_descriptor_get(par->codec_id); codec_desc = avcodec_descriptor_get(par->codec_id);
if (codec_desc) { if (codec_desc) {
probe_str("codec_name", codec_desc->name); probe_str("codec_name", codec_desc->name);
skipping to change at line 681 skipping to change at line 688
par->width * sar->num, par->height * sar->den, par->width * sar->num, par->height * sar->den,
1024*1024); 1024*1024);
probe_str("display_aspect_ratio", probe_str("display_aspect_ratio",
rational_string(val_str, sizeof(val_str), ":", rational_string(val_str, sizeof(val_str), ":",
&display_aspect_ratio)); &display_aspect_ratio));
} }
desc = av_pix_fmt_desc_get(par->format); desc = av_pix_fmt_desc_get(par->format);
probe_str("pix_fmt", desc ? desc->name : "unknown"); probe_str("pix_fmt", desc ? desc->name : "unknown");
probe_int("level", par->level); probe_int("level", par->level);
probe_str("color_range", av_color_range_name (par->color_range)); val = av_color_range_name(par->color_range);
probe_str("color_space", av_color_space_name (par->color_space)); if (!val)
probe_str("color_trc", av_color_transfer_name (par->color_trc)); val = unknown_string(val_str, sizeof(val_str), par->color_range);
probe_str("color_pri", av_color_primaries_name(par->color_primaries)); probe_str("color_range", val);
probe_str("chroma_loc", av_chroma_location_name (par->chroma_location));
val = av_color_space_name(par->color_space);
if (!val)
val = unknown_string(val_str, sizeof(val_str), par->color_space);
probe_str("color_space", val);
val = av_color_transfer_name(par->color_trc);
if (!val)
val = unknown_string(val_str, sizeof(val_str), par->color_trc);
probe_str("color_trc", val);
val = av_color_primaries_name(par->color_primaries);
if (!val)
val = unknown_string(val_str, sizeof(val_str), par->color_primaries)
;
probe_str("color_pri", val);
val = av_chroma_location_name(par->chroma_location);
if (!val)
val = unknown_string(val_str, sizeof(val_str), par->chroma_location)
;
probe_str("chroma_loc", val);
break; break;
case AVMEDIA_TYPE_AUDIO: case AVMEDIA_TYPE_AUDIO:
probe_str("sample_rate", probe_str("sample_rate",
value_string(val_str, sizeof(val_str), value_string(val_str, sizeof(val_str),
par->sample_rate, par->sample_rate,
unit_hertz_str)); unit_hertz_str));
probe_int("channels", par->channels); probe_int("channels", par->channels);
probe_int("bits_per_sample", probe_int("bits_per_sample",
av_get_bits_per_sample(par->codec_id)); av_get_bits_per_sample(par->codec_id));
 End of changes. 3 change blocks. 
5 lines changed or deleted 33 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS