summaryrefslogtreecommitdiff
path: root/spa/include
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2016-09-23 17:08:20 +0200
committerWim Taymans <wtaymans@redhat.com>2016-09-23 17:08:20 +0200
commit1ba10cf848ae6fb82e0283e6950fdae95524ea42 (patch)
treedd2ca4e0e00befb9f4dda6ca32d9b2efdb100cd2 /spa/include
parent68148188fa4588353ce4c2a392578a1eac8142a1 (diff)
Remove some events
Remove port added and port removed, we can get that info by inspecting the port ids. Remove data from ringbuffer, we just need the ringbuffer to keep track of the read and write positions. Handle async-complete in the main thread Work on async node initialization Work on using a queue as the link between nodes Make the daemon link things based on the node states Use queue helper in v4l2
Diffstat (limited to 'spa/include')
-rw-r--r--spa/include/spa/control.h10
-rw-r--r--spa/include/spa/node-event.h5
-rw-r--r--spa/include/spa/ringbuffer.h8
3 files changed, 6 insertions, 17 deletions
diff --git a/spa/include/spa/control.h b/spa/include/spa/control.h
index f5685016..18198506 100644
--- a/spa/include/spa/control.h
+++ b/spa/include/spa/control.h
@@ -59,10 +59,9 @@ typedef enum {
/* client to server */
SPA_CONTROL_CMD_NODE_UPDATE = 1,
SPA_CONTROL_CMD_PORT_UPDATE = 2,
- SPA_CONTROL_CMD_PORT_REMOVED = 3,
- SPA_CONTROL_CMD_NODE_STATE_CHANGE = 4,
+ SPA_CONTROL_CMD_NODE_STATE_CHANGE = 3,
- SPA_CONTROL_CMD_PORT_STATUS_CHANGE = 5,
+ SPA_CONTROL_CMD_PORT_STATUS_CHANGE = 4,
/* server to client */
SPA_CONTROL_CMD_ADD_PORT = 32,
@@ -109,11 +108,6 @@ typedef struct {
const SpaPortInfo *info;
} SpaControlCmdPortUpdate;
-/* SPA_CONTROL_CMD_PORT_REMOVED */
-typedef struct {
- uint32_t port_id;
-} SpaControlCmdPortRemoved;
-
/* SPA_CONTROL_CMD_PORT_STATUS_CHANGE */
/* SPA_CONTROL_CMD_NODE_STATE_CHANGE */
diff --git a/spa/include/spa/node-event.h b/spa/include/spa/node-event.h
index 6d176212..f9b6714e 100644
--- a/spa/include/spa/node-event.h
+++ b/spa/include/spa/node-event.h
@@ -34,8 +34,6 @@ typedef struct _SpaNodeEvent SpaNodeEvent;
* SpaEventType:
* @SPA_NODE_EVENT_TYPE_INVALID: invalid event, should be ignored
* @SPA_NODE_EVENT_TYPE_ASYNC_COMPLETE: an async operation completed
- * @SPA_NODE_EVENT_TYPE_PORT_ADDED: a new port is added
- * @SPA_NODE_EVENT_TYPE_PORT_REMOVED: a port is removed
* @SPA_NODE_EVENT_TYPE_HAVE_OUTPUT: emited when an async node has output that can be pulled
* @SPA_NODE_EVENT_TYPE_NEED_INPUT: emited when more data can be pushed to an async node
* @SPA_NODE_EVENT_TYPE_REUSE_BUFFER: emited when a buffer can be reused
@@ -47,12 +45,11 @@ typedef struct _SpaNodeEvent SpaNodeEvent;
* @SPA_NODE_EVENT_TYPE_ERROR: emited when error occured
* @SPA_NODE_EVENT_TYPE_BUFFERING: emited when buffering is in progress
* @SPA_NODE_EVENT_TYPE_REQUEST_REFRESH: emited when a keyframe refresh is needed
+ * @SPA_NODE_EVENT_TYPE_REQUEST_CLOCK_UPDATE: the element asks for a clock update
*/
typedef enum {
SPA_NODE_EVENT_TYPE_INVALID = 0,
SPA_NODE_EVENT_TYPE_ASYNC_COMPLETE,
- SPA_NODE_EVENT_TYPE_PORT_ADDED,
- SPA_NODE_EVENT_TYPE_PORT_REMOVED,
SPA_NODE_EVENT_TYPE_HAVE_OUTPUT,
SPA_NODE_EVENT_TYPE_NEED_INPUT,
SPA_NODE_EVENT_TYPE_REUSE_BUFFER,
diff --git a/spa/include/spa/ringbuffer.h b/spa/include/spa/ringbuffer.h
index 7b7320d1..a0b4e8c7 100644
--- a/spa/include/spa/ringbuffer.h
+++ b/spa/include/spa/ringbuffer.h
@@ -29,20 +29,18 @@ typedef struct _SpaRingbuffer SpaRingbuffer;
#include <spa/defs.h>
typedef struct {
- uint8_t *data;
- size_t len;
+ off_t offset;
+ size_t len;
} SpaRingbufferArea;
/**
* SpaRingbuffer:
- * @data: pointer to data
* @readindex: the current read index
* @writeindex: the current write index
* @size: the size of the ringbuffer
* @size_mask: mask if @size is power of 2
*/
struct _SpaRingbuffer {
- uint8_t *data;
volatile size_t readindex;
volatile size_t writeindex;
size_t size;
@@ -50,7 +48,7 @@ struct _SpaRingbuffer {
};
SpaResult spa_ringbuffer_init (SpaRingbuffer *rbuf,
- uint8_t *data, size_t size);
+ size_t size);
SpaResult spa_ringbuffer_clear (SpaRingbuffer *rbuf);