Wp.Metadata¶
- Subclasses:
Methods¶
- Inherited:
Wp.GlobalProxy (4), Wp.Proxy (4), Wp.Object (12), GObject.Object (37)
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Wp.Metadata(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Wp.Metadata
class allows accessing the properties and methods of PipeWire metadata object (struct pw_metadata). AWp.Metadata
is constructed internally when a new metadata object appears on the PipeWire registry and it is made available through theWp.ObjectManager
API.- clear()¶
Clears permanently all stored metadata.
- find(subject, key)¶
- Parameters:
- Returns:
the metadata string value, or
None
if not found.- type:
the metadata type name
- Return type:
Finds the metadata value given its subject and key.
- new_iterator(subject)¶
- Parameters:
subject (
int
) – the metadata subject id, or -1 (PW_ID_ANY)- Returns:
an iterator that iterates over the found metadata. The type of the iterator item is
Wp.MetadataItem
.- Return type:
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.
- set(subject, key, type, value)¶
- Parameters:
subject (
int
) – the subject id for which this metadata property is being setkey (
str
orNone
) – the key to set, orNone
to remove all metadata for subjecttype (
str
orNone
) – the type of the value;None
is synonymous to “string”value (
str
orNone
) – the value to set, orNone
to unset the given key
Sets the metadata associated with the given subject and key. Use
None
as a value to unset the given key and useNone
in both key and value to remove all metadata associated with the given subject.