From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavutil/bprint.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'ffmpeg/libavutil/bprint.h') diff --git a/ffmpeg/libavutil/bprint.h b/ffmpeg/libavutil/bprint.h index df78916..839ec1e 100644 --- a/ffmpeg/libavutil/bprint.h +++ b/ffmpeg/libavutil/bprint.h @@ -21,6 +21,8 @@ #ifndef AVUTIL_BPRINT_H #define AVUTIL_BPRINT_H +#include + #include "attributes.h" #include "avstring.h" @@ -74,10 +76,10 @@ */ typedef struct AVBPrint { FF_PAD_STRUCTURE(1024, - char *str; /** string so far */ - unsigned len; /** length so far */ - unsigned size; /** allocated memory */ - unsigned size_max; /** maximum allocated memory */ + char *str; /**< string so far */ + unsigned len; /**< length so far */ + unsigned size; /**< allocated memory */ + unsigned size_max; /**< maximum allocated memory */ char reserved_internal_buffer[1]; ) } AVBPrint; @@ -121,11 +123,25 @@ void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size); */ void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3); +/** + * Append a formatted string to a print buffer. + */ +void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg); + /** * Append char c n times to a print buffer. */ void av_bprint_chars(AVBPrint *buf, char c, unsigned n); +/** + * Append data to a print buffer. + * + * param buf bprint buffer to use + * param data pointer to data + * param size size of data + */ +void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size); + struct tm; /** * Append a formatted date and time to a print buffer. -- cgit v1.2.3