mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-24 07:00:05 -05:00
rt-poll: make small poll helper object
Remove the event loop code into a separate object so that we can share the same loop for multiple nodes. Some cleanups
This commit is contained in:
parent
b9409e297b
commit
7b53fa8685
11 changed files with 517 additions and 239 deletions
|
|
@ -987,12 +987,23 @@ parse_control (PinosStream *stream,
|
|||
case SPA_CONTROL_CMD_SET_FORMAT:
|
||||
{
|
||||
SpaControlCmdSetFormat p;
|
||||
SpaMemory *mem;
|
||||
void *data;
|
||||
size_t size;
|
||||
|
||||
if (spa_control_iter_parse_cmd (&it, &p) < 0)
|
||||
data = spa_control_iter_get_data (&it, &size);
|
||||
mem = spa_memory_alloc_size (SPA_MEMORY_POOL_LOCAL, data, size);
|
||||
spa_control_iter_set_data (&it, spa_memory_ensure_ptr (mem), size);
|
||||
|
||||
if (spa_control_iter_parse_cmd (&it, &p) < 0) {
|
||||
spa_memory_unref (&mem->mem);
|
||||
break;
|
||||
}
|
||||
|
||||
if (priv->format)
|
||||
spa_format_unref (priv->format);
|
||||
if (p.format)
|
||||
p.format->mem.mem = mem->mem;
|
||||
priv->format = p.format;
|
||||
|
||||
spa_debug_format (p.format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue