PipeWire 1.4.5 |

Loading...
Searching...
No Matches
Files | Data Structures | Enumerations | Macros | Functions
Link
Core API

A link is the connection between 2 nodes (Node). More...

## Files
file | link.h
| `pipewire/link.h`

## Data Structures
struct | pw_link_info
| The link information. More...
struct | pw_link_events
| Link events. More...
struct | pw_link_methods
| Link methods. More...
struct | pw_link

## Enumerations
enum | pw_link_state { PW_LINK_STATE_ERROR = -2 , PW_LINK_STATE_UNLINKED = -1 , PW_LINK_STATE_INIT = 0 , PW_LINK_STATE_NEGOTIATING = 1 , PW_LINK_STATE_ALLOCATING = 2 , PW_LINK_STATE_PAUSED = 3 , PW_LINK_STATE_ACTIVE = 4 }
| The different link states. More...

## Macros
#define | PW_TYPE_INTERFACE_Link PW_TYPE_INFO_INTERFACE_BASE "Link"
#define | PW_LINK_PERM_MASK PW_PERM_R | PW_PERM_X
#define | PW_VERSION_LINK 3
#define | PW_API_LINK_IMPL static inline
#define | PW_LINK_CHANGE_MASK_STATE (1 << 0)
#define | PW_LINK_CHANGE_MASK_FORMAT (1 << 1)
#define | PW_LINK_CHANGE_MASK_PROPS (1 << 2)
#define | PW_LINK_CHANGE_MASK_ALL ((1 << 3)-1)
#define | PW_LINK_EVENT_INFO 0
#define | PW_LINK_EVENT_NUM 1
#define | PW_VERSION_LINK_EVENTS 0
#define | PW_LINK_METHOD_ADD_LISTENER 0
#define | PW_LINK_METHOD_NUM 1
#define | PW_VERSION_LINK_METHODS 0

## Functions
const char * | pw_link_state_as_string (enum pw_link_state state)
| Convert a pw_link_state to a readable string.
struct pw_link_info * | pw_link_info_update (struct pw_link_info *info, const struct pw_link_info *update)
struct pw_link_info * | pw_link_info_merge (struct pw_link_info *info, const struct pw_link_info *update, bool reset)
void | pw_link_info_free (struct pw_link_info *info)
PW_API_LINK_IMPL int | pw_link_add_listener (struct pw_link *object, struct spa_hook *listener, const struct pw_link_events *events, void *data)

## Detailed Description

A link is the connection between 2 nodes (Node).

Nodes are linked together on ports.

The link is responsible for negotiating the format and buffers for the nodes.

## Enumeration Type Documentation

## ◆ pw_link_state

enum pw_link_state

The different link states.

Enumerator
PW_LINK_STATE_ERROR | the link is in error
PW_LINK_STATE_UNLINKED | the link is unlinked
PW_LINK_STATE_INIT | the link is initialized
PW_LINK_STATE_NEGOTIATING | the link is negotiating formats
PW_LINK_STATE_ALLOCATING | the link is allocating buffers
PW_LINK_STATE_PAUSED | the link is paused
PW_LINK_STATE_ACTIVE | the link is active

## Macro Definition Documentation

## ◆ PW_TYPE_INTERFACE_Link

#define PW_TYPE_INTERFACE_Link PW_TYPE_INFO_INTERFACE_BASE "Link"

## ◆ PW_LINK_PERM_MASK

#define PW_LINK_PERM_MASK PW_PERM_R | PW_PERM_X

## ◆ PW_VERSION_LINK

#define PW_VERSION_LINK 3

## ◆ PW_API_LINK_IMPL

#define PW_API_LINK_IMPL static inline

## ◆ PW_LINK_CHANGE_MASK_STATE

#define PW_LINK_CHANGE_MASK_STATE (1 << 0)

## ◆ PW_LINK_CHANGE_MASK_FORMAT

#define PW_LINK_CHANGE_MASK_FORMAT (1 << 1)

## ◆ PW_LINK_CHANGE_MASK_PROPS

#define PW_LINK_CHANGE_MASK_PROPS (1 << 2)

## ◆ PW_LINK_CHANGE_MASK_ALL

#define PW_LINK_CHANGE_MASK_ALL ((1 << 3)-1)

## ◆ PW_LINK_EVENT_INFO

#define PW_LINK_EVENT_INFO 0

## ◆ PW_LINK_EVENT_NUM

#define PW_LINK_EVENT_NUM 1

## ◆ PW_VERSION_LINK_EVENTS

#define PW_VERSION_LINK_EVENTS 0

## ◆ PW_LINK_METHOD_ADD_LISTENER

#define PW_LINK_METHOD_ADD_LISTENER 0

## ◆ PW_LINK_METHOD_NUM

#define PW_LINK_METHOD_NUM 1

## ◆ PW_VERSION_LINK_METHODS

#define PW_VERSION_LINK_METHODS 0

## Function Documentation

## ◆ pw_link_state_as_string()

const char * pw_link_state_as_string | ( | enum pw_link_state | state | ) |

Convert a pw_link_state to a readable string.

## ◆ pw_link_info_update()

struct pw_link_info * pw_link_info_update | ( | struct pw_link_info * | info,
|  | const struct pw_link_info * | update )

## ◆ pw_link_info_merge()

struct pw_link_info * pw_link_info_merge | ( | struct pw_link_info * | info,
|  | const struct pw_link_info * | update,
|  | bool | reset )

## ◆ pw_link_info_free()

void pw_link_info_free | ( | struct pw_link_info * | info | ) |

## ◆ pw_link_add_listener()

PW_API_LINK_IMPL int pw_link_add_listener | ( | struct pw_link * | object,
|  | struct spa_hook * | listener,
|  | const struct pw_link_events * | events,
|  | void * | data )

See also
  pw_link_methods.add_listener