libgpac
Documentation of the core library of GPAC
|
Data Structures | |
struct | DynBuf |
Macros | |
#define | likely(x) __builtin_expect(!!(x), 1) |
#define | unlikely(x) __builtin_expect(!!(x), 0) |
#define | force_inline inline __attribute__((always_inline)) |
#define | no_inline __attribute__((noinline)) |
#define | __maybe_unused __attribute__((unused)) |
#define | xglue(x, y) x ## y |
#define | glue(x, y) xglue(x, y) |
#define | stringify(s) tostring(s) |
#define | tostring(s) #s |
#define | offsetof(type, field) ((size_t) &((type *)0)->field) |
#define | countof(x) (sizeof(x) / sizeof((x)[0])) |
#define | UTF8_CHAR_LEN_MAX 6 |
Typedefs | |
typedef int | BOOL |
typedef void * | DynBufReallocFunc(void *opaque, void *ptr, size_t size) |
Enumerations | |
enum | { FALSE = 0 , TRUE = 1 } |
Functions | |
void | pstrcpy (char *buf, int buf_size, const char *str) |
char * | pstrcat (char *buf, int buf_size, const char *s) |
int | strstart (const char *str, const char *val, const char **ptr) |
int | has_suffix (const char *str, const char *suffix) |
static int | max_int (int a, int b) |
static int | min_int (int a, int b) |
static uint32_t | max_uint32 (uint32_t a, uint32_t b) |
static uint32_t | min_uint32 (uint32_t a, uint32_t b) |
static int64_t | max_int64 (int64_t a, int64_t b) |
static int64_t | min_int64 (int64_t a, int64_t b) |
static int | clz32 (unsigned int a) |
static int | clz64 (uint64_t a) |
static int | ctz32 (unsigned int a) |
static int | ctz64 (uint64_t a) |
struct | __attribute__ ((packed)) packed_u64 |
static uint64_t | get_u64 (const uint8_t *tab) |
static int64_t | get_i64 (const uint8_t *tab) |
static void | put_u64 (uint8_t *tab, uint64_t val) |
static uint32_t | get_u32 (const uint8_t *tab) |
static int32_t | get_i32 (const uint8_t *tab) |
static void | put_u32 (uint8_t *tab, uint32_t val) |
static uint32_t | get_u16 (const uint8_t *tab) |
static int32_t | get_i16 (const uint8_t *tab) |
static void | put_u16 (uint8_t *tab, uint16_t val) |
static uint32_t | get_u8 (const uint8_t *tab) |
static int32_t | get_i8 (const uint8_t *tab) |
static void | put_u8 (uint8_t *tab, uint8_t val) |
static uint16_t | bswap16 (uint16_t x) |
static uint32_t | bswap32 (uint32_t v) |
static uint64_t | bswap64 (uint64_t v) |
void | dbuf_init (DynBuf *s) |
void | dbuf_init2 (DynBuf *s, void *opaque, DynBufReallocFunc *realloc_func) |
int | dbuf_realloc (DynBuf *s, size_t new_size) |
int | dbuf_write (DynBuf *s, size_t offset, const uint8_t *data, size_t len) |
int | dbuf_put (DynBuf *s, const uint8_t *data, size_t len) |
int | dbuf_put_self (DynBuf *s, size_t offset, size_t len) |
int | dbuf_putc (DynBuf *s, uint8_t c) |
int | dbuf_putstr (DynBuf *s, const char *str) |
static int | dbuf_put_u16 (DynBuf *s, uint16_t val) |
static int | dbuf_put_u32 (DynBuf *s, uint32_t val) |
static int | dbuf_put_u64 (DynBuf *s, uint64_t val) |
int | __attribute__ ((format(printf, 2, 3))) dbuf_printf(DynBuf *s |
int const char void | dbuf_free (DynBuf *s) |
static BOOL | dbuf_error (DynBuf *s) |
static void | dbuf_set_error (DynBuf *s) |
int | unicode_to_utf8 (uint8_t *buf, unsigned int c) |
int | unicode_from_utf8 (const uint8_t *p, int max_len, const uint8_t **pp) |
static int | from_hex (int c) |
void | rqsort (void *base, size_t nmemb, size_t size, int(*cmp)(const void *, const void *, void *), void *arg) |
Variables | |
int const char * | fmt |
struct DynBuf |
Data Fields | ||
---|---|---|
uint8_t * | buf | |
size_t | size | |
size_t | allocated_size | |
BOOL | error | |
DynBufReallocFunc * | realloc_func | |
void * | opaque |
#define likely | ( | x | ) | __builtin_expect(!!(x), 1) |
#define unlikely | ( | x | ) | __builtin_expect(!!(x), 0) |
#define force_inline inline __attribute__((always_inline)) |
#define no_inline __attribute__((noinline)) |
#define __maybe_unused __attribute__((unused)) |
#define xglue | ( | x, | |
y | |||
) | x ## y |
#define glue | ( | x, | |
y | |||
) | xglue(x, y) |
#define stringify | ( | s | ) | tostring(s) |
#define tostring | ( | s | ) | #s |
#define offsetof | ( | type, | |
field | |||
) | ((size_t) &((type *)0)->field) |
#define countof | ( | x | ) | (sizeof(x) / sizeof((x)[0])) |
#define UTF8_CHAR_LEN_MAX 6 |
typedef int BOOL |
typedef void* DynBufReallocFunc(void *opaque, void *ptr, size_t size) |
void pstrcpy | ( | char * | buf, |
int | buf_size, | ||
const char * | str | ||
) |
char* pstrcat | ( | char * | buf, |
int | buf_size, | ||
const char * | s | ||
) |
int strstart | ( | const char * | str, |
const char * | val, | ||
const char ** | ptr | ||
) |
int has_suffix | ( | const char * | str, |
const char * | suffix | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
struct __attribute__ | ( | (packed) | ) |
void dbuf_init | ( | DynBuf * | s | ) |
void dbuf_init2 | ( | DynBuf * | s, |
void * | opaque, | ||
DynBufReallocFunc * | realloc_func | ||
) |
int dbuf_realloc | ( | DynBuf * | s, |
size_t | new_size | ||
) |
int dbuf_put_self | ( | DynBuf * | s, |
size_t | offset, | ||
size_t | len | ||
) |
int dbuf_putstr | ( | DynBuf * | s, |
const char * | str | ||
) |
int __attribute__ | ( | (format(printf, 2, 3)) | ) |
int const char void dbuf_free | ( | DynBuf * | s | ) |
|
static |
int unicode_to_utf8 | ( | uint8_t * | buf, |
unsigned int | c | ||
) |
|
static |
void rqsort | ( | void * | base, |
size_t | nmemb, | ||
size_t | size, | ||
int(*)(const void *, const void *, void *) | cmp, | ||
void * | arg | ||
) |