node: remove node state

Remove the node state. The state of the node is based on the state
of the ports, which can be derived directly from calling the port
methods. Track this state in the Port instead.
Add a mixer module that puts a mixer in from of audio sinks. This allows
multiple clients to play on one sink (still has some bugs). do some
fixes in the mixer and the scheduler to make this work.
This commit is contained in:
Wim Taymans 2017-04-08 20:33:54 +02:00
parent 28389e05f3
commit d3682067fa
30 changed files with 618 additions and 509 deletions

View file

@ -898,23 +898,6 @@ client_node_demarshal_port_update (void *object,
return true;
}
static bool
client_node_demarshal_state_change (void *object,
void *data,
size_t size)
{
PinosResource *resource = object;
SpaPODIter it;
uint32_t state;
if (!spa_pod_iter_struct (&it, data, size) ||
!spa_pod_iter_get (&it, SPA_POD_TYPE_INT, &state, 0))
return false;
((PinosClientNodeMethods*)resource->implementation)->state_change (resource, state);
return true;
}
static bool
client_node_demarshal_event (void *object,
void *data,
@ -1035,7 +1018,6 @@ const PinosInterface pinos_protocol_native_server_client_interface = {
static const PinosDemarshalFunc pinos_protocol_native_server_client_node_demarshal[] = {
&client_node_demarshal_update,
&client_node_demarshal_port_update,
&client_node_demarshal_state_change,
&client_node_demarshal_event,
&client_node_demarshal_destroy,
};
@ -1055,7 +1037,7 @@ static const PinosClientNodeEvents pinos_protocol_native_server_client_node_even
};
const PinosInterface pinos_protocol_native_server_client_node_interface = {
5, &pinos_protocol_native_server_client_node_demarshal,
4, &pinos_protocol_native_server_client_node_demarshal,
11, &pinos_protocol_native_server_client_node_events,
};