mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
Improve init functions
spa_pod_id has uint32_t value
This commit is contained in:
parent
a092b9312a
commit
2f66e17180
10 changed files with 45 additions and 43 deletions
|
|
@ -137,19 +137,19 @@ struct pw_client_node_message_port_reuse_buffer {
|
|||
|
||||
#define PW_CLIENT_NODE_MESSAGE_TYPE(message) (((struct pw_client_node_message*)(message))->body.type.value)
|
||||
|
||||
#define PW_CLIENT_NODE_MESSAGE_INIT(ev) (struct pw_client_node_message) \
|
||||
{ { { sizeof(struct pw_client_node_message_body), SPA_POD_TYPE_STRUCT } }, \
|
||||
{ SPA_POD_INT_INIT(ev) } }
|
||||
#define PW_CLIENT_NODE_MESSAGE_INIT(message) (struct pw_client_node_message) \
|
||||
{ { { sizeof(struct pw_client_node_message_body), SPA_POD_TYPE_STRUCT } }, \
|
||||
{ SPA_POD_INT_INIT(message) } }
|
||||
|
||||
#define PW_CLIENT_NODE_MESSAGE_INIT_VA(type,size,message,...) (type) \
|
||||
{ { { size, SPA_POD_TYPE_STRUCT } }, \
|
||||
{ SPA_POD_INT_INIT(message), __VA_ARGS__ } } \
|
||||
#define PW_CLIENT_NODE_MESSAGE_INIT_FULL(type,size,message,...) (type) \
|
||||
{ { { size, SPA_POD_TYPE_STRUCT } }, \
|
||||
{ SPA_POD_INT_INIT(message), ##__VA_ARGS__ } } \
|
||||
|
||||
#define PW_CLIENT_NODE_MESSAGE_PORT_REUSE_BUFFER_INIT(port_id,buffer_id) \
|
||||
PW_CLIENT_NODE_MESSAGE_INIT_VA(struct pw_client_node_message_port_reuse_buffer, \
|
||||
sizeof(struct pw_client_node_message_port_reuse_buffer_body), \
|
||||
PW_CLIENT_NODE_MESSAGE_PORT_REUSE_BUFFER, \
|
||||
SPA_POD_INT_INIT(port_id), \
|
||||
#define PW_CLIENT_NODE_MESSAGE_PORT_REUSE_BUFFER_INIT(port_id,buffer_id) \
|
||||
PW_CLIENT_NODE_MESSAGE_INIT_FULL(struct pw_client_node_message_port_reuse_buffer, \
|
||||
sizeof(struct pw_client_node_message_port_reuse_buffer_body), \
|
||||
PW_CLIENT_NODE_MESSAGE_PORT_REUSE_BUFFER, \
|
||||
SPA_POD_INT_INIT(port_id), \
|
||||
SPA_POD_INT_INIT(buffer_id))
|
||||
|
||||
/** information about a buffer */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue