mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -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
|
|
@ -25,6 +25,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <spa/defs.h>
|
||||
#include <spa/pod.h>
|
||||
|
||||
const char * pinos_split_walk (const char *str,
|
||||
const char *delimiter,
|
||||
|
|
@ -39,6 +40,15 @@ void pinos_free_strv (char **str);
|
|||
char * pinos_strip (char *str,
|
||||
const char *whitespace);
|
||||
|
||||
static inline SpaPOD *
|
||||
pinos_spa_pod_copy (const SpaPOD *pod)
|
||||
{
|
||||
return pod ? memcpy (malloc (SPA_POD_SIZE (pod)), pod, SPA_POD_SIZE (pod)) : NULL;
|
||||
}
|
||||
|
||||
#define spa_format_copy(f) ((SpaFormat*)pinos_spa_pod_copy(&(f)->pod))
|
||||
#define spa_props_copy(p) ((SpaProps*)pinos_spa_pod_copy(&(p)->pod))
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue