PipeWire  0.3.36
builder.h File Reference
Include dependency graph for builder.h:
This graph shows which files directly or indirectly include this file:

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 }, (uint32_t)val, 0 }
 
#define SPA_POD_INIT_Int(val)   (struct spa_pod_int){ { sizeof(int32_t), SPA_TYPE_Int }, (int32_t)val, 0 }
 
#define SPA_POD_INIT_Long(val)   (struct spa_pod_long){ { sizeof(int64_t), SPA_TYPE_Long }, (int64_t)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

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

Macro Definition Documentation

◆ SPA_POD_BUILDER_FLAG_BODY

#define SPA_POD_BUILDER_FLAG_BODY   (1<<0)

◆ SPA_POD_BUILDER_FLAG_FIRST

#define SPA_POD_BUILDER_FLAG_FIRST   (1<<1)

◆ SPA_VERSION_POD_BUILDER_CALLBACKS

#define SPA_VERSION_POD_BUILDER_CALLBACKS   0