mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
Work on node creation
Implements the basics of the PORT_UPDATE control message Add the ports to the proxy node with whe PORT_UPDATE control message. Let the proxy node check the events and create dbus objects based on added/removed ports.
This commit is contained in:
parent
ac5d22ec79
commit
de53315f6e
17 changed files with 350 additions and 215 deletions
|
|
@ -96,6 +96,10 @@ typedef struct {
|
|||
const SpaProps *props;
|
||||
} SpaControlCmdNodeUpdate;
|
||||
|
||||
#define SPA_CONTROL_CMD_NODE_UPDATE_MAX_INPUTS (1 << 0)
|
||||
#define SPA_CONTROL_CMD_NODE_UPDATE_MAX_OUTPUTS (1 << 1)
|
||||
#define SPA_CONTROL_CMD_NODE_UPDATE_PROPS (1 << 2)
|
||||
|
||||
/* SPA_CONTROL_CMD_PORT_UPDATE */
|
||||
typedef struct {
|
||||
uint32_t port_id;
|
||||
|
|
@ -107,6 +111,11 @@ typedef struct {
|
|||
const SpaPortInfo *info;
|
||||
} SpaControlCmdPortUpdate;
|
||||
|
||||
#define SPA_CONTROL_CMD_PORT_UPDATE_DIRECTION (1 << 0)
|
||||
#define SPA_CONTROL_CMD_PORT_UPDATE_POSSIBLE_FORMATS (1 << 1)
|
||||
#define SPA_CONTROL_CMD_PORT_UPDATE_PROPS (1 << 2)
|
||||
#define SPA_CONTROL_CMD_PORT_UPDATE_INFO (1 << 3)
|
||||
|
||||
/* SPA_CONTROL_CMD_PORT_REMOVED */
|
||||
typedef struct {
|
||||
uint32_t port_id;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ typedef struct _SpaEvent SpaEvent;
|
|||
*/
|
||||
typedef enum {
|
||||
SPA_EVENT_TYPE_INVALID = 0,
|
||||
SPA_EVENT_TYPE_PORT_ADDED,
|
||||
SPA_EVENT_TYPE_PORT_REMOVED,
|
||||
SPA_EVENT_TYPE_STATE_CHANGE,
|
||||
SPA_EVENT_TYPE_CAN_PULL_OUTPUT,
|
||||
SPA_EVENT_TYPE_CAN_PUSH_INPUT,
|
||||
|
|
@ -70,6 +72,10 @@ struct _SpaEvent {
|
|||
size_t size;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
SpaDirection direction;
|
||||
} SpaEventPortAdded;
|
||||
|
||||
typedef struct {
|
||||
uint32_t buffer_id;
|
||||
off_t offset;
|
||||
|
|
|
|||
|
|
@ -74,18 +74,18 @@ typedef struct {
|
|||
* @SPA_PORT_INFO_FLAG_NONE: no flags
|
||||
* @SPA_PORT_INFO_FLAG_REMOVABLE: port can be removed
|
||||
* @SPA_PORT_INFO_FLAG_OPTIONAL: processing on port is optional
|
||||
* @SPA_PORT_INFO_FLAG_CAN_GIVE_BUFFER: the port can give a buffer
|
||||
* @SPA_PORT_INFO_FLAG_CAN_USE_BUFFER: the port can use a provided buffer
|
||||
* @SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS: the port can give a buffer
|
||||
* @SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS: the port can use a provided buffer
|
||||
* @SPA_PORT_INFO_FLAG_IN_PLACE: the port can process data in-place and will need
|
||||
* a writable input buffer when no output buffer is specified.
|
||||
* a writable input buffer
|
||||
* @SPA_PORT_INFO_FLAG_NO_REF: the port does not keep a ref on the buffer
|
||||
*/
|
||||
typedef enum {
|
||||
SPA_PORT_INFO_FLAG_NONE = 0,
|
||||
SPA_PORT_INFO_FLAG_REMOVABLE = 1 << 0,
|
||||
SPA_PORT_INFO_FLAG_OPTIONAL = 1 << 1,
|
||||
SPA_PORT_INFO_FLAG_CAN_GIVE_BUFFER = 1 << 2,
|
||||
SPA_PORT_INFO_FLAG_CAN_USE_BUFFER = 1 << 3,
|
||||
SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS = 1 << 2,
|
||||
SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS = 1 << 3,
|
||||
SPA_PORT_INFO_FLAG_IN_PLACE = 1 << 4,
|
||||
SPA_PORT_INFO_FLAG_NO_REF = 1 << 5,
|
||||
} SpaPortInfoFlags;
|
||||
|
|
@ -103,10 +103,10 @@ typedef enum {
|
|||
*/
|
||||
typedef struct {
|
||||
SpaPortInfoFlags flags;
|
||||
unsigned int maxbuffering;
|
||||
uint64_t maxbuffering;
|
||||
uint64_t latency;
|
||||
SpaAllocParam **params;
|
||||
uint32_t n_params;
|
||||
unsigned int n_params;
|
||||
const char **features;
|
||||
} SpaPortInfo;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue