mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
types: remap ids
Remap ids between client and server
This commit is contained in:
parent
be528ba7c2
commit
c7333c46cc
10 changed files with 82 additions and 3 deletions
|
|
@ -311,7 +311,7 @@ core_update_types (void *object,
|
|||
|
||||
for (i = 0; i < n_types; i++, first_id++) {
|
||||
uint32_t this_id = spa_type_map_get_id (this->type.map, types[i]);
|
||||
if (!pinos_map_insert_at (&client->types, first_id, SPA_UINT32_TO_PTR (this_id)))
|
||||
if (!pinos_map_insert_at (&client->types, first_id, PINOS_MAP_ID_TO_PTR (this_id)))
|
||||
pinos_log_error ("can't add type for client");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ do_pull (PinosNode *this)
|
|||
|
||||
/* pull */
|
||||
*po = *pi;
|
||||
pi->buffer_id = SPA_ID_INVALID;
|
||||
|
||||
pinos_log_trace ("node %p: process output %p %d", outport->node, po, po->buffer_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -807,6 +807,7 @@ client_node_demarshal_update (void *object,
|
|||
const SpaProps *props;
|
||||
|
||||
if (!spa_pod_iter_struct (&it, data, size) ||
|
||||
!pinos_pod_remap_data (SPA_POD_TYPE_STRUCT, data, size, &resource->client->types) ||
|
||||
!spa_pod_iter_get (&it,
|
||||
SPA_POD_TYPE_INT, &change_mask,
|
||||
SPA_POD_TYPE_INT, &max_input_ports,
|
||||
|
|
@ -833,6 +834,7 @@ client_node_demarshal_port_update (void *object,
|
|||
SpaPOD *ipod;
|
||||
|
||||
if (!spa_pod_iter_struct (&it, data, size) ||
|
||||
!pinos_pod_remap_data (SPA_POD_TYPE_STRUCT, data, size, &resource->client->types) ||
|
||||
!spa_pod_iter_get (&it,
|
||||
SPA_POD_TYPE_INT, &direction,
|
||||
SPA_POD_TYPE_INT, &port_id,
|
||||
|
|
@ -908,6 +910,7 @@ client_node_demarshal_event (void *object,
|
|||
SpaEvent *event;
|
||||
|
||||
if (!spa_pod_iter_struct (&it, data, size) ||
|
||||
!pinos_pod_remap_data (SPA_POD_TYPE_STRUCT, data, size, &resource->client->types) ||
|
||||
!spa_pod_iter_get (&it, SPA_POD_TYPE_OBJECT, &event, 0))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue