mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
node: add port and node params
Add a new struct spa_param_info that lists the available params on a node/port and if they are readable/writable/updated. We can use this to replace and improve the PARAM_List and also to notify property change and updates. Update elements and code to deal with this new param stuff. Add port and node info to most elements and signal changes. Use async enum_params in -inspect and use the param info to know which ones to enumerate. Use the port info to know what parameters to update in the remote-node.
This commit is contained in:
parent
3d25adc598
commit
499dd3ff22
52 changed files with 1979 additions and 1461 deletions
|
|
@ -55,9 +55,7 @@ struct spa_io_buffers {
|
|||
#define SPA_STATUS_OK 0
|
||||
#define SPA_STATUS_NEED_BUFFER (1<<0)
|
||||
#define SPA_STATUS_HAVE_BUFFER (1<<1)
|
||||
#define SPA_STATUS_FORMAT_CHANGED (1<<2)
|
||||
#define SPA_STATUS_PORT_CHANGED (1<<3)
|
||||
#define SPA_STATUS_PARAM_CHANGED (1<<4)
|
||||
#define SPA_STATUS_STOPPED (1<<2)
|
||||
int32_t status; /**< the status code */
|
||||
uint32_t buffer_id; /**< a buffer id */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,12 +52,16 @@ struct spa_node_info {
|
|||
uint32_t max_output_ports;
|
||||
#define SPA_NODE_CHANGE_MASK_FLAGS (1u<<0)
|
||||
#define SPA_NODE_CHANGE_MASK_PROPS (1u<<1)
|
||||
#define SPA_NODE_CHANGE_MASK_PARAMS (1u<<2)
|
||||
uint64_t change_mask;
|
||||
|
||||
#define SPA_NODE_FLAG_DYNAMIC_INPUT_PORTS (1u<<0) /**< input ports can be added/removed */
|
||||
#define SPA_NODE_FLAG_DYNAMIC_OUTPUT_PORTS (1u<<1) /**< output ports can be added/removed */
|
||||
#define SPA_NODE_FLAG_RT (1u<<2) /**< node can do real-time processing */
|
||||
uint32_t flags;
|
||||
struct spa_dict *props;
|
||||
struct spa_dict *props; /**< extra node properties */
|
||||
struct spa_param_info *params; /**< parameter information */
|
||||
uint32_t n_params; /**< number of items in \a params */
|
||||
};
|
||||
|
||||
#define SPA_NODE_INFO_INIT() (struct spa_node_info) { 0, }
|
||||
|
|
@ -71,6 +75,7 @@ struct spa_port_info {
|
|||
#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)
|
||||
uint64_t change_mask;
|
||||
|
||||
#define SPA_PORT_FLAG_REMOVABLE (1u<<0) /**< port can be removed */
|
||||
|
|
@ -90,6 +95,8 @@ struct spa_port_info {
|
|||
uint32_t flags; /**< port flags */
|
||||
uint32_t rate; /**< rate of sequence numbers on port */
|
||||
const struct spa_dict *props; /**< extra port properties */
|
||||
struct spa_param_info *params; /**< parameter information */
|
||||
uint32_t n_params; /**< number of items in \a params */
|
||||
};
|
||||
|
||||
#define SPA_PORT_INFO_INIT() (struct spa_port_info) { 0, }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue