From 6e019795bff589ef0a867772975e34da78fffefb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 14 Sep 2004 20:53:25 +0000 Subject: add refernce counting for sinks, sources, sink-inputs and source-outputs git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@200 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/sink.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'polyp/sink.h') diff --git a/polyp/sink.h b/polyp/sink.h index 881e75d3..b34a736c 100644 --- a/polyp/sink.h +++ b/polyp/sink.h @@ -33,7 +33,15 @@ struct pa_sink; #define PA_MAX_INPUTS_PER_SINK 6 +enum pa_sink_state { + PA_SINK_RUNNING, + PA_SINK_DISCONNECTED +}; + struct pa_sink { + int ref; + enum pa_sink_state state; + uint32_t index; char *name, *description; @@ -52,7 +60,10 @@ struct pa_sink { }; struct pa_sink* pa_sink_new(struct pa_core *core, const char *name, int fail, const struct pa_sample_spec *spec); -void pa_sink_free(struct pa_sink* s); +void pa_sink_disconnect(struct pa_sink* s); +void pa_sink_unref(struct pa_sink*s); +struct pa_sink* pa_sink_ref(struct pa_sink *s); + int pa_sink_render(struct pa_sink*s, size_t length, struct pa_memchunk *result); void pa_sink_render_full(struct pa_sink *s, size_t length, struct pa_memchunk *result); -- cgit