mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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
This commit is contained in:
parent
8c6593dabf
commit
6e019795bf
27 changed files with 426 additions and 132 deletions
13
polyp/sink.h
13
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue