add description field for sinks/sources
[profile/ivi/pulseaudio.git] / src / source.h
1 #ifndef foosourcehfoo
2 #define foosourcehfoo
3
4 struct pa_source;
5
6 #include <inttypes.h>
7 #include "core.h"
8 #include "sample.h"
9 #include "idxset.h"
10 #include "memblock.h"
11 #include "memchunk.h"
12 #include "sink.h"
13
14 struct pa_source {
15     uint32_t index;
16     
17     char *name, *description;
18     struct pa_module *owner;
19     struct pa_core *core;
20     struct pa_sample_spec sample_spec;
21     struct pa_idxset *outputs;
22     struct pa_sink *monitor_of;
23
24     void (*notify)(struct pa_source*source);
25     void *userdata;
26 };
27
28 struct pa_source* pa_source_new(struct pa_core *core, const char *name, int fail, const struct pa_sample_spec *spec);
29 void pa_source_free(struct pa_source *s);
30
31 /* Pass a new memory block to all output streams */
32 void pa_source_post(struct pa_source*s, struct pa_memchunk *b);
33
34 void pa_source_notify(struct pa_source *s);
35
36 char *pa_source_list_to_string(struct pa_core *c);
37
38 struct pa_source* pa_source_get_default(struct pa_core *c);
39
40 void pa_source_set_owner(struct pa_source *s, struct pa_module *m);
41
42 #endif