From c7bd759cdb2b8f16693750f89ed781707a53e5a9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 10 Jul 2004 20:56:38 +0000 Subject: add description field for sinks/sources add owner field to all entities add client file to source outputs and sink inputs git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@59 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/protocol-native.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/protocol-native.c') diff --git a/src/protocol-native.c b/src/protocol-native.c index c7a7cce0..d6a5f9b2 100644 --- a/src/protocol-native.c +++ b/src/protocol-native.c @@ -48,6 +48,7 @@ struct connection { }; struct pa_protocol_native { + struct pa_module *module; int public; struct pa_core *core; struct pa_socket_server *server; @@ -110,6 +111,8 @@ static struct record_stream* record_stream_new(struct connection *c, struct pa_s s->source_output->push = source_output_push_cb; s->source_output->kill = source_output_kill_cb; s->source_output->userdata = s; + s->source_output->owner = c->protocol->module; + s->source_output->client = c->client; s->memblockq = pa_memblockq_new(maxlength, 0, base = pa_sample_size(ss), 0, 0); assert(s->memblockq); @@ -153,6 +156,8 @@ static struct playback_stream* playback_stream_new(struct connection *c, struct s->sink_input->kill = sink_input_kill_cb; s->sink_input->get_latency = sink_input_get_latency_cb; s->sink_input->userdata = s; + s->sink_input->owner = c->protocol->module; + s->sink_input->client = c->client; s->memblockq = pa_memblockq_new(maxlength, tlength, pa_sample_size(ss), prebuf, minreq); assert(s->memblockq); @@ -707,6 +712,8 @@ static void on_connection(struct pa_socket_server*s, struct pa_iochannel *io, vo assert(c->client); c->client->kill = client_kill_cb; c->client->userdata = c; + c->client->owner = p->module; + c->pstream = pa_pstream_new(p->core->mainloop, io); assert(c->pstream); @@ -729,7 +736,7 @@ static void on_connection(struct pa_socket_server*s, struct pa_iochannel *io, vo /*** module entry points ***/ -struct pa_protocol_native* pa_protocol_native_new(struct pa_core *core, struct pa_socket_server *server) { +struct pa_protocol_native* pa_protocol_native_new(struct pa_core *core, struct pa_socket_server *server, struct pa_module *m) { struct pa_protocol_native *p; assert(core && server); @@ -740,7 +747,8 @@ struct pa_protocol_native* pa_protocol_native_new(struct pa_core *core, struct p free(p); return NULL; } - + + p->module = m; p->public = 1; p->server = server; p->core = core; -- cgit