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/source.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'polyp/source.h') diff --git a/polyp/source.h b/polyp/source.h index 309b87e7..8b03c0d5 100644 --- a/polyp/source.h +++ b/polyp/source.h @@ -34,7 +34,15 @@ struct pa_source; #define PA_MAX_OUTPUTS_PER_SOURCE 16 +enum pa_source_state { + PA_SOURCE_RUNNING, + PA_SOURCE_DISCONNECTED, +}; + struct pa_source { + int ref; + enum pa_source_state state; + uint32_t index; char *name, *description; @@ -49,7 +57,9 @@ struct pa_source { }; struct pa_source* pa_source_new(struct pa_core *core, const char *name, int fail, const struct pa_sample_spec *spec); -void pa_source_free(struct pa_source *s); +void pa_source_disconnect(struct pa_source *s); +void pa_source_unref(struct pa_source *s); +struct pa_source* pa_source_ref(struct pa_source *c); /* Pass a new memory block to all output streams */ void pa_source_post(struct pa_source*s, struct pa_memchunk *b); -- cgit