summaryrefslogtreecommitdiffstats
path: root/polyp/sink.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-14 20:53:25 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-14 20:53:25 +0000
commit6e019795bff589ef0a867772975e34da78fffefb (patch)
tree46beb189b4048d516d92f6002f91135360342334 /polyp/sink.h
parent8c6593dabf3253e20fead143855267570a403c9a (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/sink.h')
-rw-r--r--polyp/sink.h13
1 files changed, 12 insertions, 1 deletions
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);