diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-11-10 16:05:53 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-11-17 19:47:56 +0100 |
commit | 4cd74c81435919e7ed1a30de5d947d3077ac9299 (patch) | |
tree | 7aabaacb4fe90cef65dec800d7194929907be82b /libavutil/bprint.h | |
parent | f96a653184e63cea91e08ea75ae60d309e431f40 (diff) | |
download | ffmpeg-4cd74c81435919e7ed1a30de5d947d3077ac9299.tar.gz |
lavu/bprint: implement av_bprint_strftime().
Diffstat (limited to 'libavutil/bprint.h')
-rw-r--r-- | libavutil/bprint.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libavutil/bprint.h b/libavutil/bprint.h index c09b61f20f..f3915fe7b1 100644 --- a/libavutil/bprint.h +++ b/libavutil/bprint.h @@ -116,7 +116,7 @@ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max); void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size); /** - * Append a formated string to a print buffer. + * Append a formatted string to a print buffer. */ void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3); @@ -125,6 +125,20 @@ void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3); */ void av_bprint_chars(AVBPrint *buf, char c, unsigned n); +struct tm; +/** + * Append a formatted date and time to a print buffer. + * + * param buf bprint buffer to use + * param fmt date and time format string, see strftime() + * param tm broken-down time structure to translate + * + * @note due to poor design of the standard strftime function, it may + * produce poor results if the format string expands to a very long text and + * the bprint buffer is near the limit stated by the size_max option. + */ +void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm); + /** * Allocate bytes in the buffer for external use. * |