mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -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
|
|
@ -83,12 +83,14 @@ pinos_thread_main_loop_new (PinosLoop *loop,
|
|||
pthread_mutexattr_t attr;
|
||||
|
||||
impl = calloc (1, sizeof (PinosThreadMainLoopImpl));
|
||||
if (impl == NULL)
|
||||
return NULL;
|
||||
|
||||
this = &impl->this;
|
||||
pinos_log_debug ("thread-mainloop %p: new", impl);
|
||||
|
||||
this->loop = loop;
|
||||
if (name)
|
||||
this->name = strdup (name);
|
||||
this->name = name ? strdup (name) : NULL;
|
||||
|
||||
pinos_loop_set_hooks (loop,
|
||||
pre_hook,
|
||||
|
|
@ -97,7 +99,6 @@ pinos_thread_main_loop_new (PinosLoop *loop,
|
|||
|
||||
pinos_signal_init (&this->destroy_signal);
|
||||
|
||||
|
||||
pthread_mutexattr_init (&attr);
|
||||
pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init (&impl->lock, &attr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue