mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
Rework transport protocol
Use a more simple tranport protocol for the realtime data. Use a piece of shared memory and a socket where we use a 1byte read/write to trigger remote actions. Also use a ringbuffer for events.
This commit is contained in:
parent
7e46f9e3ad
commit
b774b99db5
22 changed files with 797 additions and 364 deletions
|
|
@ -630,6 +630,12 @@ pinos_connection_parse_message (PinosConnection *conn,
|
|||
connection_parse_port_command (conn, message);
|
||||
break;
|
||||
|
||||
case PINOS_MESSAGE_TRANSPORT_UPDATE:
|
||||
if (conn->in.size < sizeof (PinosMessageTransportUpdate))
|
||||
return false;
|
||||
memcpy (message, conn->in.data, sizeof (PinosMessageTransportUpdate));
|
||||
break;
|
||||
|
||||
case PINOS_MESSAGE_INVALID:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -781,6 +787,11 @@ pinos_connection_add_message (PinosConnection *conn,
|
|||
connection_add_port_command (conn, message);
|
||||
break;
|
||||
|
||||
case PINOS_MESSAGE_TRANSPORT_UPDATE:
|
||||
p = connection_add_message (conn, type, sizeof (PinosMessageTransportUpdate));
|
||||
memcpy (p, message, sizeof (PinosMessageTransportUpdate));
|
||||
break;
|
||||
|
||||
case PINOS_MESSAGE_INVALID:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue