Follow the data/size argument order convention to make the api
more consistent.
This commit is contained in:
Wim Taymans 2017-11-20 15:26:44 +01:00
parent 7f931464e8
commit 5bebfe022b
50 changed files with 253 additions and 252 deletions

View file

@ -83,10 +83,10 @@ struct spa_data {
/** A Buffer */
struct spa_buffer {
uint32_t id; /**< the id of this buffer */
uint32_t n_metas; /**< number of metadata elements */
struct spa_meta *metas; /**< array of metadata */
uint32_t n_datas; /**< number of data members */
uint32_t n_metas; /**< number of metadata */
struct spa_data *datas; /**< array of data members */
uint32_t n_datas; /**< number of data members */
};
/** Find metadata in a buffer */

View file

@ -144,7 +144,7 @@ struct spa_monitor {
* first item and is updated with an opaque value that should be passed
* unmodified to get the next items.
*
* \param monito: a spa_monitor
* \param monitor a spa_monitor
* \param index state, use 0 for the first item
* \param item result item
* \param builder builder for \a item

View file

@ -272,18 +272,18 @@ struct spa_node {
* This function must be called from the main thread.
*
* \param node a #struct spa_node
* \param n_input_ports size of the \a input_ids array
* \param input_ids array to store the input stream ids
* \param n_output_ports size of the \a output_ids array
* \param n_input_ids size of the \a input_ids array
* \param output_ids array to store the output stream ids
* \param n_output_ids size of the \a output_ids array
* \return 0 on success
* -EINVAL when node is NULL
*/
int (*get_port_ids) (struct spa_node *node,
uint32_t n_input_ports,
uint32_t *input_ids,
uint32_t n_output_ports,
uint32_t *output_ids);
uint32_t n_input_ids,
uint32_t *output_ids,
uint32_t n_output_ids);
/**
* Make a new port with \a port_id. The caller should use get_port_ids() to

View file

@ -35,7 +35,8 @@ struct spa_pod_iter {
uint32_t offset;
};
static inline void spa_pod_iter_init(struct spa_pod_iter *iter, const void *data, uint32_t size, uint32_t offset)
static inline void spa_pod_iter_init(struct spa_pod_iter *iter,
const void *data, uint32_t size, uint32_t offset)
{
iter->data = data;
iter->size = size;

View file

@ -62,8 +62,8 @@ struct spa_source {
typedef int (*spa_invoke_func_t) (struct spa_loop *loop,
bool async,
uint32_t seq,
size_t size,
const void *data,
size_t size,
void *user_data);
/**
@ -89,8 +89,8 @@ struct spa_loop {
int (*invoke) (struct spa_loop *loop,
spa_invoke_func_t func,
uint32_t seq,
size_t size,
const void *data,
size_t size,
bool block,
void *user_data);
};

View file

@ -37,11 +37,11 @@ struct spa_dict_item {
};
struct spa_dict {
uint32_t n_items;
const struct spa_dict_item *items;
uint32_t n_items;
};
#define SPA_DICT_INIT(n_items,items) { n_items, items }
#define SPA_DICT_INIT(items,n_items) { items, n_items }
#define spa_dict_for_each(item, dict) \
for ((item) = (dict)->items; \

View file

@ -86,8 +86,8 @@ static inline int32_t spa_ringbuffer_get_read_index(struct spa_ringbuffer *rbuf,
*
* \param rbuf a #struct spa_ringbuffer
* \param buffer memory to read from
* \param size the size of \a memory
* \param offset offset in \a memory to read from
* \param size the size of \a buffer
* \param offset offset in \a buffer to read from
* \param data destination memory
* \param len number of bytes to read
*/
@ -136,8 +136,8 @@ static inline int32_t spa_ringbuffer_get_write_index(struct spa_ringbuffer *rbuf
*
* \param rbuf a spa_ringbuffer
* \param buffer memory to write to
* \param size the size of \a memory
* \param offset offset in \a memory to write to
* \param size the size of \a buffer
* \param offset offset in \a buffer to write to
* \param data source memory
* \param len number of bytes to write
*/