mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue