This commit is contained in:
Wim Taymans 2017-05-26 09:09:31 +02:00
parent 5b037661d9
commit 0f6b3a7cab
33 changed files with 652 additions and 673 deletions

View file

@ -35,17 +35,17 @@ struct pw_array {
#define PW_ARRAY_INIT(extend) { NULL, 0, 0, extend }
#define pw_array_get_len_s(a,s) ((a)->size / (s))
#define pw_array_get_unchecked_s(a,idx,s,t) SPA_MEMBER((a)->data,(idx)*(s),t)
#define pw_array_check_index_s(a,idx,s) ((idx) < pw_array_get_len(a,s))
#define pw_array_get_len_s(a,s) ((a)->size / (s))
#define pw_array_get_unchecked_s(a,idx,s,t) SPA_MEMBER((a)->data,(idx)*(s),t)
#define pw_array_check_index_s(a,idx,s) ((idx) < pw_array_get_len(a,s))
#define pw_array_get_len(a,t) pw_array_get_len_s(a,sizeof(t))
#define pw_array_get_unchecked(a,idx,t) pw_array_get_unchecked_s(a,idx,sizeof(t),t)
#define pw_array_check_index(a,idx,t) pw_array_check_index_s(a,idx,sizeof(t))
#define pw_array_get_len(a,t) pw_array_get_len_s(a,sizeof(t))
#define pw_array_get_unchecked(a,idx,t) pw_array_get_unchecked_s(a,idx,sizeof(t),t)
#define pw_array_check_index(a,idx,t) pw_array_check_index_s(a,idx,sizeof(t))
#define pw_array_for_each(pos, array) \
for (pos = (array)->data; \
(const uint8_t *) pos < ((const uint8_t *) (array)->data + (array)->size); \
#define pw_array_for_each(pos, array) \
for (pos = (array)->data; \
(const uint8_t *) pos < ((const uint8_t *) (array)->data + (array)->size); \
(pos)++)
static inline void pw_array_init(struct pw_array *arr, size_t extend)
@ -106,7 +106,7 @@ static inline void *pw_array_add_fixed(struct pw_array *arr, size_t size)
return p;
}
#define pw_array_add_ptr(a,p) \
#define pw_array_add_ptr(a,p) \
*((void**) pw_array_add(a, sizeof(void*))) = (p)
#ifdef __cplusplus

View file

@ -32,13 +32,13 @@ extern "C" {
#include <pipewire/client/introspect.h>
#define PW_CORE_METHOD_CLIENT_UPDATE 0
#define PW_CORE_METHOD_SYNC 1
#define PW_CORE_METHOD_GET_REGISTRY 2
#define PW_CORE_METHOD_CREATE_NODE 3
#define PW_CORE_METHOD_CREATE_CLIENT_NODE 4
#define PW_CORE_METHOD_UPDATE_TYPES 5
#define PW_CORE_METHOD_NUM 6
#define PW_CORE_METHOD_CLIENT_UPDATE 0
#define PW_CORE_METHOD_SYNC 1
#define PW_CORE_METHOD_GET_REGISTRY 2
#define PW_CORE_METHOD_CREATE_NODE 3
#define PW_CORE_METHOD_CREATE_CLIENT_NODE 4
#define PW_CORE_METHOD_UPDATE_TYPES 5
#define PW_CORE_METHOD_NUM 6
struct pw_core_methods {
void (*client_update) (void *object, const struct spa_dict * props);