mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Remove direction
Direction is tied to the port id. Handle nodes with fixed ports.
This commit is contained in:
parent
7d8e2d53f7
commit
9485bd77e7
25 changed files with 246 additions and 165 deletions
|
|
@ -152,7 +152,6 @@ spa_audiomixer_node_send_command (SpaNode *node,
|
|||
SpaEventStateChange sc;
|
||||
|
||||
event.type = SPA_EVENT_TYPE_STATE_CHANGE;
|
||||
event.port_id = -1;
|
||||
event.data = ≻
|
||||
event.size = sizeof (sc);
|
||||
sc.state = SPA_NODE_STATE_STREAMING;
|
||||
|
|
@ -167,7 +166,6 @@ spa_audiomixer_node_send_command (SpaNode *node,
|
|||
SpaEventStateChange sc;
|
||||
|
||||
event.type = SPA_EVENT_TYPE_STATE_CHANGE;
|
||||
event.port_id = -1;
|
||||
event.data = ≻
|
||||
event.size = sizeof (sc);
|
||||
sc.state = SPA_NODE_STATE_PAUSED;
|
||||
|
|
@ -253,7 +251,6 @@ spa_audiomixer_node_get_port_ids (SpaNode *node,
|
|||
|
||||
static SpaResult
|
||||
spa_audiomixer_node_add_port (SpaNode *node,
|
||||
SpaDirection direction,
|
||||
uint32_t port_id)
|
||||
{
|
||||
SpaAudioMixer *this;
|
||||
|
|
@ -263,9 +260,6 @@ spa_audiomixer_node_add_port (SpaNode *node,
|
|||
|
||||
this = (SpaAudioMixer *) node->handle;
|
||||
|
||||
if (direction != SPA_DIRECTION_INPUT)
|
||||
return SPA_RESULT_INVALID_DIRECTION;
|
||||
|
||||
if (port_id >= MAX_PORTS)
|
||||
return SPA_RESULT_INVALID_PORT;
|
||||
|
||||
|
|
@ -571,11 +565,12 @@ static void
|
|||
pull_port (SpaAudioMixer *this, uint32_t port_id, SpaOutputInfo *info, size_t pull_size)
|
||||
{
|
||||
SpaEvent event;
|
||||
SpaEventNeedInput ni;
|
||||
|
||||
event.type = SPA_EVENT_TYPE_NEED_INPUT;
|
||||
event.port_id = port_id;
|
||||
event.size = 0;
|
||||
event.data = NULL;
|
||||
event.size = sizeof (ni);
|
||||
event.data = ∋
|
||||
ni.port_id = port_id;
|
||||
this->event_cb (&this->node, &event, this->user_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue