PipeWire  0.3.59
builder.h File Reference
SPA » POD

spa/pod/builder.h More...

Go to the source code of this file.

Data Structures

struct  spa_pod_builder_state
 
struct  spa_pod_builder_callbacks
 
struct  spa_pod_builder
 

Macros

#define SPA_POD_BUILDER_FLAG_BODY   (1<<0)
 
#define SPA_POD_BUILDER_FLAG_FIRST   (1<<1)
 
#define SPA_VERSION_POD_BUILDER_CALLBACKS   0
 
#define SPA_POD_BUILDER_INIT(buffer, size)   ((struct spa_pod_builder){ (buffer), (size), 0, {}, {} })
 
#define SPA_POD_INIT(size, type)   ((struct spa_pod) { (size), (type) })
 
#define SPA_POD_INIT_None()   SPA_POD_INIT(0, SPA_TYPE_None)
 
#define SPA_POD_INIT_Bool(val)   ((struct spa_pod_bool){ { sizeof(uint32_t), SPA_TYPE_Bool }, (val) ? 1 : 0, 0 })
 
#define SPA_POD_INIT_Id(val)   ((struct spa_pod_id){ { sizeof(uint32_t), SPA_TYPE_Id }, (val), 0 })
 
#define SPA_POD_INIT_Int(val)   ((struct spa_pod_int){ { sizeof(int32_t), SPA_TYPE_Int }, (val), 0 })
 
#define SPA_POD_INIT_Long(val)   ((struct spa_pod_long){ { sizeof(int64_t), SPA_TYPE_Long }, (val) })
 
#define SPA_POD_INIT_Float(val)   ((struct spa_pod_float){ { sizeof(float), SPA_TYPE_Float }, (val), 0 })
 
#define SPA_POD_INIT_Double(val)   ((struct spa_pod_double){ { sizeof(double), SPA_TYPE_Double }, (val) })
 
#define SPA_POD_INIT_String(len)   ((struct spa_pod_string){ { (len), SPA_TYPE_String } })
 
#define SPA_POD_INIT_Bytes(len)   ((struct spa_pod_bytes){ { (len), SPA_TYPE_Bytes } })
 
#define SPA_POD_INIT_Pointer(type, value)   ((struct spa_pod_pointer){ { sizeof(struct spa_pod_pointer_body), SPA_TYPE_Pointer }, { (type), 0, (value) } })
 
#define SPA_POD_INIT_Fd(fd)   ((struct spa_pod_fd){ { sizeof(int64_t), SPA_TYPE_Fd }, (fd) })
 
#define SPA_POD_INIT_Rectangle(val)   ((struct spa_pod_rectangle){ { sizeof(struct spa_rectangle), SPA_TYPE_Rectangle }, (val) })
 
#define SPA_POD_INIT_Fraction(val)   ((struct spa_pod_fraction){ { sizeof(struct spa_fraction), SPA_TYPE_Fraction }, (val) })
 
#define SPA_POD_INIT_CHOICE_BODY(type, flags, child_size, child_type)    ((struct spa_pod_choice_body) { (type), (flags), { (child_size), (child_type) }})
 
#define SPA_POD_INIT_Choice(type, ctype, child_type, n_vals, ...)
 
#define SPA_POD_INIT_Struct(size)   ((struct spa_pod_struct){ { (size), SPA_TYPE_Struct } })
 
#define SPA_POD_INIT_Object(size, type, id, ...)   ((struct spa_pod_object){ { (size), SPA_TYPE_Object }, { (type), (id) }, ##__VA_ARGS__ })
 
#define SPA_POD_INIT_Prop(key, flags, size, type)    ((struct spa_pod_prop){ (key), (flags), { (size), (type) } })
 
#define SPA_POD_INIT_Sequence(size, unit)    ((struct spa_pod_sequence){ { (size), SPA_TYPE_Sequence}, {(unit), 0 } })
 
#define SPA_POD_BUILDER_COLLECT(builder, type, args)
 
#define spa_pod_builder_add_object(b, type, id, ...)
 
#define spa_pod_builder_add_struct(b, ...)
 
#define spa_pod_builder_add_sequence(b, unit, ...)
 

Functions

static void spa_pod_builder_get_state (struct spa_pod_builder *builder, struct spa_pod_builder_state *state)
 
static void spa_pod_builder_set_callbacks (struct spa_pod_builder *builder, const struct spa_pod_builder_callbacks *callbacks, void *data)
 
static void spa_pod_builder_reset (struct spa_pod_builder *builder, struct spa_pod_builder_state *state)
 
static void spa_pod_builder_init (struct spa_pod_builder *builder, void *data, uint32_t size)
 
static struct spa_podspa_pod_builder_deref (struct spa_pod_builder *builder, uint32_t offset)
 
static struct spa_podspa_pod_builder_frame (struct spa_pod_builder *builder, struct spa_pod_frame *frame)
 
static void spa_pod_builder_push (struct spa_pod_builder *builder, struct spa_pod_frame *frame, const struct spa_pod *pod, uint32_t offset)
 
static int spa_pod_builder_raw (struct spa_pod_builder *builder, const void *data, uint32_t size)
 
static int spa_pod_builder_pad (struct spa_pod_builder *builder, uint32_t size)
 
static int spa_pod_builder_raw_padded (struct spa_pod_builder *builder, const void *data, uint32_t size)
 
static void * spa_pod_builder_pop (struct spa_pod_builder *builder, struct spa_pod_frame *frame)
 
static int spa_pod_builder_primitive (struct spa_pod_builder *builder, const struct spa_pod *p)
 
static int spa_pod_builder_none (struct spa_pod_builder *builder)
 
static int spa_pod_builder_child (struct spa_pod_builder *builder, uint32_t size, uint32_t type)
 
static int spa_pod_builder_bool (struct spa_pod_builder *builder, bool val)
 
static int spa_pod_builder_id (struct spa_pod_builder *builder, uint32_t val)
 
static int spa_pod_builder_int (struct spa_pod_builder *builder, int32_t val)
 
static int spa_pod_builder_long (struct spa_pod_builder *builder, int64_t val)
 
static int spa_pod_builder_float (struct spa_pod_builder *builder, float val)
 
static int spa_pod_builder_double (struct spa_pod_builder *builder, double val)
 
static int spa_pod_builder_write_string (struct spa_pod_builder *builder, const char *str, uint32_t len)
 
static int spa_pod_builder_string_len (struct spa_pod_builder *builder, const char *str, uint32_t len)
 
static int spa_pod_builder_string (struct spa_pod_builder *builder, const char *str)
 
static int spa_pod_builder_bytes (struct spa_pod_builder *builder, const void *bytes, uint32_t len)
 
static void * spa_pod_builder_reserve_bytes (struct spa_pod_builder *builder, uint32_t len)
 
static int spa_pod_builder_pointer (struct spa_pod_builder *builder, uint32_t type, const void *val)
 
static int spa_pod_builder_fd (struct spa_pod_builder *builder, int64_t fd)
 
static int spa_pod_builder_rectangle (struct spa_pod_builder *builder, uint32_t width, uint32_t height)
 
static int spa_pod_builder_fraction (struct spa_pod_builder *builder, uint32_t num, uint32_t denom)
 
static int spa_pod_builder_push_array (struct spa_pod_builder *builder, struct spa_pod_frame *frame)
 
static int spa_pod_builder_array (struct spa_pod_builder *builder, uint32_t child_size, uint32_t child_type, uint32_t n_elems, const void *elems)
 
static int spa_pod_builder_push_choice (struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t flags)
 
static int spa_pod_builder_push_struct (struct spa_pod_builder *builder, struct spa_pod_frame *frame)
 
static int spa_pod_builder_push_object (struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t id)
 
static int spa_pod_builder_prop (struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
 
static int spa_pod_builder_push_sequence (struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t unit)
 
static uint32_t spa_pod_builder_control (struct spa_pod_builder *builder, uint32_t offset, uint32_t type)
 
static uint32_t spa_choice_from_id (char id)
 
static int spa_pod_builder_addv (struct spa_pod_builder *builder, va_list args)
 
static int spa_pod_builder_add (struct spa_pod_builder *builder,...)
 
static struct spa_podspa_pod_copy (const struct spa_pod *pod)
 Copy a pod structure. More...
 

Detailed Description