PipeWire 1.0.5
Loading...
Searching...
No Matches

Files

file  impl-node.h
 pipewire/impl-node.h
 

Data Structures

struct  pw_impl_node_events
 Node events, listen to them with pw_impl_node_add_listener. More...
 
struct  pw_impl_node_rt_events
 
struct  pw_impl_node
 
struct  pw_impl_port
 

Macros

#define PW_VERSION_IMPL_NODE_EVENTS   0
 
#define PW_VERSION_IMPL_NODE_RT_EVENTS   0
 

Functions

struct pw_impl_nodepw_context_create_node (struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
 Create a new node.
 
int pw_impl_node_register (struct pw_impl_node *node, struct pw_properties *properties)
 Complete initialization of the node and register.
 
void pw_impl_node_destroy (struct pw_impl_node *node)
 Destroy a node.
 
const struct pw_node_infopw_impl_node_get_info (struct pw_impl_node *node)
 Get the node info.
 
void * pw_impl_node_get_user_data (struct pw_impl_node *node)
 Get node user_data.
 
struct pw_contextpw_impl_node_get_context (struct pw_impl_node *node)
 Get the context of this node.
 
struct pw_globalpw_impl_node_get_global (struct pw_impl_node *node)
 Get the global of this node.
 
const struct pw_propertiespw_impl_node_get_properties (struct pw_impl_node *node)
 Get the node properties.
 
int pw_impl_node_update_properties (struct pw_impl_node *node, const struct spa_dict *dict)
 Update the node properties.
 
int pw_impl_node_set_implementation (struct pw_impl_node *node, struct spa_node *spa_node)
 Set the node implementation.
 
struct spa_nodepw_impl_node_get_implementation (struct pw_impl_node *node)
 Get the node implementation.
 
void pw_impl_node_add_listener (struct pw_impl_node *node, struct spa_hook *listener, const struct pw_impl_node_events *events, void *data)
 Add an event listener.
 
void pw_impl_node_add_rt_listener (struct pw_impl_node *node, struct spa_hook *listener, const struct pw_impl_node_rt_events *events, void *data)
 Add an rt_event listener.
 
void pw_impl_node_remove_rt_listener (struct pw_impl_node *node, struct spa_hook *listener)
 
int pw_impl_node_for_each_port (struct pw_impl_node *node, enum pw_direction direction, int(*callback)(void *data, struct pw_impl_port *port), void *data)
 Iterate the ports in the given direction.
 
int pw_impl_node_for_each_param (struct pw_impl_node *node, int seq, uint32_t param_id, uint32_t index, uint32_t max, const struct spa_pod *filter, int(*callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param), void *data)
 
struct pw_impl_portpw_impl_node_find_port (struct pw_impl_node *node, enum pw_direction direction, uint32_t port_id)
 Find the port with direction and port_id or NULL when not found.
 
uint32_t pw_impl_node_get_free_port_id (struct pw_impl_node *node, enum pw_direction direction)
 Get a free unused port_id from the node.
 
int pw_impl_node_initialized (struct pw_impl_node *node)
 
int pw_impl_node_set_active (struct pw_impl_node *node, bool active)
 Set a node active.
 
bool pw_impl_node_is_active (struct pw_impl_node *node)
 Check if a node is active.
 
int pw_impl_node_send_command (struct pw_impl_node *node, const struct spa_command *command)
 Check if a node is active, Since 0.3.39.
 
int pw_impl_node_set_param (struct pw_impl_node *node, uint32_t id, uint32_t flags, const struct spa_pod *param)
 Set a param on the node, Since 0.3.65.
 

Detailed Description

The node object processes data. The node has a list of input and output ports (Port Impl) on which it will receive and send out buffers respectively.

Macro Definition Documentation

◆ PW_VERSION_IMPL_NODE_EVENTS

#define PW_VERSION_IMPL_NODE_EVENTS   0

◆ PW_VERSION_IMPL_NODE_RT_EVENTS

#define PW_VERSION_IMPL_NODE_RT_EVENTS   0

Function Documentation

◆ pw_context_create_node()

struct pw_impl_node * pw_context_create_node ( struct pw_context * context,
struct pw_properties * properties,
size_t user_data_size )

Create a new node.

Parameters
contextthe context
propertiesextra properties
user_data_sizeuser data size

◆ pw_impl_node_register()

int pw_impl_node_register ( struct pw_impl_node * node,
struct pw_properties * properties )

Complete initialization of the node and register.

Parameters
nodenode to register
propertiesextra properties

◆ pw_impl_node_destroy()

void pw_impl_node_destroy ( struct pw_impl_node * node)

Destroy a node.

Parameters
nodea node to destroy

Remove node. This will stop the transfer on the node and free the resources allocated by node.

◆ pw_impl_node_get_info()

const struct pw_node_info * pw_impl_node_get_info ( struct pw_impl_node * node)

Get the node info.

◆ pw_impl_node_get_user_data()

void * pw_impl_node_get_user_data ( struct pw_impl_node * node)

Get node user_data.

The size of the memory was given in pw_context_create_node

◆ pw_impl_node_get_context()

struct pw_context * pw_impl_node_get_context ( struct pw_impl_node * node)

Get the context of this node.

◆ pw_impl_node_get_global()

struct pw_global * pw_impl_node_get_global ( struct pw_impl_node * node)

Get the global of this node.

◆ pw_impl_node_get_properties()

const struct pw_properties * pw_impl_node_get_properties ( struct pw_impl_node * node)

Get the node properties.

◆ pw_impl_node_update_properties()

int pw_impl_node_update_properties ( struct pw_impl_node * node,
const struct spa_dict * dict )

Update the node properties.

◆ pw_impl_node_set_implementation()

int pw_impl_node_set_implementation ( struct pw_impl_node * node,
struct spa_node * spa_node )

Set the node implementation.

◆ pw_impl_node_get_implementation()

struct spa_node * pw_impl_node_get_implementation ( struct pw_impl_node * node)

Get the node implementation.

◆ pw_impl_node_add_listener()

void pw_impl_node_add_listener ( struct pw_impl_node * node,
struct spa_hook * listener,
const struct pw_impl_node_events * events,
void * data )

Add an event listener.

◆ pw_impl_node_add_rt_listener()

void pw_impl_node_add_rt_listener ( struct pw_impl_node * node,
struct spa_hook * listener,
const struct pw_impl_node_rt_events * events,
void * data )

Add an rt_event listener.

◆ pw_impl_node_remove_rt_listener()

void pw_impl_node_remove_rt_listener ( struct pw_impl_node * node,
struct spa_hook * listener )

◆ pw_impl_node_for_each_port()

int pw_impl_node_for_each_port ( struct pw_impl_node * node,
enum pw_direction direction,
int(*)(void *data, struct pw_impl_port *port) callback,
void * data )

Iterate the ports in the given direction.

The callback should return 0 to fetch the next item, any other value stops the iteration and returns the value. When all callbacks return 0, this function returns 0 when all items are iterated.

◆ pw_impl_node_for_each_param()

int pw_impl_node_for_each_param ( struct pw_impl_node * node,
int seq,
uint32_t param_id,
uint32_t index,
uint32_t max,
const struct spa_pod * filter,
int(*)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param) callback,
void * data )

◆ pw_impl_node_find_port()

struct pw_impl_port * pw_impl_node_find_port ( struct pw_impl_node * node,
enum pw_direction direction,
uint32_t port_id )

Find the port with direction and port_id or NULL when not found.

Passing PW_ID_ANY for port_id will return any port, preferably an unlinked one.

◆ pw_impl_node_get_free_port_id()

uint32_t pw_impl_node_get_free_port_id ( struct pw_impl_node * node,
enum pw_direction direction )

Get a free unused port_id from the node.

◆ pw_impl_node_initialized()

int pw_impl_node_initialized ( struct pw_impl_node * node)

◆ pw_impl_node_set_active()

int pw_impl_node_set_active ( struct pw_impl_node * node,
bool active )

Set a node active.

This will start negotiation with all linked active nodes and start data transport

◆ pw_impl_node_is_active()

bool pw_impl_node_is_active ( struct pw_impl_node * node)

Check if a node is active.

◆ pw_impl_node_send_command()

int pw_impl_node_send_command ( struct pw_impl_node * node,
const struct spa_command * command )

Check if a node is active, Since 0.3.39.

◆ pw_impl_node_set_param()

int pw_impl_node_set_param ( struct pw_impl_node * node,
uint32_t id,
uint32_t flags,
const struct spa_pod * param )

Set a param on the node, Since 0.3.65.