PipeWire 1.4.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
node.h File Reference

spa/node/node.h More...

Go to the source code of this file.

Data Structures

struct  spa_node
 
struct  spa_node_info
 Node information structure. More...
 
struct  spa_port_info
 Port information structure. More...
 
struct  spa_result_node_error
 an error result More...
 
struct  spa_result_node_params
 the result of enum_params or port_enum_params. More...
 
struct  spa_node_events
 events from the spa_node. More...
 
struct  spa_node_callbacks
 Node callbacks. More...
 
struct  spa_node_methods
 Node methods. More...
 

Macros

#define SPA_API_NODE   static inline
 
#define SPA_TYPE_INTERFACE_Node   SPA_TYPE_INFO_INTERFACE_BASE "Node"
 
#define SPA_VERSION_NODE   0
 
#define SPA_NODE_CHANGE_MASK_FLAGS   (1u<<0)
 
#define SPA_NODE_CHANGE_MASK_PROPS   (1u<<1)
 
#define SPA_NODE_CHANGE_MASK_PARAMS   (1u<<2)
 
#define SPA_NODE_FLAG_RT   (1u<<0)
 node can do real-time processing
 
#define SPA_NODE_FLAG_IN_DYNAMIC_PORTS   (1u<<1)
 input ports can be added/removed
 
#define SPA_NODE_FLAG_OUT_DYNAMIC_PORTS   (1u<<2)
 output ports can be added/removed
 
#define SPA_NODE_FLAG_IN_PORT_CONFIG   (1u<<3)
 input ports can be reconfigured with PortConfig parameter
 
#define SPA_NODE_FLAG_OUT_PORT_CONFIG   (1u<<4)
 output ports can be reconfigured with PortConfig parameter
 
#define SPA_NODE_FLAG_NEED_CONFIGURE   (1u<<5)
 node needs configuration before it can be started.
 
#define SPA_NODE_FLAG_ASYNC   (1u<<6)
 the process function might not immediately produce or consume data but might offload the work to a worker thread.
 
#define SPA_NODE_INFO_INIT()
 
#define SPA_PORT_CHANGE_MASK_FLAGS   (1u<<0)
 
#define SPA_PORT_CHANGE_MASK_RATE   (1u<<1)
 
#define SPA_PORT_CHANGE_MASK_PROPS   (1u<<2)
 
#define SPA_PORT_CHANGE_MASK_PARAMS   (1u<<3)
 
#define SPA_PORT_FLAG_REMOVABLE   (1u<<0)
 port can be removed
 
#define SPA_PORT_FLAG_OPTIONAL   (1u<<1)
 processing on port is optional
 
#define SPA_PORT_FLAG_CAN_ALLOC_BUFFERS   (1u<<2)
 the port can allocate buffer data
 
#define SPA_PORT_FLAG_IN_PLACE   (1u<<3)
 the port can process data in-place and will need a writable input buffer
 
#define SPA_PORT_FLAG_NO_REF   (1u<<4)
 the port does not keep a ref on the buffer.
 
#define SPA_PORT_FLAG_LIVE   (1u<<5)
 output buffers from this port are timestamped against a live clock.
 
#define SPA_PORT_FLAG_PHYSICAL   (1u<<6)
 connects to some device
 
#define SPA_PORT_FLAG_TERMINAL   (1u<<7)
 data was not created from this port or will not be made available on another port
 
#define SPA_PORT_FLAG_DYNAMIC_DATA   (1u<<8)
 data pointer on buffers can be changed.
 
#define SPA_PORT_INFO_INIT()
 
#define SPA_RESULT_TYPE_NODE_ERROR   1
 
#define SPA_RESULT_TYPE_NODE_PARAMS   2
 
#define SPA_NODE_EVENT_INFO   0
 
#define SPA_NODE_EVENT_PORT_INFO   1
 
#define SPA_NODE_EVENT_RESULT   2
 
#define SPA_NODE_EVENT_EVENT   3
 
#define SPA_NODE_EVENT_NUM   4
 
#define SPA_VERSION_NODE_EVENTS   0
 
#define SPA_NODE_CALLBACK_READY   0
 
#define SPA_NODE_CALLBACK_REUSE_BUFFER   1
 
#define SPA_NODE_CALLBACK_XRUN   2
 
#define SPA_NODE_CALLBACK_NUM   3
 
#define SPA_VERSION_NODE_CALLBACKS   0
 
#define SPA_NODE_PARAM_FLAG_TEST_ONLY   (1 << 0)
 flags that can be passed to set_param and port_set_param functions
 
#define SPA_NODE_PARAM_FLAG_FIXATE   (1 << 1)
 Fixate the non-optional unset fields.
 
#define SPA_NODE_PARAM_FLAG_NEAREST   (1 << 2)
 Allow set fields to be rounded to the nearest allowed field value.
 
#define SPA_NODE_BUFFERS_FLAG_ALLOC   (1 << 0)
 flags to pass to the use_buffers functions
 
#define SPA_NODE_METHOD_ADD_LISTENER   0
 
#define SPA_NODE_METHOD_SET_CALLBACKS   1
 
#define SPA_NODE_METHOD_SYNC   2
 
#define SPA_NODE_METHOD_ENUM_PARAMS   3
 
#define SPA_NODE_METHOD_SET_PARAM   4
 
#define SPA_NODE_METHOD_SET_IO   5
 
#define SPA_NODE_METHOD_SEND_COMMAND   6
 
#define SPA_NODE_METHOD_ADD_PORT   7
 
#define SPA_NODE_METHOD_REMOVE_PORT   8
 
#define SPA_NODE_METHOD_PORT_ENUM_PARAMS   9
 
#define SPA_NODE_METHOD_PORT_SET_PARAM   10
 
#define SPA_NODE_METHOD_PORT_USE_BUFFERS   11
 
#define SPA_NODE_METHOD_PORT_SET_IO   12
 
#define SPA_NODE_METHOD_PORT_REUSE_BUFFER   13
 
#define SPA_NODE_METHOD_PROCESS   14
 
#define SPA_NODE_METHOD_NUM   15
 
#define SPA_VERSION_NODE_METHODS   0
 

Functions

SPA_API_NODE int spa_node_add_listener (struct spa_node *object, struct spa_hook *listener, const struct spa_node_events *events, void *data)
 
SPA_API_NODE int spa_node_set_callbacks (struct spa_node *object, const struct spa_node_callbacks *callbacks, void *data)
 
SPA_API_NODE int spa_node_sync (struct spa_node *object, int seq)
 
SPA_API_NODE int spa_node_enum_params (struct spa_node *object, int seq, uint32_t id, uint32_t start, uint32_t max, const struct spa_pod *filter)
 
SPA_API_NODE int spa_node_set_param (struct spa_node *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
 
SPA_API_NODE int spa_node_set_io (struct spa_node *object, uint32_t id, void *data, size_t size)
 
SPA_API_NODE int spa_node_send_command (struct spa_node *object, const struct spa_command *command)
 
SPA_API_NODE int spa_node_add_port (struct spa_node *object, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props)
 
SPA_API_NODE int spa_node_remove_port (struct spa_node *object, enum spa_direction direction, uint32_t port_id)
 
SPA_API_NODE int spa_node_port_enum_params (struct spa_node *object, int seq, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t start, uint32_t max, const struct spa_pod *filter)
 
SPA_API_NODE int spa_node_port_set_param (struct spa_node *object, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, const struct spa_pod *param)
 
SPA_API_NODE int spa_node_port_use_buffers (struct spa_node *object, enum spa_direction direction, uint32_t port_id, uint32_t flags, struct spa_buffer **buffers, uint32_t n_buffers)
 
SPA_API_NODE int spa_node_port_set_io (struct spa_node *object, enum spa_direction direction, uint32_t port_id, uint32_t id, void *data, size_t size)
 
SPA_API_NODE int spa_node_port_reuse_buffer (struct spa_node *object, uint32_t port_id, uint32_t buffer_id)
 
SPA_API_NODE int spa_node_port_reuse_buffer_fast (struct spa_node *object, uint32_t port_id, uint32_t buffer_id)
 
SPA_API_NODE int spa_node_process (struct spa_node *object)
 
SPA_API_NODE int spa_node_process_fast (struct spa_node *object)
 

Detailed Description