mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
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
This commit is contained in:
parent
68148188fa
commit
1ba10cf848
17 changed files with 366 additions and 273 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <spa/memory.h>
|
||||
#include <spa/video/format.h>
|
||||
#include <spa/debug.h>
|
||||
#include <spa/queue.h>
|
||||
|
||||
typedef struct _SpaV4l2Source SpaV4l2Source;
|
||||
|
||||
|
|
@ -105,8 +106,7 @@ typedef struct {
|
|||
struct v4l2_requestbuffers reqbuf;
|
||||
SpaMemory *alloc_mem;
|
||||
V4l2Buffer *alloc_buffers;
|
||||
V4l2Buffer *ready;
|
||||
uint32_t ready_count;
|
||||
SpaQueue ready;
|
||||
|
||||
SpaPollFd fds[1];
|
||||
SpaPollItem poll;
|
||||
|
|
@ -683,16 +683,13 @@ spa_v4l2_source_node_port_pull_output (SpaNode *node,
|
|||
have_error = true;
|
||||
continue;
|
||||
}
|
||||
if (state->ready_count == 0) {
|
||||
|
||||
SPA_QUEUE_POP_HEAD (&state->ready, V4l2Buffer, next, b);
|
||||
if (b == NULL) {
|
||||
info[i].status = SPA_RESULT_UNEXPECTED;
|
||||
have_error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
b = state->ready;
|
||||
state->ready = b->next;
|
||||
state->ready_count--;
|
||||
|
||||
b->outstanding = true;
|
||||
|
||||
info[i].buffer_id = b->outbuf->id;
|
||||
|
|
@ -844,6 +841,8 @@ v4l2_source_init (const SpaHandleFactory *factory,
|
|||
this->props[1].props.prop_info = prop_info;
|
||||
reset_v4l2_source_props (&this->props[1]);
|
||||
|
||||
SPA_QUEUE_INIT (&this->state[0].ready);
|
||||
|
||||
this->state[0].info.flags = SPA_PORT_INFO_FLAG_LIVE;
|
||||
this->state[0].status.flags = SPA_PORT_STATUS_FLAG_NONE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue