mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
impl-node: remove duplicated fields
Move all of the info to trigger a node into the target so that we can copy it around easily.
This commit is contained in:
parent
3b5fd0bd7a
commit
b74f2e19a7
6 changed files with 43 additions and 49 deletions
|
|
@ -890,8 +890,8 @@ static int impl_node_process(void *object)
|
|||
* directly */
|
||||
spa_log_warn(impl->log, "exported node activation");
|
||||
spa_system_clock_gettime(impl->data_system, CLOCK_MONOTONIC, &ts);
|
||||
n->rt.activation->status = PW_NODE_ACTIVATION_TRIGGERED;
|
||||
n->rt.activation->signal_time = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||
n->rt.target.activation->status = PW_NODE_ACTIVATION_TRIGGERED;
|
||||
n->rt.target.activation->signal_time = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||
|
||||
if (SPA_UNLIKELY(spa_system_eventfd_write(n->rt.target.system, n->rt.target.fd, 1) < 0))
|
||||
pw_log_warn("%p: write failed %m", impl);
|
||||
|
|
@ -1089,7 +1089,7 @@ static void node_on_data_fd_events(struct spa_source *source)
|
|||
node->name, node->info.id, cmd - 1);
|
||||
|
||||
if (impl->resource && impl->resource->version < 5) {
|
||||
struct pw_node_activation *a = node->rt.activation;
|
||||
struct pw_node_activation *a = node->rt.target.activation;
|
||||
int status = a->state[0].status;
|
||||
spa_log_trace_fp(impl->log, "%p: got ready %d", impl, status);
|
||||
spa_node_call_ready(&impl->callbacks, status);
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ static void clean_transport(struct node_data *data)
|
|||
}
|
||||
|
||||
pw_memmap_free(data->activation);
|
||||
data->node->rt.activation = data->node->activation->map->ptr;
|
||||
data->node->rt.target.activation = data->node->activation->map->ptr;
|
||||
|
||||
spa_system_close(data->data_system, data->rtwritefd);
|
||||
data->have_transport = false;
|
||||
|
|
@ -260,9 +260,9 @@ static int client_node_transport(void *_data,
|
|||
return -errno;
|
||||
}
|
||||
|
||||
node->rt.activation = data->activation->ptr;
|
||||
node->rt.position = &node->rt.activation->position;
|
||||
node->info.id = node->rt.activation->position.clock.id;
|
||||
node->rt.target.activation = data->activation->ptr;
|
||||
node->rt.position = &node->rt.target.activation->position;
|
||||
node->info.id = node->rt.target.activation->position.clock.id;
|
||||
|
||||
pw_log_debug("remote-node %p: fds:%d %d node:%u activation:%p",
|
||||
proxy, readfd, writefd, data->remote_id, data->activation->ptr);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ static void context_do_profile(void *data, struct pw_impl_node *node)
|
|||
struct impl *impl = data;
|
||||
struct spa_pod_builder b;
|
||||
struct spa_pod_frame f[2];
|
||||
struct pw_node_activation *a = node->rt.activation;
|
||||
struct pw_node_activation *a = node->rt.target.activation;
|
||||
struct spa_io_position *pos = &a->position;
|
||||
struct pw_node_target *t;
|
||||
int32_t filled;
|
||||
|
|
@ -230,7 +230,7 @@ static void context_do_profile(void *data, struct pw_impl_node *node)
|
|||
else if (n->rate.denom != 0)
|
||||
latency.denom = n->rate.denom;
|
||||
|
||||
na = n->rt.activation;
|
||||
na = n->rt.target.activation;
|
||||
spa_pod_builder_prop(&b, SPA_PROFILER_followerBlock, 0);
|
||||
spa_pod_builder_add_struct(&b,
|
||||
SPA_POD_Int(n->info.id),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue