PipeWire Metadata
WpImplMetadata
GObject ╰──WpObject ╰──WpProxy ╰──WpGlobalProxy ╰──WpMetadata ╰──WpImplMetadata
The WpImplMetadata class implements a PipeWire metadata object. It can be exported and made available by requesting the WP_PROXY_FEATURE_BOUND feature.
Class structure
Constructors
wp_impl_metadata_new
WpImplMetadata * wp_impl_metadata_new (WpCore * core)
Parameters:
core
–
WpMetadata
GObject ╰──WpObject ╰──WpProxy ╰──WpGlobalProxy ╰──WpMetadata ╰──WpImplMetadata
The WpMetadata class allows accessing the properties and methods of
PipeWire metadata object (struct pw_metadata
).
Members
parent_instance
(WpGlobalProxy)
–
Class structure
Methods
wp_metadata_clear
wp_metadata_clear (WpMetadata * self)
Clears permanently all stored metadata.
Parameters:
self
–
the metadata object
wp_metadata_find
const gchar* wp_metadata_find (WpMetadata * self, guint32 subject, const gchar* key, const gchar** type)
Finds the metadata value given its subject and &key.
Parameters:
self
–
a metadata object
subject
–
the metadata subject id
key
–
the metadata key name
type
(
[out][optional])
–
the metadata type name
the metadata string value, or NULL if not found.
wp_metadata_new_iterator
WpIterator * wp_metadata_new_iterator (WpMetadata * self, guint32 subject)
Iterates over metadata items that matches the given subject. If no constraints are specified, the returned iterator iterates over all the stored metadata.
Note that this method works on cached metadata. When you change metadata with wp_metadata_set, this cache will be updated on the next round-trip with the pipewire server.
Parameters:
self
–
a metadata object
subject
–
the metadata subject id, or -1 (PW_ID_ANY)
an iterator that iterates over the found metadata. Use wp_metadata_iterator_item_extract to parse the items returned by this iterator.
wp_metadata_set
wp_metadata_set (WpMetadata * self, guint32 subject, const gchar* key, const gchar* type, const gchar* value)
Sets the metadata associated with the given subject and key. Use NULL as a value to unset the given key and use NULL in both key and value to remove all metadata associated with the given subject.
Parameters:
self
–
the metadata object
subject
–
the subject id for which this metadata property is being set
key
(
[nullable])
–
the key to set, or NULL to remove all metadata for subject
type
(
[nullable])
–
the type of the value; NULL is synonymous to "string"
value
(
[nullable])
–
the value to set, or NULL to unset the given key
Functions
wp_metadata_iterator_item_extract
wp_metadata_iterator_item_extract (const GValue* item, guint32* subject, const gchar** key, const gchar** type, const gchar** value)
Extracts the metadata subject, key, type and value out of a GValue that was returned from the WpIterator of wp_metadata_find
Parameters:
item
–
a GValue that was returned from the WpIterator of wp_metadata_find
subject
(
[out][optional])
–
the subject id of the current item
key
(
[out][optional][transfer: none])
–
the key of the current item
type
(
[out][optional][transfer: none])
–
the type of the current item
value
(
[out][optional][transfer: none])
–
the value of the current item
Signals
changed
changed_callback (WpMetadata * self, guint object, gchar* p0, gchar* p1, gchar* p2, gpointer user_data)
Parameters:
self
–
object
–
p0
–
p1
–
p2
–
user_data
–
Flags: Run Last
Enumerations
WpMetadataFeatures
An extension of WpProxyFeatures
Members
WP_METADATA_FEATURE_DATA
(65536)
–
caches metadata locally
Constants
The results of the search are