Revision 72415b2a ffprobe.c

View differences:

ffprobe.c
101 101
    return buf;
102 102
}
103 103

  
104
static const char *codec_type_string(enum CodecType codec_type)
104
static const char *media_type_string(enum AVMediaType media_type)
105 105
{
106
    switch (codec_type) {
107
    case CODEC_TYPE_VIDEO:        return "video";
108
    case CODEC_TYPE_AUDIO:        return "audio";
109
    case CODEC_TYPE_DATA:         return "data";
110
    case CODEC_TYPE_SUBTITLE:     return "subtitle";
111
    case CODEC_TYPE_ATTACHMENT:   return "attachment";
106
    switch (media_type) {
107
    case AVMEDIA_TYPE_VIDEO:      return "video";
108
    case AVMEDIA_TYPE_AUDIO:      return "audio";
109
    case AVMEDIA_TYPE_DATA:       return "data";
110
    case AVMEDIA_TYPE_SUBTITLE:   return "subtitle";
111
    case AVMEDIA_TYPE_ATTACHMENT: return "attachment";
112 112
    default:                      return "unknown";
113 113
    }
114 114
}
......
134 134
            printf("codec_name=unknown\n");
135 135
        }
136 136

  
137
        printf("codec_type=%s\n",         codec_type_string(dec_ctx->codec_type));
137
        printf("codec_type=%s\n",         media_type_string(dec_ctx->codec_type));
138 138
        printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den);
139 139

  
140 140
        /* print AVI/FourCC tag */
......
150 150
        printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag);
151 151

  
152 152
        switch (dec_ctx->codec_type) {
153
        case CODEC_TYPE_VIDEO:
153
        case AVMEDIA_TYPE_VIDEO:
154 154
            printf("width=%d\n",                   dec_ctx->width);
155 155
            printf("height=%d\n",                  dec_ctx->height);
156 156
            printf("has_b_frames=%d\n",            dec_ctx->has_b_frames);
......
162 162
                   av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
163 163
            break;
164 164

  
165
        case CODEC_TYPE_AUDIO:
165
        case AVMEDIA_TYPE_AUDIO:
166 166
            printf("sample_rate=%s\n",             value_string(val_str, sizeof(val_str),
167 167
                                                                dec_ctx->sample_rate,
168 168
                                                                unit_hertz_str));

Also available in: Unified diff