diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-03-30 23:30:55 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-03-30 23:30:55 +0000 |
commit | 72415b2adb2c25f95ceede49001bb97ed9247dbb (patch) | |
tree | 99247889aa61bb7621c966466ea4b84c100207d3 /ffprobe.c | |
parent | ca6e7708b42e7d33ba3053bcd447d52a077bca25 (diff) | |
download | ffmpeg-72415b2adb2c25f95ceede49001bb97ed9247dbb.tar.gz |
Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -101,14 +101,14 @@ static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRat return buf; } -static const char *codec_type_string(enum CodecType codec_type) +static const char *media_type_string(enum AVMediaType media_type) { - switch (codec_type) { - case CODEC_TYPE_VIDEO: return "video"; - case CODEC_TYPE_AUDIO: return "audio"; - case CODEC_TYPE_DATA: return "data"; - case CODEC_TYPE_SUBTITLE: return "subtitle"; - case CODEC_TYPE_ATTACHMENT: return "attachment"; + switch (media_type) { + case AVMEDIA_TYPE_VIDEO: return "video"; + case AVMEDIA_TYPE_AUDIO: return "audio"; + case AVMEDIA_TYPE_DATA: return "data"; + case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; + case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; default: return "unknown"; } } @@ -134,7 +134,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) printf("codec_name=unknown\n"); } - printf("codec_type=%s\n", codec_type_string(dec_ctx->codec_type)); + printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type)); printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den); /* print AVI/FourCC tag */ @@ -150,7 +150,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag); switch (dec_ctx->codec_type) { - case CODEC_TYPE_VIDEO: + case AVMEDIA_TYPE_VIDEO: printf("width=%d\n", dec_ctx->width); printf("height=%d\n", dec_ctx->height); printf("has_b_frames=%d\n", dec_ctx->has_b_frames); @@ -162,7 +162,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); break; - case CODEC_TYPE_AUDIO: + case AVMEDIA_TYPE_AUDIO: printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str), dec_ctx->sample_rate, unit_hertz_str)); |