diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-09-02 12:05:05 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-09-02 12:05:05 +0200 |
commit | faaf84286b76423c2a187c94159b07ddb9c10c6f (patch) | |
tree | 9d6e74a8128408aaa1a4ddda5e12490bd476505c /src/modules/module-client-node/client-node.c | |
parent | ca34a751731e2e64af460faf6b8da846b684427c (diff) |
node: improve position and transport
Reorganize some things, let the clients update the segment info
in their own activation, then let the server merge it. This avoids
clients stepping on eachother. When looping through the clients,
copy the segment info when we encounter its owner.
Remove the list of segment owners to the activation. This is better
than in the activation because we can then just keep one list of
owners.
Remove the NONBLOCK flag from the eventfd so that we can do blocking
reads as well.
Just keep a reposition owner in the driver activation. This points
to the node that has the reposition info. This avoid complicated
synchronization to keep multiple nodes from stepping on eachother.
Now they can just prepare the reposition info in their activation and
set themselves as the reposition owner. The last one who succeeds
wins.
Diffstat (limited to 'src/modules/module-client-node/client-node.c')
-rw-r--r-- | src/modules/module-client-node/client-node.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/module-client-node/client-node.c b/src/modules/module-client-node/client-node.c index 61960a3a..4d773ea9 100644 --- a/src/modules/module-client-node/client-node.c +++ b/src/modules/module-client-node/client-node.c @@ -1254,8 +1254,8 @@ static void node_initialized(void *data) struct spa_system *data_system = impl->node.data_system; size_t size; - impl->fds[0] = spa_system_eventfd_create(data_system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK); - impl->fds[1] = spa_system_eventfd_create(data_system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK); + impl->fds[0] = spa_system_eventfd_create(data_system, SPA_FD_CLOEXEC); + impl->fds[1] = spa_system_eventfd_create(data_system, SPA_FD_CLOEXEC); impl->other_fds[0] = impl->fds[1]; impl->other_fds[1] = impl->fds[0]; node->data_source.fd = impl->fds[0]; |