diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-07-31 22:44:53 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-07-31 22:44:53 +0000 |
commit | 0defdfb5607889c35fdefff4af31eb8b0ae0cbcf (patch) | |
tree | 8a8a93281aa32baa815185de5b2cb869f30376bf /src/pulsecore/core.c | |
parent | a82505e72f6680258b8162b846c98c64bea45c37 (diff) |
A lot of updates, all necessary to get the native protocol ported:
* add an int64_t argument to pa_asyncmsgq because it is very difficult to pass 64 values otherwise
* simplify subclassing in pa_object
* s/drop/unlink/ at some places
* port the native protocol to the lock-free core (not tested, compiles fine)
* move synchronisation of playback streams into pa_sink_input
* add "start_corked" field to pa_sink_input_new_data
* allow casting of NULL values in pa_object
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1562 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r-- | src/pulsecore/core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index a940bfc0..1a0e50bb 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -49,9 +49,9 @@ #include "core.h" -static PA_DEFINE_CHECK_TYPE(pa_core, core_check_type, pa_msgobject_check_type); +static PA_DEFINE_CHECK_TYPE(pa_core, pa_msgobject); -static int core_process_msg(pa_msgobject *o, int code, void *userdata, pa_memchunk *chunk) { +static int core_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) { pa_core *c = PA_CORE(o); pa_core_assert_ref(c); @@ -79,13 +79,14 @@ static void asyncmsgq_cb(pa_mainloop_api*api, pa_io_event* e, int fd, pa_io_even pa_msgobject *object; int code; void *data; + int64_t offset; pa_memchunk chunk; /* Check whether there is a message for us to process */ - while (pa_asyncmsgq_get(c->asyncmsgq, &object, &code, &data, &chunk, 0) == 0) { + while (pa_asyncmsgq_get(c->asyncmsgq, &object, &code, &data, &offset, &chunk, 0) == 0) { int ret; - ret = pa_asyncmsgq_dispatch(object, code, data, &chunk); + ret = pa_asyncmsgq_dispatch(object, code, data, offset, &chunk); pa_asyncmsgq_done(c->asyncmsgq, ret); } @@ -116,7 +117,7 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) { } } - c = pa_msgobject_new(pa_core, core_check_type); + c = pa_msgobject_new(pa_core); c->parent.parent.free = core_free; c->parent.process_msg = core_process_msg; |