mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
Rework serialization
Move serialization to the protocol, we now just send blocks of bytes over the connection and let the protocol deserialize them.
This commit is contained in:
parent
842d73ca4b
commit
41399b0b25
26 changed files with 1617 additions and 2501 deletions
|
|
@ -20,7 +20,6 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "pinos/client/pinos.h"
|
||||
#include "pinos/client/serialize.h"
|
||||
|
||||
#include "pinos/client/context.h"
|
||||
#include "pinos/client/subscribe.h"
|
||||
|
|
@ -254,8 +253,8 @@ pinos_node_info_update (PinosNodeInfo *info,
|
|||
info->input_formats = NULL;
|
||||
}
|
||||
for (i = 0; i < info->n_input_formats; i++) {
|
||||
size = pinos_serialize_format_get_size (update->input_formats[i]);
|
||||
info->input_formats[i] = size ? pinos_serialize_format_copy_into (malloc (size), update->input_formats[i]) : NULL;
|
||||
size = SPA_POD_SIZE (update->input_formats[i]);
|
||||
info->input_formats[i] = memcpy (malloc (size), update->input_formats[i], size);
|
||||
}
|
||||
}
|
||||
if (update->change_mask & (1 << 3))
|
||||
|
|
@ -271,8 +270,8 @@ pinos_node_info_update (PinosNodeInfo *info,
|
|||
info->output_formats = NULL;
|
||||
}
|
||||
for (i = 0; i < info->n_output_formats; i++) {
|
||||
size = pinos_serialize_format_get_size (update->output_formats[i]);
|
||||
info->output_formats[i] = size ? pinos_serialize_format_copy_into (malloc (size), update->output_formats[i]) : NULL;
|
||||
size = SPA_POD_SIZE (update->output_formats[i]);
|
||||
info->output_formats[i] = memcpy (malloc (size), update->output_formats[i], size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue