Loading...
Searching...
No Matches
bprint.h File Reference
libavutil » Data Structures » AVBPrint

AVBPrint public header. More...

`#include <stdarg.h>`
`#include "attributes.h"`
`#include "avstring.h"`

Go to the source code of this file.

## Data Structures

struct | AVBPrint
| Buffer to print data progressively. More...

## Macros

#define | FF_PAD_STRUCTURE(name, size, ...)
| Define a structure with extra padding to a fixed size This helps ensuring binary compatibility with future versions.
Max size special values
Convenience macros for special values for av_bprint_init() size_max parameter.
#define | AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1)
| Buffer will be reallocated as necessary, with an amortized linear cost.
#define | AV_BPRINT_SIZE_AUTOMATIC 1
| Use the exact size available in the AVBPrint structure itself.
#define | AV_BPRINT_SIZE_COUNT_ONLY 0
| Do not write anything to the buffer, only calculate the total length.

## Functions

void | av_bprint_init (AVBPrint *buf, unsigned size_init, unsigned size_max)
| Init a print buffer.
void | av_bprint_init_for_buffer (AVBPrint *buf, char *buffer, unsigned size)
| Init a print buffer using a pre-existing buffer.
void | av_bprintf (AVBPrint *buf, const char *fmt,...) av_printf_format(2
| Append a formatted string 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.
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 | av_bprint_strftime (AVBPrint *buf, const char *fmt, const struct tm *tm)
| Append a formatted date and time to a print buffer.
void | av_bprint_get_buffer (AVBPrint *buf, unsigned size, unsigned char **mem, unsigned *actual_size)
| Allocate bytes in the buffer for external use.
void | av_bprint_clear (AVBPrint *buf)
| Reset the string to "" but keep internal allocated data.
static int | av_bprint_is_complete (const AVBPrint *buf)
| Test if the print buffer is complete (not truncated).
int | av_bprint_finalize (AVBPrint *buf, char **ret_str)
| Finalize a print buffer.
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.

## Detailed Description

AVBPrint public header.

Definition in file bprint.h.