PipeWire: pw_core_events Struct Reference

PipeWire 1.0.7

Loading...
Searching...
No Matches
Data Fields
pw_core_events Struct Reference
Core API » Core

Core events. More...

`#include <pipewire/core.h>`

## Data Fields
uint32_t | version
void(* | info )(void *data, const struct pw_core_info *info)
| Notify new core info.
void(* | done )(void *data, uint32_t id, int seq)
| Emit a done event.
void(* | ping )(void *data, uint32_t id, int seq)
| Emit a ping event.
void(* | error )(void *data, uint32_t id, int seq, int res, const char *message)
| Fatal error event.
void(* | remove_id )(void *data, uint32_t id)
| Remove an object ID.
void(* | bound_id )(void *data, uint32_t id, uint32_t global_id)
| Notify an object binding.
void(* | add_mem )(void *data, uint32_t id, uint32_t type, int fd, uint32_t flags)
| Add memory for a client.
void(* | remove_mem )(void *data, uint32_t id)
| Remove memory for a client.
void(* | bound_props )(void *data, uint32_t id, uint32_t global_id, const struct spa_dict *props)

## Detailed Description

Core events.

Examples
  bluez-session.c, export-sink.c, export-source.c, export-spa-device.c, export-spa.c, and tutorial3.c.

## Field Documentation

## ◆ version

uint32_t pw_core_events::version

## ◆ info

void(* pw_core_events::info) (void *data, const struct pw_core_info *info)

Notify new core info.

This event is emitted when first bound to the core or when the hello method is called.

Parameters

  info | new core info

## ◆ done

void(* pw_core_events::done) (void *data, uint32_t id, int seq)

Emit a done event.

The done event is emitted as a result of a sync method with the same seq number.

Parameters

  seq | the seq number passed to the sync method call

Examples
  tutorial3.c.

## ◆ ping

void(* pw_core_events::ping) (void *data, uint32_t id, int seq)

Emit a ping event.

The client should reply with a pong reply with the same seq number.

## ◆ error

void(* pw_core_events::error) (void *data, uint32_t id, int seq, int res, const char *message)

Fatal error event.

The error event is sent out when a fatal (non-recoverable) error has occurred. The id argument is the proxy object where the error occurred, most often in response to a request to that object. The message is a brief description of the error, for (debugging) convenience.

This event is usually also emitted on the proxy object with id.

Parameters

  id | object where the error occurred
  seq | the sequence number that generated the error
  res | error code
  message | error description

Examples
  bluez-session.c, export-sink.c, export-source.c, export-spa-device.c, and export-spa.c.

## ◆ remove_id

void(* pw_core_events::remove_id) (void *data, uint32_t id)

Remove an object ID.

This event is used internally by the object ID management logic. When a client deletes an object, the server will send this event to acknowledge that it has seen the delete request. When the client receives this event, it will know that it can safely reuse the object ID.

Parameters

  id | deleted object ID

## ◆ bound_id

void(* pw_core_events::bound_id) (void *data, uint32_t id, uint32_t global_id)

Notify an object binding.

This event is emitted when a local object ID is bound to a global ID. It is emitted before the global becomes visible in the registry.

Parameters

  id | bound object ID
  global_id | the global id bound to

## ◆ add_mem

void(* pw_core_events::add_mem) (void *data, uint32_t id, uint32_t type, int fd, uint32_t flags)

Add memory for a client.

Memory is given to a client as fd of a certain memory type.

Further references to this fd will be made with the per memory unique identifier id.

Parameters

  id | the unique id of the memory
  type | the memory type, one of enum spa_data_type
  fd | the file descriptor
  flags | extra flags

## ◆ remove_mem

void(* pw_core_events::remove_mem) (void *data, uint32_t id)

Remove memory for a client.

Parameters

  id | the memory id to remove

## ◆ bound_props

void(* pw_core_events::bound_props) (void *data, uint32_t id, uint32_t global_id, const struct spa_dict *props)

The documentation for this struct was generated from the following file:

- pipewire/core.h