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.Metadataclass allows accessing the properties and methods of PipeWire metadata object (struct pw_metadata). AWp.Metadatais constructed internally when a new metadata object appears on the PipeWire registry and it is made available through theWp.ObjectManagerAPI.- clear()¶
Clears permanently all stored metadata.
- find(subject, key)¶
- Parameters:
- Returns:
the metadata string value, or
Noneif 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 (
strorNone) – the key to set, orNoneto remove all metadata for subjecttype (
strorNone) – the type of the value;Noneis synonymous to “string”value (
strorNone) – the value to set, orNoneto unset the given key
Sets the metadata associated with the given subject and key. Use
Noneas a value to unset the given key and useNonein both key and value to remove all metadata associated with the given subject.