21#ifndef AVUTIL_BPRINT_H
22#define AVUTIL_BPRINT_H
34#define FF_PAD_STRUCTURE(name, size, ...) \
35struct ff_pad_helper_##name { __VA_ARGS__ }; \
36typedef 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
172 unsigned char **mem,
unsigned *actual_size);
187 return buf->len < buf->size;
Macro definitions for various function/variable attributes.
#define av_printf_format(fmtpos, attrpos)
#define AV_BPRINT_SIZE_UNLIMITED
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
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.
void av_bprint_get_buffer(AVBPrint *buf, unsigned size, unsigned char **mem, unsigned *actual_size)
Allocate bytes in the buffer for external use.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize 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.
#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_append_data(AVBPrint *buf, const char *data, unsigned size)
Append data to a print buffer.
void av_bprintf(AVBPrint *buf, const char *fmt,...) av_printf_format(2
Append a formatted string to a print buffer.
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
unsigned unsigned size_max
void void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg)
Append a formatted string to a print buffer.
void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size)
Init a print buffer using a pre-existing buffer.