Improve state handling

Improve the state handling in v4l2
Send buffers in one message
Update design doc
This commit is contained in:
Wim Taymans 2016-08-25 17:07:40 +02:00
parent fbd6304663
commit 7e858ff694
8 changed files with 202 additions and 453 deletions

View file

@ -723,11 +723,16 @@ spa_control_builder_add_fd (SpaControlBuilder *builder,
bool close)
{
struct stack_builder *sb = SCSB (builder);
int index;
int index, i;
if (!is_valid_builder (builder) || fd < 0)
return -1;
for (i = 0; i < sb->control.n_fds; i++) {
if (sb->control.fds[i] == fd || sb->control.fds[i] == -fd)
return i;
}
if (sb->control.n_fds >= sb->control.max_fds) {
int new_size = sb->control.max_fds + 8;
fprintf (stderr, "builder %p: realloc control fds %d -> %d\n",