Wp.Metadata

g GObject.Object GObject.Object Wp.Object Wp.Object GObject.Object->Wp.Object Wp.GlobalProxy Wp.GlobalProxy Wp.Metadata Wp.Metadata Wp.GlobalProxy->Wp.Metadata Wp.Proxy Wp.Proxy Wp.Object->Wp.Proxy Wp.Proxy->Wp.GlobalProxy

Subclasses:

Wp.ImplMetadata

Methods

Inherited:

Wp.GlobalProxy (4), Wp.Proxy (4), Wp.Object (12), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

clear ()

find (subject, key)

new_iterator (subject)

set (subject, key, type, value)

Virtual Methods

Inherited:

Wp.Proxy (4), Wp.Object (4), GObject.Object (7)

Properties

Inherited:

Wp.GlobalProxy (3), Wp.Proxy (2), Wp.Object (4)

Signals

Inherited:

Wp.Proxy (4), GObject.Object (1)

Name

Short Description

changed

Fields

Inherited:

Wp.Proxy (4), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Wp.GlobalProxy

r

Class Details

class Wp.Metadata(**kwargs)
Bases:

Wp.GlobalProxy

Abstract:

No

Structure:

Wp.MetadataClass

The Wp.Metadata class allows accessing the properties and methods of PipeWire metadata object (struct pw_metadata). A Wp.Metadata is constructed internally when a new metadata object appears on the PipeWire registry and it is made available through the Wp.ObjectManager API.

clear()

Clears permanently all stored metadata.

find(subject, key)
Parameters:
  • subject (int) – the metadata subject id

  • key (str) – the metadata key name

Returns:

the metadata string value, or None if not found.

type:

the metadata type name

Return type:

(str, type: str)

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:

Wp.Iterator

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 set

  • key (str or None) – the key to set, or None to remove all metadata for subject

  • type (str or None) – the type of the value; None is synonymous to “string”

  • value (str or None) – the value to set, or None 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 use None in both key and value to remove all metadata associated with the given subject.

Signal Details

Wp.Metadata.signals.changed(metadata, object, p0, p1, p2)
Signal Name:

changed

Flags:

RUN_LAST

Parameters:
  • metadata (Wp.Metadata) – The object which received the signal

  • object (int) –

  • p0 (str) –

  • p1 (str) –

  • p2 (str) –