[FFmpeg-devel] [RFC] lavu PTS printing utils
Stefano Sabatini
stefasab at gmail.com
Sun Jan 15 16:07:27 CET 2012
Hi,
I'm thinking to implement some convenience utils:
static inline size_t av_get_ts_string(char *buf, size_t buf_size, int64_t ts)
{
return ts == (AV_NOPTS_VALUE) ? snprintf(buf, buf_size, "NOPTS") :
snprintf(buf, buf_size, "%"PRId64"", ts);
}
static inline size_t av_get_ts_time_string(char *buf, size_t buf_size, int64_t ts, AVRational *tb)
{
return ts == (AV_NOPTS_VALUE) ? snprintf(buf, buf_size, "NOPTS") :
snprintf(buf, buf_size, "%f", avq2d(tb) * ts;
}
since it seems I need to use them again and again (debugging timestamp
issues in various components).
Do you think this would be a good idea? If yes, where should I put them
(libavutil/printutils.h may be an option)?
--
FFmpeg = Forgiving Free Mastering Philosofic Everlasting Guide
More information about the ffmpeg-devel
mailing list