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

WpImplMetadataClass

Fields
parent_class (WpMetadataClass) –
No description available

Constructors

wp_impl_metadata_new

WpImplMetadata *
wp_impl_metadata_new (WpCore * core)

Parameters:

core
No description available
Returns
No description available

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) –
No description available

Class structure

WpMetadataClass

Fields
parent_class (WpGlobalProxyClass) –
No description available

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

Returns

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)

Returns ( [transfer: full])

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
No description available
object
No description available
p0
No description available
p1
No description available
p2
No description available
user_data
No description available

Flags: Run Last


Enumerations

WpMetadataFeatures

An extension of WpProxyFeatures

Members
WP_METADATA_FEATURE_DATA (65536) –

caches metadata locally


Constants

WP_TYPE_METADATA

#define WP_TYPE_METADATA (wp_metadata_get_type ())

The WpMetadata GType


The results of the search are