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:
Wim Taymans 2017-03-06 15:48:04 +01:00
parent 842d73ca4b
commit 41399b0b25
26 changed files with 1617 additions and 2501 deletions

View file

@ -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