Dynamic Proxy Properties
WpProps
GObject ╰──WpProps
WpProps handles dynamic properties on PipeWire objects, which are
known in PipeWire as "params" of type SPA_PARAM_Props
.
WpProps has two modes of operation:
- WP_PROPS_MODE_CACHE: In this mode, this object caches properties that are actually stored and discovered from the associated proxy object. When setting a property, the property is first set on the proxy and the cache is updated asynchronously (so wp_props_get will not immediately return the value that was set with wp_props_set).
- WP_PROPS_MODE_STORE: In this mode, this object is the actual store of properties. This is used by object implementations, such as WpImplSession. Before storing anything, properties need to be registered with wp_props_register.
Class structure
WpProps
GObject ╰──WpProps
WpProps handles dynamic properties on PipeWire objects, which are
known in PipeWire as "params" of type SPA_PARAM_Props
.
WpProps has two modes of operation:
- WP_PROPS_MODE_CACHE: In this mode, this object caches properties that are actually stored and discovered from the associated proxy object. When setting a property, the property is first set on the proxy and the cache is updated asynchronously (so wp_props_get will not immediately return the value that was set with wp_props_set).
- WP_PROPS_MODE_STORE: In this mode, this object is the actual store of properties. This is used by object implementations, such as WpImplSession. Before storing anything, properties need to be registered with wp_props_register.
WpProps
GObject ╰──WpProps
WpProps handles dynamic properties on PipeWire objects, which are
known in PipeWire as "params" of type SPA_PARAM_Props
.
WpProps has two modes of operation:
- WP_PROPS_MODE_CACHE: In this mode, this object caches properties that are actually stored and discovered from the associated proxy object. When setting a property, the property is first set on the proxy and the cache is updated asynchronously (so wp_props_get will not immediately return the value that was set with wp_props_set).
- WP_PROPS_MODE_STORE: In this mode, this object is the actual store of properties. This is used by object implementations, such as WpImplSession. Before storing anything, properties need to be registered with wp_props_register.
Constructors
wp_props_new
WpProps * wp_props_new (WpPropsMode mode, WpProxy * proxy)
Parameters:
mode
–
the mode
proxy
(
[transfer: none]
[nullable]
)
–
the associated proxy; can be NULL if mode is WP_PROPS_MODE_STORE
the newly created WpProps object
Wp.Props.new
def Wp.Props.new (mode, proxy):
#python wrapper for 'wp_props_new'
Parameters:
mode
(
Wp.PropsMode
)
–
the mode
proxy
(
Wp.Proxy
)
–
the associated proxy; can be None if mode is Wp.PropsMode.STORE
Wp.Props.prototype.new
function Wp.Props.prototype.new(mode: Wp.PropsMode, proxy: Wp.Proxy): {
// javascript wrapper for 'wp_props_new'
}
Parameters:
mode
(
Wp.PropsMode
)
–
the mode
proxy
(
Wp.Proxy
)
–
the associated proxy; can be null if mode is Wp.PropsMode.STORE
Methods
wp_props_get
WpSpaPod * wp_props_get (WpProps * self, const gchar * name)
Parameters:
self
–
the props
name
–
the name (registered spa type nick) of the property to get
a pod with the current value of the property or NULL if the property is not found
Wp.Props.get
def Wp.Props.get (self, name):
#python wrapper for 'wp_props_get'
Parameters:
self
(
Wp.Props
)
–
the props
name
(
str
)
–
the name (registered spa type nick) of the property to get
wp_props_get_all
WpSpaPod * wp_props_get_all (WpProps * self)
Parameters:
self
–
the props
a pod object of type SPA_TYPE_OBJECT_Props
that contains all the properties, as they would appear on the PipeWire
object
Wp.Props.get_all
def Wp.Props.get_all (self):
#python wrapper for 'wp_props_get_all'
Parameters:
self
(
Wp.Props
)
–
the props
a pod object of type SPA_TYPE_OBJECT_Props
that contains all the properties, as they would appear on the PipeWire
object
Wp.Props.prototype.get_all
function Wp.Props.prototype.get_all(): {
// javascript wrapper for 'wp_props_get_all'
}
Parameters:
self
(
Wp.Props
)
–
the props
a pod object of type SPA_TYPE_OBJECT_Props
that contains all the properties, as they would appear on the PipeWire
object
wp_props_iterate_prop_info
WpIterator * wp_props_iterate_prop_info (WpProps * self)
Parameters:
self
–
the props
a WpIterator that iterates over WpSpaPod items
where each pod is an object of type SPA_TYPE_OBJECT_PropInfo
, and thus
contains the id, the description and the type of each property.
Wp.Props.iterate_prop_info
def Wp.Props.iterate_prop_info (self):
#python wrapper for 'wp_props_iterate_prop_info'
Parameters:
self
(
Wp.Props
)
–
the props
a Wp.Iterator that iterates over Wp.SpaPod items
where each pod is an object of type SPA_TYPE_OBJECT_PropInfo
, and thus
contains the id, the description and the type of each property.
Wp.Props.prototype.iterate_prop_info
function Wp.Props.prototype.iterate_prop_info(): {
// javascript wrapper for 'wp_props_iterate_prop_info'
}
Parameters:
self
(
Wp.Props
)
–
the props
a Wp.Iterator that iterates over Wp.SpaPod items
where each pod is an object of type SPA_TYPE_OBJECT_PropInfo
, and thus
contains the id, the description and the type of each property.
wp_props_register
wp_props_register (WpProps * self, const gchar * name, const gchar * description, WpSpaPod * pod)
Registers a new property. This can only be used in WP_PROPS_MODE_STORE mode.
name must be a valid spa type nickname, registered in the WP_SPA_TYPE_TABLE_PROPS table.
pod can be a value (which is taken as the default value) or a choice (which defines the allowed values for this property)
Parameters:
self
–
the props
name
–
the name (registered spa type nick) of the property
description
–
the description of the property
pod
(
[transfer: full]
)
–
a pod that gives the type and the default value
Wp.Props.register
def Wp.Props.register (self, name, description, pod):
#python wrapper for 'wp_props_register'
Registers a new property. This can only be used in Wp.PropsMode.STORE mode.
name must be a valid spa type nickname, registered in the Wp.SpaTypeTable.PROPS table.
pod can be a value (which is taken as the default value) or a choice (which defines the allowed values for this property)
Parameters:
self
(
Wp.Props
)
–
the props
name
(
str
)
–
the name (registered spa type nick) of the property
description
(
str
)
–
the description of the property
pod
(
Wp.SpaPod
)
–
a pod that gives the type and the default value
Wp.Props.prototype.register
function Wp.Props.prototype.register(name: String, description: String, pod: Wp.SpaPod): {
// javascript wrapper for 'wp_props_register'
}
Registers a new property. This can only be used in Wp.PropsMode.STORE mode.
name must be a valid spa type nickname, registered in the Wp.SpaTypeTable.PROPS table.
pod can be a value (which is taken as the default value) or a choice (which defines the allowed values for this property)
Parameters:
self
(
Wp.Props
)
–
the props
name
(
String
)
–
the name (registered spa type nick) of the property
description
(
String
)
–
the description of the property
pod
(
Wp.SpaPod
)
–
a pod that gives the type and the default value
wp_props_register_from_info
wp_props_register_from_info (WpProps * self, WpSpaPod * pod)
Registers a new property using the information of the provided PropInfo pod
Parameters:
self
–
the props
pod
(
[transfer: full]
)
–
a SPA_TYPE_OBJECT_PropInfo
pod
Wp.Props.register_from_info
def Wp.Props.register_from_info (self, pod):
#python wrapper for 'wp_props_register_from_info'
Registers a new property using the information of the provided PropInfo pod
Wp.Props.prototype.register_from_info
function Wp.Props.prototype.register_from_info(pod: Wp.SpaPod): {
// javascript wrapper for 'wp_props_register_from_info'
}
Registers a new property using the information of the provided PropInfo pod
wp_props_set
wp_props_set (WpProps * self, const gchar * name, WpSpaPod * value)
Sets the property specified with name to have the given value. If the mode is WP_PROPS_MODE_CACHE, this property will be set on the associated proxy first and will be updated asynchronously.
If name is NULL, then value must be an object of type
SPA_TYPE_OBJECT_Props
, which may contain multiple properties to set.
If any value actually changes, the prop-changed signal will be emitted.
Parameters:
self
–
the props
name
(
[nullable]
)
–
the name (registered spa type nick) of the property to set
value
(
[transfer: full]
)
–
the value to set
Wp.Props.set
def Wp.Props.set (self, name, value):
#python wrapper for 'wp_props_set'
Sets the property specified with name to have the given value. If the mode is Wp.PropsMode.CACHE, this property will be set on the associated proxy first and will be updated asynchronously.
If name is None, then value must be an object of type
SPA_TYPE_OBJECT_Props
, which may contain multiple properties to set.
If any value actually changes, the prop-changed signal will be emitted.
Parameters:
self
(
Wp.Props
)
–
the props
name
(
str
)
–
the name (registered spa type nick) of the property to set
value
(
Wp.SpaPod
)
–
the value to set
Wp.Props.prototype.set
function Wp.Props.prototype.set(name: String, value: Wp.SpaPod): {
// javascript wrapper for 'wp_props_set'
}
Sets the property specified with name to have the given value. If the mode is Wp.PropsMode.CACHE, this property will be set on the associated proxy first and will be updated asynchronously.
If name is null, then value must be an object of type
SPA_TYPE_OBJECT_Props
, which may contain multiple properties to set.
If any value actually changes, the prop-changed signal will be emitted.
Parameters:
self
(
Wp.Props
)
–
the props
name
(
String
)
–
the name (registered spa type nick) of the property to set
value
(
Wp.SpaPod
)
–
the value to set
wp_props_store
wp_props_store (WpProps * self, const gchar * name, WpSpaPod * value)
Stores the given value for the property specified with name. This method always stores, even if the mode is WP_PROPS_MODE_CACHE. This is useful for caching implementations only.
If name is NULL, then value must be an object of type
SPA_TYPE_OBJECT_Props
, which may contain multiple properties to set.
If any value actually changes, the prop-changed signal will be emitted.
Parameters:
self
–
the props
name
(
[nullable]
)
–
the name (registered spa type nick) of the property to set
value
(
[transfer: full]
)
–
the value to set
Wp.Props.store
def Wp.Props.store (self, name, value):
#python wrapper for 'wp_props_store'
Stores the given value for the property specified with name. This method always stores, even if the mode is Wp.PropsMode.CACHE. This is useful for caching implementations only.
If name is None, then value must be an object of type
SPA_TYPE_OBJECT_Props
, which may contain multiple properties to set.
If any value actually changes, the prop-changed signal will be emitted.
Parameters:
self
(
Wp.Props
)
–
the props
name
(
str
)
–
the name (registered spa type nick) of the property to set
value
(
Wp.SpaPod
)
–
the value to set
Wp.Props.prototype.store
function Wp.Props.prototype.store(name: String, value: Wp.SpaPod): {
// javascript wrapper for 'wp_props_store'
}
Stores the given value for the property specified with name. This method always stores, even if the mode is Wp.PropsMode.CACHE. This is useful for caching implementations only.
If name is null, then value must be an object of type
SPA_TYPE_OBJECT_Props
, which may contain multiple properties to set.
If any value actually changes, the prop-changed signal will be emitted.
Parameters:
self
(
Wp.Props
)
–
the props
name
(
String
)
–
the name (registered spa type nick) of the property to set
value
(
Wp.SpaPod
)
–
the value to set
Signals
prop-changed
prop_changed_callback (WpProps * self, gchar * name, gpointer user_data)
Parameters:
self
–
the props
name
–
the name of the property that changed
user_data
–
Flags: Run Last
prop-changed
def prop_changed_callback (self, name, *user_data):
#python callback for the 'prop-changed' signal
Parameters:
self
(
Wp.Props
)
–
the props
name
(
str
)
–
the name of the property that changed
user_data
(
variadic
)
–
Flags: Run Last
prop-changed
function prop_changed_callback(self: Wp.Props, name: String, user_data: Object): {
// javascript callback for the 'prop-changed' signal
}
Parameters:
self
(
Wp.Props
)
–
the props
name
(
String
)
–
the name of the property that changed
user_data
(
Object
)
–
Flags: Run Last
Properties
Enumerations
WpPropsMode
Members
WP_PROPS_MODE_CACHE
(0)
–
props are stored on the proxy and cached here
WP_PROPS_MODE_STORE
(1)
–
props are stored here directly
Wp.PropsMode
Members
Wp.PropsMode.CACHE
(0)
–
props are stored on the proxy and cached here
Wp.PropsMode.STORE
(1)
–
props are stored here directly
Wp.PropsMode
Members
Wp.PropsMode.CACHE
(0)
–
props are stored on the proxy and cached here
Wp.PropsMode.STORE
(1)
–
props are stored here directly
Constants
The results of the search are