mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-19 07:00:03 -05:00
add proper refcounting to pa_asyncmsgq objects, to allow destruction from the dispatched callbacks
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1635 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f7b707b954
commit
c1c59b4675
4 changed files with 44 additions and 19 deletions
|
|
@ -49,13 +49,14 @@
|
|||
* latter waits for completion, synchronously. */
|
||||
|
||||
enum {
|
||||
PA_MESSAGE_SHUTDOWN /* A generic message to inform the handler of this queue to quit */
|
||||
PA_MESSAGE_SHUTDOWN = -1/* A generic message to inform the handler of this queue to quit */
|
||||
};
|
||||
|
||||
typedef struct pa_asyncmsgq pa_asyncmsgq;
|
||||
|
||||
pa_asyncmsgq* pa_asyncmsgq_new(size_t size);
|
||||
void pa_asyncmsgq_free(pa_asyncmsgq* q);
|
||||
pa_asyncmsgq* pa_asyncmsgq_ref(pa_asyncmsgq *q);
|
||||
void pa_asyncmsgq_unref(pa_asyncmsgq* q);
|
||||
|
||||
void pa_asyncmsgq_post(pa_asyncmsgq *q, pa_msgobject *object, int code, const void *userdata, int64_t offset, const pa_memchunk *memchunk, pa_free_cb_t userdata_free_cb);
|
||||
int pa_asyncmsgq_send(pa_asyncmsgq *q, pa_msgobject *object, int code, const void *userdata, int64_t offset, const pa_memchunk *memchunk);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue