]> code.delx.au - pulseaudio/blob - src/source.h
add name registrar
[pulseaudio] / src / source.h
1 #ifndef foosourcehfoo
2 #define foosourcehfoo
3
4 struct source;
5
6 #include <inttypes.h>
7 #include "core.h"
8 #include "sample.h"
9 #include "idxset.h"
10 #include "memblock.h"
11
12 struct source {
13 uint32_t index;
14
15 char *name;
16 struct core *core;
17 struct pa_sample_spec sample_spec;
18 struct idxset *outputs;
19
20 void (*notify)(struct source*source);
21 void *userdata;
22 };
23
24 struct source* source_new(struct core *core, const char *name, int fail, const struct pa_sample_spec *spec);
25 void source_free(struct source *s);
26
27 /* Pass a new memory block to all output streams */
28 void source_post(struct source*s, struct memchunk *b);
29
30 void source_notify(struct source *s);
31
32 char *source_list_to_string(struct core *c);
33
34 struct source* source_get_default(struct core *c);
35
36 #endif