add index of method, event and callback defines

This commit is contained in:
Wim Taymans 2019-05-28 13:53:07 +02:00
parent 5299677f88
commit 7d1a833b82
2 changed files with 39 additions and 0 deletions

View file

@ -83,6 +83,12 @@ struct spa_result_device_params {
struct spa_pod *param;
};
#define SPA_DEVICE_EVENT_INFO 0
#define SPA_DEVICE_EVENT_RESULT 1
#define SPA_DEVICE_EVENT_EVENT 2
#define SPA_DEVICE_EVENT_OBJECT_INFO 3
#define SPA_DEVICE_EVENT_NUM 4
/**
* spa_device_events:
*
@ -108,6 +114,11 @@ struct spa_device_events {
const struct spa_device_object_info *info);
};
#define SPA_DEVICE_METHOD_ADD_LISTENER 0
#define SPA_DEVICE_METHOD_ENUM_PARAMS 1
#define SPA_DEVICE_METHOD_SET_PARAM 2
#define SPA_DEVICE_METHOD_NUM 3
/**
* spa_device_methods:
*/

View file

@ -125,6 +125,12 @@ struct spa_result_node_params {
struct spa_pod *param; /**< the result param */
};
#define SPA_NODE_EVENT_INFO 0
#define SPA_NODE_EVENT_PORT_INFO 1
#define SPA_NODE_EVENT_RESULT 2
#define SPA_NODE_EVENT_EVENT 3
#define SPA_NODE_EVENT_NUM 4
/** events from the spa_node.
*
* All event are called from the main thread and multiple
@ -171,6 +177,10 @@ struct spa_node_events {
void (*event) (void *data, const struct spa_event *event);
};
#define SPA_NODE_CALLBACK_READY 0
#define SPA_NODE_CALLBACK_REUSE_BUFFER 1
#define SPA_NODE_CALLBACK_NUM 2
/** Node callbacks
*
* Callbacks are called from the real-time data thread. Only
@ -211,6 +221,24 @@ struct spa_node_callbacks {
#define SPA_NODE_PARAM_FLAG_NEAREST (1 << 2) /* allow set fields to be rounded to the
* nearest allowed field value. */
#define SPA_NODE_METHOD_ADD_LISTENER 0
#define SPA_NODE_METHOD_SET_CALLBACKS 1
#define SPA_NODE_METHOD_SYNC 2
#define SPA_NODE_METHOD_ENUM_PARAMS 3
#define SPA_NODE_METHOD_SET_PARAM 4
#define SPA_NODE_METHOD_SET_IO 5
#define SPA_NODE_METHOD_SEND_COMMAND 6
#define SPA_NODE_METHOD_ADD_PORT 7
#define SPA_NODE_METHOD_REMOVE_PORT 8
#define SPA_NODE_METHOD_PORT_ENUM_PARAMS 9
#define SPA_NODE_METHOD_PORT_SET_PARAM 10
#define SPA_NODE_METHOD_PORT_USE_BUFFERS 11
#define SPA_NODE_METHOD_PORT_ALLOC_BUFFERS 12
#define SPA_NODE_METHOD_PORT_SET_IO 13
#define SPA_NODE_METHOD_PORT_REUSE_BUFFER 14
#define SPA_NODE_METHOD_PROCESS 15
#define SPA_NODE_METHOD_NUM 16
/**
* Node methods
*/