diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-14 20:53:25 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-14 20:53:25 +0000 |
commit | 6e019795bff589ef0a867772975e34da78fffefb (patch) | |
tree | 46beb189b4048d516d92f6002f91135360342334 /polyp/source.h | |
parent | 8c6593dabf3253e20fead143855267570a403c9a (diff) |
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
Diffstat (limited to 'polyp/source.h')
-rw-r--r-- | polyp/source.h | 12 |
1 files changed, 11 insertions, 1 deletions
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); |