PipeWire  0.1.4
pw_port Class Reference

The port object. More...

Collaboration diagram for pw_port:

Public Member Functions

struct pw_portpw_port_new (enum pw_direction direction, uint32_t port_id, struct pw_properties *properties, size_t user_data_size)
 Create a new port. More...
 
void pw_port_add (struct pw_port *port, struct pw_node *node)
 Add a port to a node. More...
 
void pw_port_destroy (struct pw_port *port)
 Destroy a port. More...
 
int pw_port_enum_formats (struct pw_port *port, struct spa_format **format, const struct spa_format *filter, int32_t index)
 Get the current format on a port. More...
 
int pw_port_set_format (struct pw_port *port, uint32_t flags, const struct spa_format *format)
 Set a format on a port. More...
 
int pw_port_get_format (struct pw_port *port, const struct spa_format **format)
 Get the current format on a port. More...
 
int pw_port_get_info (struct pw_port *port, const struct spa_port_info **info)
 Get the info on a port. More...
 
int pw_port_enum_params (struct pw_port *port, uint32_t index, struct spa_param **param)
 Enumerate the port parameters. More...
 
int pw_port_set_param (struct pw_port *port, struct spa_param *param)
 Set a port parameter. More...
 
int pw_port_use_buffers (struct pw_port *port, struct spa_buffer **buffers, uint32_t n_buffers)
 Use buffers on a port. More...
 
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)
 Allocate memory for buffers on a port. More...
 

Data Fields

struct spa_list link
 link in node port_list More...
 
struct pw_nodenode
 owner node More...
 
enum pw_direction direction
 port direction More...
 
uint32_t port_id
 port id More...
 
struct pw_propertiesproperties
 
enum pw_port_state state
 state of the port More...
 
const struct pw_port_implementationimplementation
 
void * implementation_data
 
struct spa_port_io io
 io area of the port More...
 
bool allocated
 if buffers are allocated More...
 
struct pw_memblock buffer_mem
 allocated buffer memory More...
 
struct spa_buffer ** buffers
 port buffers More...
 
uint32_t n_buffers
 number of port buffers More...
 
struct spa_list links
 list of pw_link More...
 
struct spa_hook_list listener_list
 
void * mix
 optional port buffer mix/split More...
 
struct {
   struct spa_graph *   graph
 
   struct spa_graph_port   port
 
   struct spa_graph_port   mix_port
 
   struct spa_graph_node   mix_node
 
rt
 data only accessed from the data thread More...
 
void * user_data
 extra user data More...
 

Detailed Description

The port object.

Member Function Documentation

◆ pw_port_add()

void pw_port_add ( struct pw_port port,
struct pw_node node 
)

Add a port to a node.

◆ 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 
)

Allocate memory for buffers on a port.

◆ pw_port_destroy()

void pw_port_destroy ( struct pw_port port)

Destroy a port.

◆ pw_port_enum_formats()

int pw_port_enum_formats ( struct pw_port port,
struct spa_format **  format,
const struct spa_format *  filter,
int32_t  index 
)

Get the current format on a port.

◆ pw_port_enum_params()

int pw_port_enum_params ( struct pw_port port,
uint32_t  index,
struct spa_param **  param 
)

Enumerate the port parameters.

◆ pw_port_get_format()

int pw_port_get_format ( struct pw_port port,
const struct spa_format **  format 
)

Get the current format on a port.

◆ pw_port_get_info()

int pw_port_get_info ( struct pw_port port,
const struct spa_port_info **  info 
)

Get the info on a 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 
)

Create a new port.

Returns
a newly allocated port

◆ pw_port_set_format()

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

Set a format on a port.

◆ pw_port_set_param()

int pw_port_set_param ( struct pw_port port,
struct spa_param *  param 
)

Set a port parameter.

◆ pw_port_use_buffers()

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

Use buffers on a port.

Field Documentation

◆ allocated

bool pw_port::allocated

if buffers are allocated

Referenced by pw_port_set_format().

◆ buffer_mem

struct pw_memblock pw_port::buffer_mem

allocated buffer memory

Referenced by pw_port_set_format().

◆ buffers

struct spa_buffer** pw_port::buffers

port buffers

Referenced by pw_port_set_format().

◆ direction

enum pw_direction pw_port::direction

◆ graph

struct spa_graph* pw_port::graph

Referenced by pw_port_add().

◆ implementation

◆ implementation_data

◆ io

struct spa_port_io pw_port::io

io area of the port

Referenced by pw_port_add(), and pw_port_new().

◆ link

struct spa_list pw_port::link

link in node port_list

Referenced by pw_node_for_each_port(), and pw_port_add().

◆ links

struct spa_list pw_port::links

list of pw_link

Referenced by pw_link_find(), pw_link_new(), and pw_port_new().

◆ listener_list

struct spa_hook_list pw_port::listener_list

◆ mix

void* pw_port::mix

optional port buffer mix/split

◆ mix_node

struct spa_graph_node pw_port::mix_node

◆ mix_port

struct spa_graph_port pw_port::mix_port

◆ n_buffers

uint32_t pw_port::n_buffers

number of port buffers

Referenced by pw_port_set_format().

◆ node

◆ port

struct spa_graph_port pw_port::port

◆ port_id

uint32_t pw_port::port_id

◆ properties

struct pw_properties* pw_port::properties

◆ rt

struct { ... } pw_port::rt

data only accessed from the data thread

Referenced by pw_port_add(), and pw_port_new().

◆ state

enum pw_port_state pw_port::state

◆ user_data

void* pw_port::user_data

extra user data

Referenced by pw_port_get_user_data(), and pw_port_new().


The documentation for this class was generated from the following files: