mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
optimize data transport
Remove queue and ringbuffer between nodes. transfer the buffer id directly between the io areas when possible. Let only pinos send push or pull requests for now. Allow polling multiple fds, like how alsa wants it Remove port_id from events.
This commit is contained in:
parent
c8648eaf59
commit
7a9dc2c4fd
18 changed files with 265 additions and 214 deletions
|
|
@ -32,7 +32,7 @@
|
|||
typedef struct _SpaALSAState SpaALSASink;
|
||||
|
||||
static const char default_device[] = "default";
|
||||
static const uint32_t default_period_size = 128;
|
||||
static const uint32_t default_period_size = 32;
|
||||
static const uint32_t default_periods = 2;
|
||||
static const bool default_period_event = 0;
|
||||
|
||||
|
|
@ -691,6 +691,7 @@ spa_alsa_sink_node_process_input (SpaNode *node)
|
|||
|
||||
b = &this->buffers[input->buffer_id];
|
||||
if (!b->outstanding) {
|
||||
input->buffer_id = SPA_ID_INVALID;
|
||||
input->status = SPA_RESULT_INVALID_BUFFER_ID;
|
||||
return SPA_RESULT_ERROR;
|
||||
}
|
||||
|
|
@ -700,7 +701,9 @@ spa_alsa_sink_node_process_input (SpaNode *node)
|
|||
} else {
|
||||
spa_list_insert (this->ready.prev, &b->link);
|
||||
}
|
||||
//spa_log_debug (this->log, "alsa-source: got buffer %u", input->buffer_id);
|
||||
b->outstanding = false;
|
||||
input->buffer_id = SPA_ID_INVALID;
|
||||
input->status = SPA_RESULT_OK;
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue