Spa Pod (Plain Old Data)¶
digraph inheritance { rankdir=LR; GBoxed -> WpSpaPod; GBoxed -> WpSpaPodBuilder; GBoxed -> WpSpaPodParser; }-
struct
WpSpaPod
¶
-
struct
WpSpaPodBuilder
¶
-
struct
WpSpaPodParser
¶
-
WpSpaPod *
wp_spa_pod_ref
(WpSpaPod *self)¶ Increases the reference count of a spa pod object.
- Return
(transfer full): self with an additional reference count on it
- Parameters
self
: a spa pod object
-
void
wp_spa_pod_unref
(WpSpaPod *self)¶ Decreases the reference count on self and frees it when the ref count reaches zero.
- Parameters
self
: (transfer full): a spa pod object
-
WpSpaPod *
wp_spa_pod_new_wrap
(struct spa_pod *pod)¶ Constructs a new WpSpaPod that wraps the given
spa_pod
.- Return
a new WpSpaPod that references the data in pod. pod is not copied, so it needs to stay alive. The returned WpSpaPod can be modified by using the setter functions, in which case pod will be modified underneath.
- Parameters
pod
: a spa_pod
-
WpSpaPod *
wp_spa_pod_new_wrap_const
(const struct spa_pod *pod)¶ Constructs a new immutable WpSpaPod that wraps the given
spa_pod
.- Return
a new WpSpaPod that references the data in pod. pod is not copied, so it needs to stay alive. The returned WpSpaPod cannot be modified, unless it’s copied first.
- Parameters
pod
: a constant spa_pod
-
const struct spa_pod *
wp_spa_pod_get_spa_pod
(const WpSpaPod *self)¶ Converts a WpSpaPod pointer to a
struct spa_pod
one, for use with native pipewire & spa functions. The returned pointer is owned by WpSpaPod and may not be modified or freed.- Return
a const pointer to the underlying spa_pod structure
- Parameters
self
: a spa pod object
-
WpSpaType
wp_spa_pod_get_spa_type
(WpSpaPod *self)¶ Gets the SPA type of the spa pod.
If the pod is an object or pointer, this will return the derived object/pointer type directly. If the pod is an object property or a control, this will return the type of the contained value.
- Return
(transfer none): the type of the spa pod
- Parameters
self
: a spa pod
-
WpSpaIdValue
wp_spa_pod_get_choice_type
(WpSpaPod *self)¶ If the pod is a Choice, this gets the choice type (Range, Step, Enum, …)
- Return
the choice type of the choice pod
- Parameters
self
: a choice pod
-
WpSpaPod *
wp_spa_pod_copy
(WpSpaPod *other)¶ Copies a spa pod object.
- Return
(transfer full): The newly copied spa pod
- Parameters
other
: a spa pod object
-
gboolean
wp_spa_pod_is_unique_owner
(WpSpaPod *self)¶ Checks if the pod is the unique owner of its data or not.
- Return
TRUE if the pod owns the data, FALSE otherwise.
- Parameters
self
: a spa pod object
-
WpSpaPod *
wp_spa_pod_ensure_unique_owner
(WpSpaPod *self)¶ If self is not uniquely owned already, then it is unrefed and a copy of it is returned instead. You should always consider self as unsafe to use after this call and you should use the returned object instead.
- Return
(transfer full): the uniquely owned spa pod object which may or may not be the same as self.
- Parameters
self
: (transfer full): a spa pod object
-
WpSpaPod *
wp_spa_pod_new_none
(void)¶ Creates a spa pod of type None.
- Return
(transfer full): The new spa pod
-
WpSpaPod *
wp_spa_pod_new_boolean
(gboolean value)¶ Creates a spa pod of type boolean.
- Return
(transfer full): The new spa pod
- Parameters
value
: the boolean value
-
WpSpaPod *
wp_spa_pod_new_id
(guint32 value)¶ Creates a spa pod of type Id.
- Return
(transfer full): The new spa pod
- Parameters
value
: the Id value
-
WpSpaPod *
wp_spa_pod_new_int
(gint32 value)¶ Creates a spa pod of type int.
- Return
(transfer full): The new spa pod
- Parameters
value
: the int value
-
WpSpaPod *
wp_spa_pod_new_long
(gint64 value)¶ Creates a spa pod of type long.
- Return
(transfer full): The new spa pod
- Parameters
value
: the long value
-
WpSpaPod *
wp_spa_pod_new_float
(float value)¶ Creates a spa pod of type float.
- Return
(transfer full): The new spa pod
- Parameters
value
: the float value
-
WpSpaPod *
wp_spa_pod_new_double
(double value)¶ Creates a spa pod of type double.
- Return
(transfer full): The new spa pod
- Parameters
value
: the double value
-
WpSpaPod *
wp_spa_pod_new_string
(const char *value)¶ Creates a spa pod of type string.
- Return
(transfer full): The new spa pod
- Parameters
value
: the string value
-
WpSpaPod *
wp_spa_pod_new_bytes
(gconstpointer value, guint32 len)¶ Creates a spa pod of type bytes.
- Return
(transfer full): The new spa pod
- Parameters
value
: the bytes valuelen
: the length of the bytes value
-
WpSpaPod *
wp_spa_pod_new_pointer
(const char *type_name, gconstpointer value)¶ Creates a spa pod of type pointer.
- Return
(transfer full): The new spa pod
- Parameters
type_name
: the name of the type of the pointervalue
: the pointer value
-
WpSpaPod *
wp_spa_pod_new_fd
(gint64 value)¶ Creates a spa pod of type Fd.
- Return
(transfer full): The new spa pod
- Parameters
value
: the Fd value
-
WpSpaPod *
wp_spa_pod_new_rectangle
(guint32 width, guint32 height)¶ Creates a spa pod of type rectangle.
- Return
(transfer full): The new spa pod
- Parameters
width
: the width value of the rectangleheight
: the height value of the rectangle
-
WpSpaPod *
wp_spa_pod_new_fraction
(guint32 num, guint32 denom)¶ Creates a spa pod of type fraction.
- Return
(transfer full): The new spa pod
- Parameters
num
: the numerator value of the fractiondenom
: the denominator value of the fraction
-
WpSpaPod *
wp_spa_pod_new_choice
(const char *choice_type, ...)¶ Creates a spa pod of type choice.
- Return
(transfer full): The new spa pod
- Parameters
choice_type
: the name of the choice type (“Range”, “Step”, …),...
: a list of choice values, followed by NULL
-
WpSpaPod *
wp_spa_pod_new_choice_valist
(const char *choice_type, va_list args)¶ This is the
va_list
version of wp_spa_pod_new_choice()- Return
(transfer full): The new spa pod
- Parameters
choice_type
: the name of the choice type (“Range”, “Step”, …)args
: the variable arguments passed to wp_spa_pod_new_choice()
-
WpSpaPod *
wp_spa_pod_new_object
(const char *type_name, const char *id_name, ...)¶ Creates a spa pod of type object.
- Return
(transfer full): The new spa pod
- Parameters
type_name
: the type name of the object typeid_name
: the id name of the object,...
: a list of object properties with their values, followed by NULL
-
WpSpaPod *
wp_spa_pod_new_object_valist
(const char *type_name, const char *id_name, va_list args)¶ This is the
va_list
version of wp_spa_pod_new_object()- Return
(transfer full): The new spa pod
- Parameters
type_name
: the type name of the object typeid_name
: the id name of the objectargs
: the variable arguments passed to wp_spa_pod_new_object()
-
WpSpaPod *
wp_spa_pod_new_sequence
(guint unit, ...)¶ Creates a spa pod of type sequence.
- Return
(transfer full): The new spa pod
- Parameters
unit
: the unit of the sequence...
: a list of sequence controls with their values, followed by NULL
-
WpSpaPod *
wp_spa_pod_new_sequence_valist
(guint unit, va_list args)¶ This is the
va_list
version of wp_spa_pod_new_sequence()- Return
(transfer full): The new spa pod
- Parameters
unit
: the unit of the sequenceargs
: the variable arguments passed to wp_spa_pod_new_sequence()
-
gboolean
wp_spa_pod_is_none
(WpSpaPod *self)¶ Checks wether the spa pod is of type none or not.
- Return
TRUE if it is of type none, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_boolean
(WpSpaPod *self)¶ Checks wether the spa pod is of type boolean or not.
- Return
TRUE if it is of type boolean, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_id
(WpSpaPod *self)¶ Checks wether the spa pod is of type Id or not.
- Return
TRUE if it is of type Id, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_int
(WpSpaPod *self)¶ Checks wether the spa pod is of type int or not.
- Return
TRUE if it is of type int, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_long
(WpSpaPod *self)¶ Checks wether the spa pod is of type long or not.
- Return
TRUE if it is of type long, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_float
(WpSpaPod *self)¶ Checks wether the spa pod is of type float or not.
- Return
TRUE if it is of type float, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_double
(WpSpaPod *self)¶ Checks wether the spa pod is of type double or not.
- Return
TRUE if it is of type double, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_string
(WpSpaPod *self)¶ Checks wether the spa pod is of type string or not.
- Return
TRUE if it is of type string, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_bytes
(WpSpaPod *self)¶ Checks wether the spa pod is of type bytes or not.
- Return
TRUE if it is of type bytes, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_pointer
(WpSpaPod *self)¶ Checks wether the spa pod is of type pointer or not.
- Return
TRUE if it is of type pointer, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_fd
(WpSpaPod *self)¶ Checks wether the spa pod is of type Fd or not.
- Return
TRUE if it is of type Fd, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_rectangle
(WpSpaPod *self)¶ Checks wether the spa pod is of type rectangle or not.
- Return
TRUE if it is of type rectangle, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_fraction
(WpSpaPod *self)¶ Checks wether the spa pod is of type fraction or not.
- Return
TRUE if it is of type fraction, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_array
(WpSpaPod *self)¶ Checks wether the spa pod is of type array or not.
- Return
TRUE if it is of type array, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_choice
(WpSpaPod *self)¶ Checks wether the spa pod is of type choice or not.
- Return
TRUE if it is of type choice, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_object
(WpSpaPod *self)¶ Checks wether the spa pod is of type object or not.
- Return
TRUE if it is of type object, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_struct
(WpSpaPod *self)¶ Checks wether the spa pod is of type struct or not.
- Return
TRUE if it is of type struct, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_sequence
(WpSpaPod *self)¶ Checks wether the spa pod is of type sequence or not.
- Return
TRUE if it is of type sequence, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_property
(WpSpaPod *self)¶ Checks wether the spa pod is of type property or not.
- Return
TRUE if it is of type property, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_is_control
(WpSpaPod *self)¶ Checks wether the spa pod is of type control or not.
- Return
TRUE if it is of type control, FALSE otherwise
- Parameters
self
: the spa pod object
-
gboolean
wp_spa_pod_get_boolean
(WpSpaPod *self, gboolean *value)¶ Gets the boolean value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the boolean value
-
gboolean
wp_spa_pod_get_id
(WpSpaPod *self, guint32 *value)¶ Gets the Id value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the Id value
-
gboolean
wp_spa_pod_get_int
(WpSpaPod *self, gint32 *value)¶ Gets the int value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the int value
-
gboolean
wp_spa_pod_get_long
(WpSpaPod *self, gint64 *value)¶ Gets the long value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the long value
-
gboolean
wp_spa_pod_get_float
(WpSpaPod *self, float *value)¶ Gets the float value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the float value
-
gboolean
wp_spa_pod_get_double
(WpSpaPod *self, double *value)¶ Gets the double value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the double value
-
gboolean
wp_spa_pod_get_string
(WpSpaPod *self, const char **value)¶ Gets the string value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the string value
-
gboolean
wp_spa_pod_get_bytes
(WpSpaPod *self, gconstpointer *value, guint32 *len)¶ Gets the bytes value and its len of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the bytes valuelen
: (out): the length of the bytes value
-
gboolean
wp_spa_pod_get_pointer
(WpSpaPod *self, gconstpointer *value)¶ Gets the pointer value and its type name of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the pointer value
-
gboolean
wp_spa_pod_get_fd
(WpSpaPod *self, gint64 *value)¶ Gets the Fd value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectvalue
: (out): the Fd value
-
gboolean
wp_spa_pod_get_rectangle
(WpSpaPod *self, guint32 *width, guint32 *height)¶ Gets the rectangle’s width and height value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectwidth
: (out): the rectangle’s width valueheight
: (out): the rectangle’s height value
-
gboolean
wp_spa_pod_get_fraction
(WpSpaPod *self, guint32 *num, guint32 *denom)¶ Gets the fractions’s numerator and denominator value of a spa pod object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectnum
: (out): the fractions’s numerator valuedenom
: (out): the fractions’s denominator value
-
gboolean
wp_spa_pod_set_boolean
(WpSpaPod *self, gboolean value)¶ Sets a boolean value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the boolean value
-
gboolean
wp_spa_pod_set_id
(WpSpaPod *self, guint32 value)¶ Sets an Id value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the Id value
-
gboolean
wp_spa_pod_set_int
(WpSpaPod *self, gint32 value)¶ Sets an int value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the int value
-
gboolean
wp_spa_pod_set_long
(WpSpaPod *self, gint64 value)¶ Sets a long value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the long value
-
gboolean
wp_spa_pod_set_float
(WpSpaPod *self, float value)¶ Sets a float value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the float value
-
gboolean
wp_spa_pod_set_double
(WpSpaPod *self, double value)¶ Sets a double value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the double value
-
gboolean
wp_spa_pod_set_pointer
(WpSpaPod *self, const char *type_name, gconstpointer value)¶ Sets a pointer value with its type name in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objecttype_name
: the name of the type of the pointervalue
: the pointer value
-
gboolean
wp_spa_pod_set_fd
(WpSpaPod *self, gint64 value)¶ Sets a Fd value in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectvalue
: the Fd value
-
gboolean
wp_spa_pod_set_rectangle
(WpSpaPod *self, guint32 width, guint32 height)¶ Sets the width and height values of a rectangle in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectwidth
: the width value of the rectangleheight
: the height value of the rectangle
-
gboolean
wp_spa_pod_set_fraction
(WpSpaPod *self, guint32 num, guint32 denom)¶ Sets the numerator and denominator values of a fraction in the spa pod object.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectnum
: the numerator value of the farctiondenom
: the denominator value of the fraction
-
gboolean
wp_spa_pod_set_pod
(WpSpaPod *self, WpSpaPod *pod)¶ Sets the value of a spa pod object in the current spa pod object. The spa pod objects must be of the same value.
- Return
TRUE if the value could be set, FALSE othewrise.
- Parameters
self
: the spa pod objectpod
: the pod with the value to be set
-
gboolean
wp_spa_pod_equal
(WpSpaPod *self, WpSpaPod *pod)¶ Checks whether two spa pod objects have the same value or not.
- Return
TRUE if both spa pod objects have the same values, FALSE othewrise.
- Parameters
self
: the spa pod objectpod
: the pod with the value to be compared with
-
gboolean
wp_spa_pod_get_object
(WpSpaPod *self, const char **id_name, ...)¶ Gets the object properties values of a spa pod object.
- Return
TRUE if the object properties values were obtained, FALSE otherwise
- Parameters
self
: the spa pod objectid_name
: (out): the id name of the object,...
: (out): the list of the object properties values, followed by NULL
-
gboolean
wp_spa_pod_get_object_valist
(WpSpaPod *self, const char **id_name, va_list args)¶ This is the
va_list
version of wp_spa_pod_get_object()- Return
TRUE if the object properties values were obtained, FALSE otherwise
- Parameters
self
: the spa pod objectid_name
: (out): the id name of the objectargs
: (out): the variable arguments passed to wp_spa_pod_get_object()
-
gboolean
wp_spa_pod_get_struct
(WpSpaPod *self, ...)¶ Gets the struct’s values of a spa pod object.
- Return
TRUE if the struct values were obtained, FALSE otherwise
- Parameters
self
: the spa pod object...
: (out): the list of the struct values, followed by NULL
-
gboolean
wp_spa_pod_get_struct_valist
(WpSpaPod *self, va_list args)¶ This is the
va_list
version of wp_spa_pod_get_struct()- Return
TRUE if the struct values were obtained, FALSE otherwise
- Parameters
self
: the spa pod objectargs
: (out): the variable arguments passed to wp_spa_pod_get_struct()
-
gboolean
wp_spa_pod_get_property
(WpSpaPod *self, const char **key, WpSpaPod **value)¶ Gets the name, flags and spa pod value of a spa pod property.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectkey
: (out) (optional): the name of the propertyvalue
: (out) (optional): the spa pod value of the property
-
gboolean
wp_spa_pod_get_control
(WpSpaPod *self, guint32 *offset, const char **ctl_type, WpSpaPod **value)¶ Gets the offset, type name and spa pod value of a spa pod control.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod objectoffset
: (out) (optional): the offset of the controlctl_type
: (out) (optional): the control type (Properties, Midi, …)value
: (out) (optional): the spa pod value of the control
-
WpSpaPod *
wp_spa_pod_get_choice_child
(WpSpaPod *self)¶ Gets the child of a spa pod choice object.
- Return
(transfer full): the child of the spa pod choice object
- Parameters
self
: a spa pod choice object
-
WpSpaPod *
wp_spa_pod_get_array_child
(WpSpaPod *self)¶ Gets the child of a spa pod array object.
- Return
(transfer full): the child of the spa pod array object
- Parameters
self
: a spa pod choice object
-
gboolean
wp_spa_pod_fixate
(WpSpaPod *self)¶ Fixates choices in an object pod so that they only have one value.
- Return
TRUE if the pod was an object and it went through the fixation procedure, FALSE otherwise
- Parameters
self
: a spa pod
-
WpSpaPodBuilder *
wp_spa_pod_builder_ref
(WpSpaPodBuilder *self)¶ Increases the reference count of a spa pod builder.
- Return
(transfer full): self with an additional reference count on it
- Parameters
self
: a spa pod builder object
-
void
wp_spa_pod_builder_unref
(WpSpaPodBuilder *self)¶ Decreases the reference count on self and frees it when the ref count reaches zero.
- Parameters
self
: (transfer full): a spa pod builder object
-
WpSpaPodBuilder *
wp_spa_pod_builder_new_array
(void)¶ Creates a spa pod builder of type array.
- Return
(transfer full): the new spa pod builder
-
WpSpaPodBuilder *
wp_spa_pod_builder_new_choice
(const char *choice_type)¶ Creates a spa pod builder of type choice.
- Return
(transfer full): the new spa pod builder
- Parameters
choice_type
: the name of the choice type (“Range”, “Step”, …)
-
WpSpaPodBuilder *
wp_spa_pod_builder_new_object
(const char *type_name, const char *id_name)¶ Creates a spa pod builder of type object.
- Return
(transfer full): the new spa pod builder
- Parameters
type_name
: the type name of the object typeid_name
: the Id name of the object
-
WpSpaPodBuilder *
wp_spa_pod_builder_new_struct
(void)¶ Creates a spa pod builder of type struct.
- Return
(transfer full): the new spa pod builder
-
WpSpaPodBuilder *
wp_spa_pod_builder_new_sequence
(guint unit)¶ Creates a spa pod builder of type sequence.
- Return
(transfer full): the new spa pod builder
-
void
wp_spa_pod_builder_add_none
(WpSpaPodBuilder *self)¶ Adds a none value into the builder.
- Parameters
self
: the spa pod builder object
-
void
wp_spa_pod_builder_add_boolean
(WpSpaPodBuilder *self, gboolean value)¶ Adds a boolean value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the boolean value
-
void
wp_spa_pod_builder_add_id
(WpSpaPodBuilder *self, guint32 value)¶ Adds a Id value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the Id value
-
void
wp_spa_pod_builder_add_int
(WpSpaPodBuilder *self, gint32 value)¶ Adds a int value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the int value
-
void
wp_spa_pod_builder_add_long
(WpSpaPodBuilder *self, gint64 value)¶ Adds a long value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the long value
-
void
wp_spa_pod_builder_add_float
(WpSpaPodBuilder *self, float value)¶ Adds a float value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the float value
-
void
wp_spa_pod_builder_add_double
(WpSpaPodBuilder *self, double value)¶ Adds a double value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the double value
-
void
wp_spa_pod_builder_add_string
(WpSpaPodBuilder *self, const char *value)¶ Adds a string value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the string value
-
void
wp_spa_pod_builder_add_bytes
(WpSpaPodBuilder *self, gconstpointer value, guint32 len)¶ Adds a bytes value with its length into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the bytes valuelen
: the length of the bytes value
-
void
wp_spa_pod_builder_add_pointer
(WpSpaPodBuilder *self, const char *type_name, gconstpointer value)¶ Adds a pointer value with its type name into the builder.
- Parameters
self
: the spa pod builder objecttype_name
: the type name that the pointer points tovalue
: the pointer vaue
-
void
wp_spa_pod_builder_add_fd
(WpSpaPodBuilder *self, gint64 value)¶ Adds a Fd value into the builder.
- Parameters
self
: the spa pod builder objectvalue
: the Fd value
-
void
wp_spa_pod_builder_add_rectangle
(WpSpaPodBuilder *self, guint32 width, guint32 height)¶ Adds the width and height values of a rectangle into the builder.
- Parameters
self
: the spa pod builder objectwidth
: the width value of the rectangleheight
: the height value of the rectangle
-
void
wp_spa_pod_builder_add_fraction
(WpSpaPodBuilder *self, guint32 num, guint32 denom)¶ Adds the numerator and denominator values of a fraction into the builder.
- Parameters
self
: the spa pod builder objectnum
: the numerator value of the fractiondenom
: the denominator value of the fraction
-
void
wp_spa_pod_builder_add_pod
(WpSpaPodBuilder *self, WpSpaPod *pod)¶ Adds a pod value into the builder.
- Parameters
self
: the spa pod builder objectpod
: the pod value
-
void
wp_spa_pod_builder_add_property
(WpSpaPodBuilder *self, const char *key)¶ Adds a property into the builder.
- Parameters
self
: the spa pod builder objectkey
: the name of the property
-
void
wp_spa_pod_builder_add_property_id
(WpSpaPodBuilder *self, guint32 id)¶ Adds a property into the builder.
- Parameters
self
: the spa pod builder objectid
: the id of the property
-
void
wp_spa_pod_builder_add_control
(WpSpaPodBuilder *self, guint32 offset, const char *ctl_type)¶ Adds a control into the builder.
- Parameters
self
: the spa pod builder objectoffset
: the offset of the controlctl_type
: the type name of the control
-
void
wp_spa_pod_builder_add
(WpSpaPodBuilder *self, ...)¶ Adds a list of values into the builder.
- Parameters
self
: the spa pod builder object...
: a list of additional values, followed by NULL
-
void
wp_spa_pod_builder_add_valist
(WpSpaPodBuilder *self, va_list args)¶ Adds a list of values into the builder.
- Parameters
self
: the spa pod builder objectargs
: the variable arguments passed to wp_spa_pod_builder_add()
-
WpSpaPod *
wp_spa_pod_builder_end
(WpSpaPodBuilder *self)¶ Ends the builder process and returns the constructed spa pod object.
- Return
(transfer full): the constructed spa pod object
- Parameters
self
: the spa pod builder object
-
WpSpaPodParser *
wp_spa_pod_parser_ref
(WpSpaPodParser *self)¶ Increases the reference count of a spa pod parser.
- Return
(transfer full): self with an additional reference count on it
- Parameters
self
: a spa pod sparser object
-
void
wp_spa_pod_parser_unref
(WpSpaPodParser *self)¶ Decreases the reference count on self and frees it when the ref count reaches zero.
- Parameters
self
: (transfer full): a spa pod parser object
-
WpSpaPodParser *
wp_spa_pod_parser_new_object
(WpSpaPod *pod, const char **id_name)¶ Creates an object spa pod parser. The pod object must be valid for the entire life-cycle of the returned parser.
- Return
(transfer full): The new spa pod parser
- Parameters
pod
: the object spa pod to parseid_name
: the Id name of the object
-
WpSpaPodParser *
wp_spa_pod_parser_new_struct
(WpSpaPod *pod)¶ Creates an struct spa pod parser. The pod object must be valid for the entire life-cycle of the returned parser.
- Return
(transfer full): The new spa pod parser
- Parameters
pod
: the struct spa pod to parse
-
gboolean
wp_spa_pod_parser_get_boolean
(WpSpaPodParser *self, gboolean *value)¶ Gets the boolean value from a spa pod parser.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the boolean value
-
gboolean
wp_spa_pod_parser_get_id
(WpSpaPodParser *self, guint32 *value)¶ Gets the Id value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the Id value
-
gboolean
wp_spa_pod_parser_get_int
(WpSpaPodParser *self, gint32 *value)¶ Gets the int value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the int value
-
gboolean
wp_spa_pod_parser_get_long
(WpSpaPodParser *self, gint64 *value)¶ Gets the long value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the long value
-
gboolean
wp_spa_pod_parser_get_float
(WpSpaPodParser *self, float *value)¶ Gets the float value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the float value
-
gboolean
wp_spa_pod_parser_get_double
(WpSpaPodParser *self, double *value)¶ Gets the double value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the double value
-
gboolean
wp_spa_pod_parser_get_string
(WpSpaPodParser *self, const char **value)¶ Gets the string value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the string value
-
gboolean
wp_spa_pod_parser_get_bytes
(WpSpaPodParser *self, gconstpointer *value, guint32 *len)¶ Gets the bytes value and its length from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the bytes valuelen
: (out): the length of the bytes value
-
gboolean
wp_spa_pod_parser_get_pointer
(WpSpaPodParser *self, gconstpointer *value)¶ Gets the pointer value and its type name from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the pointer value
-
gboolean
wp_spa_pod_parser_get_fd
(WpSpaPodParser *self, gint64 *value)¶ Gets the Fd value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectvalue
: (out): the Fd value
-
gboolean
wp_spa_pod_parser_get_rectangle
(WpSpaPodParser *self, guint32 *width, guint32 *height)¶ Gets the rectangle’s width and height value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectwidth
: (out): the rectangle’s width valueheight
: (out): the rectangle’s height value
-
gboolean
wp_spa_pod_parser_get_fraction
(WpSpaPodParser *self, guint32 *num, guint32 *denom)¶ Gets the fractions’s numerator and denominator value from a spa pod parser object.
- Return
TRUE if the value was obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectnum
: (out): the fractions’s numerator valuedenom
: (out): the fractions’s denominator value
-
WpSpaPod *
wp_spa_pod_parser_get_pod
(WpSpaPodParser *self)¶ Gets the spa pod value from a spa pod parser object.
- Return
(transfer full): The spa pod value or NULL if it could not be obtained
- Parameters
self
: the spa pod parser object
-
gboolean
wp_spa_pod_parser_get
(WpSpaPodParser *self, ...)¶ Gets a list of values from a spa pod parser object.
- Return
TRUE if the values were obtained, FALSE otherwise
- Parameters
self
: the spa pod parser object...
: (out): a list of values to get, followed by NULL
-
gboolean
wp_spa_pod_parser_get_valist
(WpSpaPodParser *self, va_list args)¶ This is the
va_list
version of wp_spa_pod_parser_get()- Return
TRUE if the values were obtained, FALSE otherwise
- Parameters
self
: the spa pod parser objectargs
: the variable arguments passed to wp_spa_pod_parser_get()
-
void
wp_spa_pod_parser_end
(WpSpaPodParser *self)¶ Ends the parser process.
- Parameters
self
: the spa pod parser object
-
WpIterator *
wp_spa_pod_new_iterator
(WpSpaPod *pod)¶ Creates a new iterator for a spa pod object.
- Return
(transfer full): the new spa pod iterator
- Parameters
pod
: a spa pod object
-
WP_TYPE_SPA_POD
(wp_spa_pod_get_type ())¶ The WpSpaPod GType.
-
WP_TYPE_SPA_POD_BUILDER
(wp_spa_pod_builder_get_type ())¶ The WpSpaPodBuilder GType.
-
WP_TYPE_SPA_POD_PARSER
(wp_spa_pod_parser_get_type ())¶ The WpSpaPodParser GType.