21 #ifndef AVUTIL_BPRINT_H
22 #define AVUTIL_BPRINT_H
34 #define FF_PAD_STRUCTURE(name, size, ...) \
35 struct ff_pad_helper_##name { __VA_ARGS__ }; \
36 typedef struct name { \
38 char reserved_padding[size - sizeof(struct ff_pad_helper_##name)]; \
87 char reserved_internal_buffer[1];
95 #define AV_BPRINT_SIZE_AUTOMATIC 1
96 #define AV_BPRINT_SIZE_COUNT_ONLY 0
132 void av_vbprintf(AVBPrint *buf, const
char *fmt, va_list vl_arg);
172 unsigned char **
mem,
unsigned *actual_size);
187 return buf->len < buf->size;
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
ptrdiff_t const GLvoid * data
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size)
Append data to a print buffer.
void void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg)
Append a formatted string to a print buffer.
Macro definitions for various function/variable attributes.
void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size)
Init a print buffer using a pre-existing buffer.
void av_bprint_get_buffer(AVBPrint *buf, unsigned size, unsigned char **mem, unsigned *actual_size)
Allocate bytes in the buffer for external use.
#define AV_BPRINT_SIZE_UNLIMITED
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define av_printf_format(fmtpos, attrpos)
void av_bprintf(AVBPrint *buf, const char *fmt,...) av_printf_format(2
Append a formatted string to a print buffer.
void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm)
Append a formatted date and time to a print buffer.
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
static const char * ret_str(int v)
#define FF_PAD_STRUCTURE(name, size,...)
Define a structure with extra padding to a fixed size This helps ensuring binary compatibility with f...
void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, enum AVEscapeMode mode, int flags)
Escape the content in src and append it to dstbuf.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
unsigned unsigned size_max