PipeWire: port.c File Reference

PipeWire 0.1.5.1

Functions
port.c File Reference
Include dependency graph for port.c:

## Functions
struct pw_port * | pw_port_new (enum pw_direction direction, uint32_t port_id, struct pw_properties *properties, size_t user_data_size)
enum pw_direction | pw_port_get_direction (struct pw_port *port)
| Get the port direction. More...
uint32_t | pw_port_get_id (struct pw_port *port)
| Get the port id. More...
const struct pw_properties * | pw_port_get_properties (struct pw_port *port)
| Get the port properties. More...
void | pw_port_update_properties (struct pw_port *port, const struct spa_dict *dict)
| Update the port properties. More...
struct pw_node * | pw_port_get_node (struct pw_port *port)
| Get the port parent node or NULL when not yet set. More...
void | pw_port_add_listener (struct pw_port *port, struct spa_hook *listener, const struct pw_port_events *events, void *data)
| Add an event listener on the port. More...
void * | pw_port_get_user_data (struct pw_port *port)
bool | pw_port_add (struct pw_port *port, struct pw_node *node)
void | pw_port_destroy (struct pw_port *port)
int | pw_port_set_format (struct pw_port *port, uint32_t flags, const struct spa_format *format)
int | pw_port_use_buffers (struct pw_port *port, struct spa_buffer **buffers, uint32_t n_buffers)
int | pw_port_alloc_buffers (struct pw_port *port, struct spa_param **params, uint32_t n_params, struct spa_buffer **buffers, uint32_t *n_buffers)

## Function Documentation

## ◆ pw_port_add()

bool pw_port_add | ( | struct pw_port * | port,
|  | struct pw_node * | node
| ) |  |

References PW_DIRECTION_INPUT, pw_loop_invoke, PW_NODE_CHANGE_MASK_INPUT_PORTS, and PW_NODE_CHANGE_MASK_OUTPUT_PORTS.

Referenced by pw_node::pw_node_get_free_port().

## ◆ pw_port_add_listener()

void pw_port_add_listener | ( | struct pw_port * | port,
|  | struct spa_hook * | listener,
|  | const struct pw_port_events * | events,
|  | void * | data
| ) |  |

Add an event listener on the port.

## ◆ pw_port_alloc_buffers()

int pw_port_alloc_buffers | ( | struct pw_port * | port,
|  | struct spa_param ** | params,
|  | uint32_t | n_params,
|  | struct spa_buffer ** | buffers,
|  | uint32_t * | n_buffers
| ) |  |

References pw_loop_invoke, PW_PORT_STATE_PAUSED, and PW_PORT_STATE_READY.

## ◆ pw_port_destroy()

void pw_port_destroy | ( | struct pw_port * | port | ) |

References pw_loop_invoke.

## ◆ pw_port_get_direction()

enum pw_direction pw_port_get_direction | ( | struct pw_port * | port | ) |

Get the port direction.

## ◆ pw_port_get_id()

uint32_t pw_port_get_id | ( | struct pw_port * | port | ) |

Get the port id.

## ◆ pw_port_get_node()

struct pw_node* pw_port_get_node | ( | struct pw_port * | port | ) |

Get the port parent node or NULL when not yet set.

## ◆ pw_port_get_properties()

const struct pw_properties* pw_port_get_properties | ( | struct pw_port * | port | ) |

Get the port properties.

## ◆ pw_port_get_user_data()

void* pw_port_get_user_data | ( | struct pw_port * | port | ) |

## ◆ pw_port_new()

struct pw_port* pw_port_new | ( | enum pw_direction | direction,
|  | uint32_t | port_id,
|  | struct pw_properties * | properties,
|  | size_t | user_data_size
| ) |  |

References pw_direction_as_string(), PW_DIRECTION_INPUT, PW_PORT_STATE_INIT, and pw_properties_new().

Referenced by pw_node::pw_node_get_free_port().

## ◆ pw_port_set_format()

int pw_port_set_format | ( | struct pw_port * | port,
|  | uint32_t | flags,
|  | const struct spa_format * | format
| ) |  |

References pw_memblock_free().

## ◆ pw_port_update_properties()

void pw_port_update_properties | ( | struct pw_port * | port,
|  | const struct spa_dict * | dict
| ) |  |

Update the port properties.

References pw_properties_set().

## ◆ pw_port_use_buffers()

int pw_port_use_buffers | ( | struct pw_port * | port,
|  | struct spa_buffer ** | buffers,
|  | uint32_t | n_buffers
| ) |  |

References pw_loop_invoke, PW_PORT_STATE_PAUSED, and PW_PORT_STATE_READY.