mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
thread-mq: Support a mainloop as thread/consumer
This is needed by the tunnel module rewrite, which runs pa_mainloop in the IO thread instead of pa_rtpoll. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
parent
7682cab60e
commit
9fa3466366
2 changed files with 68 additions and 13 deletions
|
|
@ -31,12 +31,15 @@
|
|||
* attached to the thread using pa_thread_mq_install(). */
|
||||
|
||||
typedef struct pa_thread_mq {
|
||||
pa_mainloop_api *mainloop;
|
||||
pa_mainloop_api *main_mainloop;
|
||||
pa_mainloop_api *thread_mainloop;
|
||||
pa_asyncmsgq *inq, *outq;
|
||||
pa_io_event *read_event, *write_event;
|
||||
pa_io_event *read_main_event, *write_main_event;
|
||||
pa_io_event *read_thread_event, *write_thread_event;
|
||||
} pa_thread_mq;
|
||||
|
||||
void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop, pa_rtpoll *rtpoll);
|
||||
void pa_thread_mq_init_thread_mainloop(pa_thread_mq *q, pa_mainloop_api *main_mainloop, pa_mainloop_api *thread_mainloop);
|
||||
void pa_thread_mq_done(pa_thread_mq *q);
|
||||
|
||||
/* Install the specified pa_thread_mq object for the current thread */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue