mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-18 08:56:45 -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
|
|
@ -131,16 +131,26 @@ pinos_data_loop_new (void)
|
|||
PinosDataLoop *this;
|
||||
|
||||
impl = calloc (1, sizeof (PinosDataLoopImpl));
|
||||
if (impl == NULL)
|
||||
return NULL;
|
||||
|
||||
pinos_log_debug ("data-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);
|
||||
|
||||
impl->event = pinos_loop_add_event (this->loop,
|
||||
do_stop,
|
||||
impl);
|
||||
return this;
|
||||
|
||||
no_loop:
|
||||
free (impl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue