mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
loop: add before_iterate signal
Add before_iterate signal and use it to flush data to clients.
This commit is contained in:
parent
9b93fd396a
commit
3e472c2dae
5 changed files with 60 additions and 19 deletions
|
|
@ -274,9 +274,12 @@ loop_iterate (SpaLoopControl *ctrl,
|
|||
int timeout)
|
||||
{
|
||||
PinosLoopImpl *impl = SPA_CONTAINER_OF (ctrl, PinosLoopImpl, control);
|
||||
PinosLoop *loop = &impl->this;
|
||||
struct epoll_event ep[32];
|
||||
int i, nfds, save_errno;
|
||||
|
||||
pinos_signal_emit (&loop->before_iterate, loop);
|
||||
|
||||
if (SPA_UNLIKELY (impl->pre_func))
|
||||
impl->pre_func (ctrl, impl->hook_data);
|
||||
|
||||
|
|
@ -592,6 +595,7 @@ pinos_loop_new (void)
|
|||
|
||||
spa_list_init (&impl->source_list);
|
||||
|
||||
pinos_signal_init (&this->before_iterate);
|
||||
pinos_signal_init (&this->destroy_signal);
|
||||
|
||||
impl->loop.size = sizeof (SpaLoop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue