Spa Pod (Plain Old Data)
WpSpaPod
Constructors
wp_spa_pod_new_boolean
WpSpaPod * wp_spa_pod_new_boolean (gboolean value)
Creates a spa pod of type boolean
Parameters:
value
–
the boolean value
The new spa pod
wp_spa_pod_new_bytes
WpSpaPod * wp_spa_pod_new_bytes (gconstpointer value, guint32 len)
Creates a spa pod of type bytes
Parameters:
value
–
the bytes value
len
–
the length of the bytes value
The new spa pod
wp_spa_pod_new_choice
WpSpaPod * wp_spa_pod_new_choice (const char* choice_type, ... ...)
Creates a spa pod of type choice
Parameters:
choice_type
–
the name of the choice type ("Range", "Step", ...)
...
–
a list of choice values, followed by NULL
The new spa pod
wp_spa_pod_new_choice_valist
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
Parameters:
choice_type
–
the name of the choice type ("Range", "Step", ...)
args
–
the variable arguments passed to wp_spa_pod_new_choice
The new spa pod
wp_spa_pod_new_double
WpSpaPod * wp_spa_pod_new_double (double value)
Creates a spa pod of type double
Parameters:
value
–
the double value
The new spa pod
wp_spa_pod_new_fd
WpSpaPod * wp_spa_pod_new_fd (gint64 value)
Creates a spa pod of type Fd
Parameters:
value
–
the Fd value
The new spa pod
wp_spa_pod_new_float
WpSpaPod * wp_spa_pod_new_float (float value)
Creates a spa pod of type float
Parameters:
value
–
the float value
The new spa pod
wp_spa_pod_new_fraction
WpSpaPod * wp_spa_pod_new_fraction (guint32 num, guint32 denom)
Creates a spa pod of type fraction
Parameters:
num
–
the numerator value of the fraction
denom
–
the denominator value of the fraction
The new spa pod
wp_spa_pod_new_id
WpSpaPod * wp_spa_pod_new_id (guint32 value)
Creates a spa pod of type Id
Parameters:
value
–
the Id value
The new spa pod
wp_spa_pod_new_int
WpSpaPod * wp_spa_pod_new_int (gint value)
Creates a spa pod of type int
Parameters:
value
–
the int value
The new spa pod
wp_spa_pod_new_long
WpSpaPod * wp_spa_pod_new_long (glong value)
Creates a spa pod of type long
Parameters:
value
–
the long value
The new spa pod
wp_spa_pod_new_none
WpSpaPod * wp_spa_pod_new_none ()
Creates a spa pod of type None
The new spa pod
wp_spa_pod_new_object
WpSpaPod * wp_spa_pod_new_object (const char* type_name, const char* id_name, ... ...)
Creates a spa pod of type object
Parameters:
type_name
–
the type name of the object type
id_name
–
the id name of the object
...
–
a list of object properties with their values, followed by NULL
The new spa pod
wp_spa_pod_new_object_valist
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
Parameters:
type_name
–
the type name of the object type
id_name
–
the id name of the object
args
–
the variable arguments passed to wp_spa_pod_new_object
The new spa pod
wp_spa_pod_new_pointer
WpSpaPod * wp_spa_pod_new_pointer (const char* type_name, gconstpointer value)
Creates a spa pod of type pointer
Parameters:
type_name
–
the name of the type of the pointer
value
–
the pointer value
The new spa pod
wp_spa_pod_new_rectangle
WpSpaPod * wp_spa_pod_new_rectangle (guint32 width, guint32 height)
Creates a spa pod of type rectangle
Parameters:
width
–
the width value of the rectangle
height
–
the height value of the rectangle
The new spa pod
wp_spa_pod_new_sequence
WpSpaPod * wp_spa_pod_new_sequence (guint unit, ... ...)
Creates a spa pod of type sequence
Parameters:
unit
–
the unit of the sequence
...
–
a list of sequence controls with their values, followed by NULL
The new spa pod
wp_spa_pod_new_sequence_valist
WpSpaPod * wp_spa_pod_new_sequence_valist (guint unit, va_list args)
This is the va_list
version of wp_spa_pod_new_sequence
Parameters:
unit
–
the unit of the sequence
args
–
the variable arguments passed to wp_spa_pod_new_sequence
The new spa pod
wp_spa_pod_new_string
WpSpaPod * wp_spa_pod_new_string (const char* value)
Creates a spa pod of type string
Parameters:
value
–
the string value
The new spa pod
Methods
wp_spa_pod_equal
gboolean wp_spa_pod_equal (WpSpaPod * self, WpSpaPod * pod)
Checks whether two spa pod objects have the same value or not
Parameters:
self
–
the spa pod object
pod
–
the pod with the value to be compared with
TRUE if both spa pod objects have the same values, FALSE othewrise.
wp_spa_pod_get_boolean
gboolean wp_spa_pod_get_boolean (WpSpaPod * self, gboolean* value)
Gets the boolean value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the boolean value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_bytes
gboolean wp_spa_pod_get_bytes (WpSpaPod * self, gconstpointer* value, guint32* len)
Gets the bytes value and its len of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the bytes value
len
(
[out])
–
the length of the bytes value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_choice_type
WpSpaIdValue wp_spa_pod_get_choice_type (WpSpaPod * self)
If the pod is a Choice, this gets the choice type (Range, Step, Enum, ...)
Parameters:
self
–
a choice pod
the choice type of the choice pod
wp_spa_pod_get_control
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
Parameters:
self
–
the spa pod object
offset
(
[out][optional])
–
the offset of the control
ctl_type
(
[out][optional])
–
the control type (Properties, Midi, ...)
value
(
[out][optional])
–
the spa pod value of the control
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_double
gboolean wp_spa_pod_get_double (WpSpaPod * self, double* value)
Gets the double value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the double value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_fd
gboolean wp_spa_pod_get_fd (WpSpaPod * self, gint64* value)
Gets the Fd value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the Fd value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_float
gboolean wp_spa_pod_get_float (WpSpaPod * self, float* value)
Gets the float value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the float value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_fraction
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
Parameters:
self
–
the spa pod object
num
(
[out])
–
the fractions's numerator value
denom
(
[out])
–
the fractions's denominator value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_id
gboolean wp_spa_pod_get_id (WpSpaPod * self, guint32* value)
Gets the Id value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the Id value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_int
gboolean wp_spa_pod_get_int (WpSpaPod * self, gint* value)
Gets the int value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the int value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_long
gboolean wp_spa_pod_get_long (WpSpaPod * self, glong* value)
Gets the long value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the long value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_object
gboolean wp_spa_pod_get_object (WpSpaPod * self, const char** id_name, ... ...)
Gets the object properties values of a spa pod object
Parameters:
self
–
the spa pod object
id_name
(
[out])
–
the id name of the object
...
(
[out])
–
the list of the object properties values, followed by NULL
TRUE if the object properties values were obtained, FALSE otherwise
wp_spa_pod_get_object_valist
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
Parameters:
self
–
the spa pod object
id_name
(
[out])
–
the id name of the object
args
(
[out])
–
the variable arguments passed to wp_spa_pod_get_object
TRUE if the object properties values were obtained, FALSE otherwise
wp_spa_pod_get_pointer
gboolean wp_spa_pod_get_pointer (WpSpaPod * self, gconstpointer* value)
Gets the pointer value and its type name of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the pointer value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_property
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
Parameters:
self
–
the spa pod object
key
(
[out][optional])
–
the name of the property
value
(
[out][optional])
–
the spa pod value of the property
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_rectangle
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
Parameters:
self
–
the spa pod object
width
(
[out])
–
the rectangle's width value
height
(
[out])
–
the rectangle's height value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_spa_pod
const 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.
Parameters:
self
–
a spa pod object
a const pointer to the underlying spa_pod structure
wp_spa_pod_get_spa_type
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.
Parameters:
self
–
a spa pod
the type of the spa pod
wp_spa_pod_get_string
gboolean wp_spa_pod_get_string (WpSpaPod * self, const char** value)
Gets the string value of a spa pod object
Parameters:
self
–
the spa pod object
value
(
[out])
–
the string value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_get_struct
gboolean wp_spa_pod_get_struct (WpSpaPod * self, ... ...)
Gets the struct's values of a spa pod object
Parameters:
self
–
the spa pod object
...
(
[out])
–
the list of the struct values, followed by NULL
TRUE if the struct values were obtained, FALSE otherwise
wp_spa_pod_get_struct_valist
gboolean wp_spa_pod_get_struct_valist (WpSpaPod * self, va_list args)
This is the va_list
version of wp_spa_pod_get_struct
Parameters:
self
–
the spa pod object
args
(
[out])
–
the variable arguments passed to wp_spa_pod_get_struct
TRUE if the struct values were obtained, FALSE otherwise
wp_spa_pod_is_array
gboolean wp_spa_pod_is_array (WpSpaPod * self)
Checks wether the spa pod is of type array or not
Parameters:
self
–
the spa pod object
TRUE if it is of type array, FALSE otherwise
wp_spa_pod_is_boolean
gboolean wp_spa_pod_is_boolean (WpSpaPod * self)
Checks wether the spa pod is of type boolean or not
Parameters:
self
–
the spa pod object
TRUE if it is of type boolean, FALSE otherwise
wp_spa_pod_is_bytes
gboolean wp_spa_pod_is_bytes (WpSpaPod * self)
Checks wether the spa pod is of type bytes or not
Parameters:
self
–
the spa pod object
TRUE if it is of type bytes, FALSE otherwise
wp_spa_pod_is_choice
gboolean wp_spa_pod_is_choice (WpSpaPod * self)
Checks wether the spa pod is of type choice or not
Parameters:
self
–
the spa pod object
TRUE if it is of type choice, FALSE otherwise
wp_spa_pod_is_control
gboolean wp_spa_pod_is_control (WpSpaPod * self)
Checks wether the spa pod is of type control or not
Parameters:
self
–
the spa pod object
TRUE if it is of type control, FALSE otherwise
wp_spa_pod_is_double
gboolean wp_spa_pod_is_double (WpSpaPod * self)
Checks wether the spa pod is of type double or not
Parameters:
self
–
the spa pod object
TRUE if it is of type double, FALSE otherwise
wp_spa_pod_is_fd
gboolean wp_spa_pod_is_fd (WpSpaPod * self)
Checks wether the spa pod is of type Fd or not
Parameters:
self
–
the spa pod object
TRUE if it is of type Fd, FALSE otherwise
wp_spa_pod_is_float
gboolean wp_spa_pod_is_float (WpSpaPod * self)
Checks wether the spa pod is of type float or not
Parameters:
self
–
the spa pod object
TRUE if it is of type float, FALSE otherwise
wp_spa_pod_is_fraction
gboolean wp_spa_pod_is_fraction (WpSpaPod * self)
Checks wether the spa pod is of type fraction or not
Parameters:
self
–
the spa pod object
TRUE if it is of type fraction, FALSE otherwise
wp_spa_pod_is_id
gboolean wp_spa_pod_is_id (WpSpaPod * self)
Checks wether the spa pod is of type Id or not
Parameters:
self
–
the spa pod object
TRUE if it is of type Id, FALSE otherwise
wp_spa_pod_is_int
gboolean wp_spa_pod_is_int (WpSpaPod * self)
Checks wether the spa pod is of type int or not
Parameters:
self
–
the spa pod object
TRUE if it is of type int, FALSE otherwise
wp_spa_pod_is_long
gboolean wp_spa_pod_is_long (WpSpaPod * self)
Checks wether the spa pod is of type long or not
Parameters:
self
–
the spa pod object
TRUE if it is of type long, FALSE otherwise
wp_spa_pod_is_none
gboolean wp_spa_pod_is_none (WpSpaPod * self)
Checks wether the spa pod is of type none or not
Parameters:
self
–
the spa pod object
TRUE if it is of type none, FALSE otherwise
wp_spa_pod_is_object
gboolean wp_spa_pod_is_object (WpSpaPod * self)
Checks wether the spa pod is of type object or not
Parameters:
self
–
the spa pod object
TRUE if it is of type object, FALSE otherwise
wp_spa_pod_is_pointer
gboolean wp_spa_pod_is_pointer (WpSpaPod * self)
Checks wether the spa pod is of type pointer or not
Parameters:
self
–
the spa pod object
TRUE if it is of type pointer, FALSE otherwise
wp_spa_pod_is_property
gboolean wp_spa_pod_is_property (WpSpaPod * self)
Checks wether the spa pod is of type property or not
Parameters:
self
–
the spa pod object
TRUE if it is of type property, FALSE otherwise
wp_spa_pod_is_rectangle
gboolean wp_spa_pod_is_rectangle (WpSpaPod * self)
Checks wether the spa pod is of type rectangle or not
Parameters:
self
–
the spa pod object
TRUE if it is of type rectangle, FALSE otherwise
wp_spa_pod_is_sequence
gboolean wp_spa_pod_is_sequence (WpSpaPod * self)
Checks wether the spa pod is of type sequence or not
Parameters:
self
–
the spa pod object
TRUE if it is of type sequence, FALSE otherwise
wp_spa_pod_is_string
gboolean wp_spa_pod_is_string (WpSpaPod * self)
Checks wether the spa pod is of type string or not
Parameters:
self
–
the spa pod object
TRUE if it is of type string, FALSE otherwise
wp_spa_pod_is_struct
gboolean wp_spa_pod_is_struct (WpSpaPod * self)
Checks wether the spa pod is of type struct or not
Parameters:
self
–
the spa pod object
TRUE if it is of type struct, FALSE otherwise
wp_spa_pod_is_unique_owner
gboolean wp_spa_pod_is_unique_owner (WpSpaPod * self)
Checks if the pod is the unique owner of its data or not
Parameters:
self
–
a spa pod object
TRUE if the pod owns the data, FALSE otherwise.
wp_spa_pod_new_iterator
WpIterator * wp_spa_pod_new_iterator (WpSpaPod * pod)
Creates a new iterator for a spa pod object.
Parameters:
pod
–
a spa pod object
the new spa pod iterator
wp_spa_pod_set_boolean
gboolean wp_spa_pod_set_boolean (WpSpaPod * self, gboolean value)
Sets a boolean value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the boolean value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_double
gboolean wp_spa_pod_set_double (WpSpaPod * self, double value)
Sets a double value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the double value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_fd
gboolean wp_spa_pod_set_fd (WpSpaPod * self, gint64 value)
Sets a Fd value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the Fd value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_float
gboolean wp_spa_pod_set_float (WpSpaPod * self, float value)
Sets a float value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the float value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_fraction
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.
Parameters:
self
–
the spa pod object
num
–
the numerator value of the farction
denom
–
the denominator value of the fraction
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_id
gboolean wp_spa_pod_set_id (WpSpaPod * self, guint32 value)
Sets an Id value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the Id value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_int
gboolean wp_spa_pod_set_int (WpSpaPod * self, gint value)
Sets an int value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the int value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_long
gboolean wp_spa_pod_set_long (WpSpaPod * self, glong value)
Sets a long value in the spa pod object.
Parameters:
self
–
the spa pod object
value
–
the long value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_pod
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.
Parameters:
self
–
the spa pod object
pod
–
the pod with the value to be set
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_pointer
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.
Parameters:
self
–
the spa pod object
type_name
–
the name of the type of the pointer
value
–
the pointer value
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_set_rectangle
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.
Parameters:
self
–
the spa pod object
width
–
the width value of the rectangle
height
–
the height value of the rectangle
TRUE if the value could be set, FALSE othewrise.
wp_spa_pod_unref
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
WpSpaPodBuilder
Constructors
wp_spa_pod_builder_new_array
WpSpaPodBuilder * wp_spa_pod_builder_new_array ()
Creates a spa pod builder of type array
the new spa pod builder
wp_spa_pod_builder_new_choice
WpSpaPodBuilder * wp_spa_pod_builder_new_choice (const char* choice_type)
Creates a spa pod builder of type choice
Parameters:
choice_type
–
the name of the choice type ("Range", "Step", ...)
the new spa pod builder
wp_spa_pod_builder_new_object
WpSpaPodBuilder * wp_spa_pod_builder_new_object (const char* type_name, const char* id_name)
Creates a spa pod builder of type object
Parameters:
type_name
–
the type name of the object type
id_name
–
the Id name of the object
the new spa pod builder
wp_spa_pod_builder_new_sequence
WpSpaPodBuilder * wp_spa_pod_builder_new_sequence (guint unit)
Creates a spa pod builder of type sequence
Parameters:
unit
–
the new spa pod builder
wp_spa_pod_builder_new_struct
WpSpaPodBuilder * wp_spa_pod_builder_new_struct ()
Creates a spa pod builder of type struct
the new spa pod builder
Methods
wp_spa_pod_builder_add
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
wp_spa_pod_builder_add_boolean
wp_spa_pod_builder_add_boolean (WpSpaPodBuilder * self, gboolean value)
Adds a boolean value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the boolean value
wp_spa_pod_builder_add_bytes
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 object
value
–
the bytes value
len
–
the length of the bytes value
wp_spa_pod_builder_add_control
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 object
offset
–
the offset of the control
ctl_type
–
the type name of the control
wp_spa_pod_builder_add_double
wp_spa_pod_builder_add_double (WpSpaPodBuilder * self, double value)
Adds a double value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the double value
wp_spa_pod_builder_add_fd
wp_spa_pod_builder_add_fd (WpSpaPodBuilder * self, gint64 value)
Adds a Fd value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the Fd value
wp_spa_pod_builder_add_float
wp_spa_pod_builder_add_float (WpSpaPodBuilder * self, float value)
Adds a float value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the float value
wp_spa_pod_builder_add_fraction
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 object
num
–
the numerator value of the fraction
denom
–
the denominator value of the fraction
wp_spa_pod_builder_add_id
wp_spa_pod_builder_add_id (WpSpaPodBuilder * self, guint32 value)
Adds a Id value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the Id value
wp_spa_pod_builder_add_int
wp_spa_pod_builder_add_int (WpSpaPodBuilder * self, gint value)
Adds a int value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the int value
wp_spa_pod_builder_add_long
wp_spa_pod_builder_add_long (WpSpaPodBuilder * self, glong value)
Adds a long value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the long value
wp_spa_pod_builder_add_none
wp_spa_pod_builder_add_none (WpSpaPodBuilder * self)
Adds a none value into the builder
Parameters:
self
–
the spa pod builder object
wp_spa_pod_builder_add_pod
wp_spa_pod_builder_add_pod (WpSpaPodBuilder * self, WpSpaPod * pod)
Adds a pod value into the builder
Parameters:
self
–
the spa pod builder object
pod
–
the pod value
wp_spa_pod_builder_add_pointer
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 object
type_name
–
the type name that the pointer points to
value
–
the pointer vaue
wp_spa_pod_builder_add_property
wp_spa_pod_builder_add_property (WpSpaPodBuilder * self, const char* key)
Adds a property into the builder
Parameters:
self
–
the spa pod builder object
key
–
the name of the property
wp_spa_pod_builder_add_property_id
wp_spa_pod_builder_add_property_id (WpSpaPodBuilder * self, guint32 id)
Adds a property into the builder
Parameters:
self
–
the spa pod builder object
id
–
the id of the property
wp_spa_pod_builder_add_rectangle
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 object
width
–
the width value of the rectangle
height
–
the height value of the rectangle
wp_spa_pod_builder_add_string
wp_spa_pod_builder_add_string (WpSpaPodBuilder * self, const char* value)
Adds a string value into the builder
Parameters:
self
–
the spa pod builder object
value
–
the string value
wp_spa_pod_builder_add_valist
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 object
args
–
the variable arguments passed to wp_spa_pod_builder_add
wp_spa_pod_builder_end
WpSpaPod * wp_spa_pod_builder_end (WpSpaPodBuilder * self)
Ends the builder process and returns the constructed spa pod object
Parameters:
self
–
the spa pod builder object
the constructed spa pod object
wp_spa_pod_builder_ref
WpSpaPodBuilder * wp_spa_pod_builder_ref (WpSpaPodBuilder * self)
Parameters:
self
–
a spa pod builder object
self with an additional reference count on it
wp_spa_pod_builder_unref
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
WpSpaPodParser
Constructors
wp_spa_pod_parser_new_object
WpSpaPodParser * wp_spa_pod_parser_new_object (WpSpaPod * pod, const char** id_name)
Parameters:
pod
–
id_name
–
wp_spa_pod_parser_new_struct
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.
Parameters:
pod
–
the struct spa pod to parse
The new spa pod parser
Methods
wp_spa_pod_parser_end
wp_spa_pod_parser_end (WpSpaPodParser * self)
Ends the parser process
Parameters:
self
–
the spa pod parser object
wp_spa_pod_parser_get
gboolean wp_spa_pod_parser_get (WpSpaPodParser * self, ... ...)
Gets a list of values from a spa pod parser object
Parameters:
self
–
the spa pod parser object
...
(
[out])
–
a list of values to get, followed by NULL
TRUE if the values were obtained, FALSE otherwise
wp_spa_pod_parser_get_boolean
gboolean wp_spa_pod_parser_get_boolean (WpSpaPodParser * self, gboolean* value)
Gets the boolean value from a spa pod parser
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the boolean value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_bytes
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
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the bytes value
len
(
[out])
–
the length of the bytes value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_double
gboolean wp_spa_pod_parser_get_double (WpSpaPodParser * self, double* value)
Gets the double value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the double value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_fd
gboolean wp_spa_pod_parser_get_fd (WpSpaPodParser * self, gint64* value)
Gets the Fd value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the Fd value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_float
gboolean wp_spa_pod_parser_get_float (WpSpaPodParser * self, float* value)
Gets the float value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the float value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_fraction
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
Parameters:
self
–
the spa pod parser object
num
(
[out])
–
the fractions's numerator value
denom
(
[out])
–
the fractions's denominator value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_id
gboolean wp_spa_pod_parser_get_id (WpSpaPodParser * self, guint32* value)
Gets the Id value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the Id value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_int
gboolean wp_spa_pod_parser_get_int (WpSpaPodParser * self, gint* value)
Gets the int value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the int value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_long
gboolean wp_spa_pod_parser_get_long (WpSpaPodParser * self, glong* value)
Gets the long value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the long value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_pod
WpSpaPod * wp_spa_pod_parser_get_pod (WpSpaPodParser * self)
Gets the spa pod value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
The spa pod value or NULL if it could not be obtained
wp_spa_pod_parser_get_pointer
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
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the pointer value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_rectangle
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
Parameters:
self
–
the spa pod parser object
width
(
[out])
–
the rectangle's width value
height
(
[out])
–
the rectangle's height value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_string
gboolean wp_spa_pod_parser_get_string (WpSpaPodParser * self, const char** value)
Gets the string value from a spa pod parser object
Parameters:
self
–
the spa pod parser object
value
(
[out])
–
the string value
TRUE if the value was obtained, FALSE otherwise
wp_spa_pod_parser_get_valist
gboolean wp_spa_pod_parser_get_valist (WpSpaPodParser * self, va_list args)
This is the va_list
version of wp_spa_pod_parser_get
Parameters:
self
–
the spa pod parser object
args
–
the variable arguments passed to wp_spa_pod_parser_get
TRUE if the values were obtained, FALSE otherwise
wp_spa_pod_parser_ref
WpSpaPodParser * wp_spa_pod_parser_ref (WpSpaPodParser * self)
Parameters:
self
–
a spa pod sparser object
self with an additional reference count on it
wp_spa_pod_parser_unref
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
Constants
WP_TYPE_SPA_POD_BUILDER
#define WP_TYPE_SPA_POD_BUILDER (wp_spa_pod_builder_get_type ())
The WpSpaPodBuilder GType
WP_TYPE_SPA_POD_PARSER
#define WP_TYPE_SPA_POD_PARSER (wp_spa_pod_parser_get_type ())
The WpSpaPodParser GType
The results of the search are