mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-23 06:59:53 -05:00
simplify rt loops a bit by moving more code into pa_rtpoll. It is now possible to attach "work" functions to a pa_rtpoll_item, which will be called in each loop iteration. This allows us to hide the message processing in the RT loops and to drop the seperate sink_input->process hooks. Basically, only the driver-specific code remains in the RT loops.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1822 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f0b9dce32e
commit
3396b65f15
19 changed files with 182 additions and 272 deletions
|
|
@ -248,6 +248,27 @@ int pa_asyncmsgq_wait_for(pa_asyncmsgq *a, int code) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int pa_asyncmsgq_process_one(pa_asyncmsgq *a) {
|
||||
pa_msgobject *object;
|
||||
int code;
|
||||
void *data;
|
||||
pa_memchunk chunk;
|
||||
int64_t offset;
|
||||
int ret;
|
||||
|
||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||
|
||||
if (pa_asyncmsgq_get(a, &object, &code, &data, &offset, &chunk, 0) < 0)
|
||||
return 0;
|
||||
|
||||
pa_asyncmsgq_ref(a);
|
||||
ret = pa_asyncmsgq_dispatch(object, code, data, offset, &chunk);
|
||||
pa_asyncmsgq_done(a, ret);
|
||||
pa_asyncmsgq_unref(a);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pa_asyncmsgq_get_fd(pa_asyncmsgq *a) {
|
||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue