mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
port: simplify states
Remove the mix states, we can get rid of them when: The format is the same for all mixer ports. Set the existing format on new mixer ports. When the first format is set, the port becomes READY. When all mixer ports are cleared the port goes back to CONFIGURE. Only output ports allocate and manage buffers, input ports share the buffers of the peer output port on the link.
This commit is contained in:
parent
412c7f4cee
commit
dcbe94c55a
5 changed files with 157 additions and 189 deletions
|
|
@ -392,11 +392,11 @@ struct pw_node {
|
|||
};
|
||||
|
||||
struct pw_port_mix {
|
||||
struct spa_list link;
|
||||
struct pw_port *p;
|
||||
struct spa_graph_port port;
|
||||
struct spa_io_buffers *io;
|
||||
uint32_t id;
|
||||
enum pw_port_state state; /**< state of the port */
|
||||
};
|
||||
|
||||
struct pw_port_implementation {
|
||||
|
|
@ -464,11 +464,9 @@ struct pw_port {
|
|||
|
||||
int allocated:1; /**< if buffers are allocated */
|
||||
|
||||
struct spa_list mix_list; /**< list of \ref pw_port_mix */
|
||||
struct pw_map mix_port_map; /**< map from port_id from mixer */
|
||||
uint32_t n_mix;
|
||||
uint32_t n_mix_configure;
|
||||
uint32_t n_mix_ready;
|
||||
uint32_t n_mix_paused;
|
||||
|
||||
struct {
|
||||
struct spa_io_buffers io; /**< io area of the port */
|
||||
|
|
@ -772,7 +770,7 @@ int pw_port_is_linked(struct pw_port *port);
|
|||
|
||||
/** Set a param on a port \memberof pw_port, use SPA_ID_INVALID for mix_id to set
|
||||
* the param on all mix ports */
|
||||
int pw_port_set_param(struct pw_port *port, uint32_t mix_id,
|
||||
int pw_port_set_param(struct pw_port *port,
|
||||
uint32_t id, uint32_t flags, const struct spa_pod *param);
|
||||
|
||||
/** Use buffers on a port \memberof pw_port */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue