mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
stream: use 2 eventfds for client <-> server signaling
This commit is contained in:
parent
f0aafb5b51
commit
7d1d3bd666
9 changed files with 80 additions and 56 deletions
|
|
@ -576,17 +576,22 @@ client_node_demarshal_done (void *object,
|
|||
PinosProxy *proxy = object;
|
||||
SpaPODIter it;
|
||||
PinosConnection *connection = proxy->context->protocol_private;
|
||||
int32_t idx;
|
||||
int fd;
|
||||
int32_t ridx, widx;
|
||||
int readfd, writefd;
|
||||
|
||||
if (!spa_pod_iter_struct (&it, data, size) ||
|
||||
!spa_pod_iter_get (&it,
|
||||
SPA_POD_TYPE_INT, &idx,
|
||||
SPA_POD_TYPE_INT, &ridx,
|
||||
SPA_POD_TYPE_INT, &widx,
|
||||
0))
|
||||
return false;
|
||||
|
||||
fd = pinos_connection_get_fd (connection, idx);
|
||||
((PinosClientNodeEvents*)proxy->implementation)->done (proxy, fd);
|
||||
readfd = pinos_connection_get_fd (connection, ridx);
|
||||
writefd = pinos_connection_get_fd (connection, widx);
|
||||
if (readfd == -1 || writefd == -1)
|
||||
return false;
|
||||
|
||||
((PinosClientNodeEvents*)proxy->implementation)->done (proxy, readfd, writefd);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue