mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
Implement subscription with a signal
Use a signal for subscription events Work on handling OOM errors and other errors.
This commit is contained in:
parent
1b66bbcffd
commit
85d375e4bb
32 changed files with 531 additions and 176 deletions
|
|
@ -97,6 +97,8 @@ main_loop_defer (PinosMainLoop *loop,
|
|||
spa_list_remove (&item->link);
|
||||
} else {
|
||||
item = malloc (sizeof (WorkItem));
|
||||
if (item == NULL)
|
||||
return SPA_ID_INVALID;
|
||||
}
|
||||
item->id = ++impl->counter;
|
||||
item->obj = obj;
|
||||
|
|
@ -189,10 +191,15 @@ pinos_main_loop_new (void)
|
|||
PinosMainLoop *this;
|
||||
|
||||
impl = calloc (1, sizeof (PinosMainLoopImpl));
|
||||
if (impl == NULL)
|
||||
return NULL;
|
||||
|
||||
pinos_log_debug ("main-loop %p: new", impl);
|
||||
this = &impl->this;
|
||||
|
||||
this->loop = pinos_loop_new ();
|
||||
if (this->loop == NULL)
|
||||
goto no_loop;
|
||||
|
||||
pinos_signal_init (&this->destroy_signal);
|
||||
|
||||
|
|
@ -208,6 +215,10 @@ pinos_main_loop_new (void)
|
|||
spa_list_init (&impl->free_list);
|
||||
|
||||
return this;
|
||||
|
||||
no_loop:
|
||||
free (impl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue