PipeWire 1.6.5

Loading...
Searching...
No Matches
Metadata
Extensions

Metadata interface. More...

## Files
file | metadata.h
| pipewire/extensions/metadata.h

## Data Structures
struct | pw_metadata_events
| Metadata events More...
struct | pw_metadata_methods
| Metadata methods More...
struct | pw_metadata

## Macros
#define | PW_TYPE_INTERFACE_Metadata PW_TYPE_INFO_INTERFACE_BASE "Metadata"
#define | PW_METADATA_PERM_MASK PW_PERM_RWX
#define | PW_VERSION_METADATA 3
#define | PW_API_METADATA_IMPL static inline
#define | PW_EXTENSION_MODULE_METADATA PIPEWIRE_MODULE_PREFIX "module-metadata"
#define | PW_METADATA_EVENT_PROPERTY 0
#define | PW_METADATA_EVENT_NUM 1
#define | PW_VERSION_METADATA_EVENTS 0
#define | PW_METADATA_METHOD_ADD_LISTENER 0
#define | PW_METADATA_METHOD_SET_PROPERTY 1
#define | PW_METADATA_METHOD_CLEAR 2
#define | PW_METADATA_METHOD_NUM 3
#define | PW_VERSION_METADATA_METHODS 0
#define | PW_KEY_METADATA_NAME "metadata.name"
#define | PW_KEY_METADATA_VALUES "metadata.values"

## Functions
PW_API_METADATA_IMPL int | pw_metadata_add_listener (struct pw_metadata *object, struct spa_hook *listener, const struct pw_metadata_events *events, void *data)
PW_API_METADATA_IMPL int | pw_metadata_set_property (struct pw_metadata *object, uint32_t subject, const char *key, const char *type, const char *value)
| Set a metadata property.
PW_API_METADATA_IMPL int | pw_metadata_clear (struct pw_metadata *object)
| Clear all metadata.

## Detailed Description

Metadata interface.

## Macro Definition Documentation

## ◆ PW_TYPE_INTERFACE_Metadata

#define PW_TYPE_INTERFACE_Metadata PW_TYPE_INFO_INTERFACE_BASE "Metadata"

## ◆ PW_METADATA_PERM_MASK

#define PW_METADATA_PERM_MASK PW_PERM_RWX

## ◆ PW_VERSION_METADATA

#define PW_VERSION_METADATA 3

## ◆ PW_API_METADATA_IMPL

#define PW_API_METADATA_IMPL static inline

## ◆ PW_EXTENSION_MODULE_METADATA

#define PW_EXTENSION_MODULE_METADATA PIPEWIRE_MODULE_PREFIX "module-metadata"

## ◆ PW_METADATA_EVENT_PROPERTY

#define PW_METADATA_EVENT_PROPERTY 0

## ◆ PW_METADATA_EVENT_NUM

#define PW_METADATA_EVENT_NUM 1

## ◆ PW_VERSION_METADATA_EVENTS

#define PW_VERSION_METADATA_EVENTS 0

## ◆ PW_METADATA_METHOD_ADD_LISTENER

#define PW_METADATA_METHOD_ADD_LISTENER 0

## ◆ PW_METADATA_METHOD_SET_PROPERTY

#define PW_METADATA_METHOD_SET_PROPERTY 1

## ◆ PW_METADATA_METHOD_CLEAR

#define PW_METADATA_METHOD_CLEAR 2

## ◆ PW_METADATA_METHOD_NUM

#define PW_METADATA_METHOD_NUM 3

## ◆ PW_VERSION_METADATA_METHODS

#define PW_VERSION_METADATA_METHODS 0

## ◆ PW_KEY_METADATA_NAME

#define PW_KEY_METADATA_NAME "metadata.name"

## ◆ PW_KEY_METADATA_VALUES

#define PW_KEY_METADATA_VALUES "metadata.values"

## Function Documentation

## ◆ pw_metadata_add_listener()

PW_API_METADATA_IMPL int pw_metadata_add_listener | ( | struct pw_metadata * | object,
|  | struct spa_hook * | listener,
|  | const struct pw_metadata_events * | events,
|  | void * | data )

See also
  pw_metadata_methods.add_listener

## ◆ pw_metadata_set_property()

PW_API_METADATA_IMPL int pw_metadata_set_property | ( | struct pw_metadata * | object,
|  | uint32_t | subject,
|  | const char * | key,
|  | const char * | type,
|  | const char * | value )

Set a metadata property.

Automatically emit property events for the subject and key when they are changed.

Parameters

  subject | the id of the global to associate the metadata with.
  key | the key of the metadata, NULL clears all metadata for the subject.
  type | the type of the metadata, this can be blank
  value | the metadata value. NULL clears the metadata.

This requires X and W permissions on the metadata. It also requires M permissions on the subject global.

See also
  pw_metadata_methods.set_property

## ◆ pw_metadata_clear()

PW_API_METADATA_IMPL int pw_metadata_clear | ( | struct pw_metadata * | object | ) |

Clear all metadata.

This requires X and W permissions on the metadata.

See also
  pw_metadata_methods.clear