Mercurial > libavcodec.hg
comparison utils.c @ 2884:a332778dfa06 libavcodec
print more time_base fps stuff if av_log level is at debug or above
print more likely correct fps
not sure if this is formated optimally ...
author | michael |
---|---|
date | Sun, 18 Sep 2005 14:45:17 +0000 |
parents | c2cb03ea51ac |
children | 8c9eee3fb35d |
comparison
equal
deleted
inserted
replaced
2883:a95e55679dfa | 2884:a332778dfa06 |
---|---|
1070 ", %s", | 1070 ", %s", |
1071 avcodec_get_pix_fmt_name(enc->pix_fmt)); | 1071 avcodec_get_pix_fmt_name(enc->pix_fmt)); |
1072 } | 1072 } |
1073 if (enc->width) { | 1073 if (enc->width) { |
1074 snprintf(buf + strlen(buf), buf_size - strlen(buf), | 1074 snprintf(buf + strlen(buf), buf_size - strlen(buf), |
1075 ", %dx%d, %0.2f fps", | 1075 ", %dx%d", |
1076 enc->width, enc->height, | 1076 enc->width, enc->height); |
1077 1/av_q2d(enc->time_base)); | 1077 if(av_log_get_level() >= AV_LOG_DEBUG){ |
1078 int g= ff_gcd(enc->time_base.num, enc->time_base.den); | |
1079 snprintf(buf + strlen(buf), buf_size - strlen(buf), | |
1080 ", %d/%d", | |
1081 enc->time_base.num/g, enc->time_base.den/g); | |
1082 } | |
1078 } | 1083 } |
1079 if (encode) { | 1084 if (encode) { |
1080 snprintf(buf + strlen(buf), buf_size - strlen(buf), | 1085 snprintf(buf + strlen(buf), buf_size - strlen(buf), |
1081 ", q=%d-%d", enc->qmin, enc->qmax); | 1086 ", q=%d-%d", enc->qmin, enc->qmax); |
1082 } | 1087 } |