pulse: implement custom mainloop poll function

Implement setting a custom poll function. When there is a custom
function, just poll the epoll fd in it.

Fixes #276
This commit is contained in:
Wim Taymans 2020-09-07 15:50:58 +02:00
parent b6e84ded75
commit f541bf9037
2 changed files with 40 additions and 3 deletions

View file

@ -27,6 +27,7 @@
#include <spa/utils/ringbuffer.h>
#include <spa/param/audio/format-utils.h>
#include <pulse/mainloop.h>
#include <pulse/stream.h>
#include <pulse/format.h>
#include <pulse/subscribe.h>
@ -219,6 +220,10 @@ struct pa_mainloop {
int timeout;
int n_events;
int fd;
pa_poll_func poll_func;
void *poll_func_userdata;
};
struct param {