mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
proper ref counting for more objects
some documentation update git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@124 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
22cb23eedb
commit
c17545108b
24 changed files with 251 additions and 143 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "polyplib-subscribe.h"
|
||||
#include "polyplib-internal.h"
|
||||
|
|
@ -65,10 +66,15 @@ struct pa_operation* pa_context_subscribe(struct pa_context *c, enum pa_subscrip
|
|||
t = pa_tagstruct_new(NULL, 0);
|
||||
pa_tagstruct_putu32(t, PA_COMMAND_SUBSCRIBE);
|
||||
pa_tagstruct_putu32(t, tag = c->ctag++);
|
||||
pa_tagstruct_putu32(t, cb ? m : 0);
|
||||
pa_tagstruct_putu32(t, m);
|
||||
pa_pstream_send_tagstruct(c->pstream, t);
|
||||
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, o);
|
||||
|
||||
return pa_operation_ref(o);
|
||||
}
|
||||
|
||||
void pa_context_set_subscribe_callback(struct pa_context *c, void (*cb)(struct pa_context *c, enum pa_subscription_event_type t, uint32_t index, void *userdata), void *userdata) {
|
||||
assert(c);
|
||||
c->subscribe_callback = cb;
|
||||
c->subscribe_userdata = userdata;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue