]> code.delx.au - pulseaudio/blob - src/sinkinput.h
f62070c487bf6865058705afbb0c44623c182bd7
[pulseaudio] / src / sinkinput.h
1 #ifndef foosinkinputhfoo
2 #define foosinkinputhfoo
3
4 #include <inttypes.h>
5
6 #include "sink.h"
7 #include "sample.h"
8 #include "memblockq.h"
9
10 struct sink_input {
11 uint32_t index;
12
13 char *name;
14 struct sink *sink;
15 struct sample_spec spec;
16 uint8_t volume;
17
18 int (*peek) (struct sink_input *i, struct memchunk *chunk);
19 void (*drop) (struct sink_input *i, size_t length);
20 void (*kill) (struct sink_input *i);
21 uint32_t (*get_latency) (struct sink_input *i);
22
23
24 void *userdata;
25 };
26
27 struct sink_input* sink_input_new(struct sink *s, struct sample_spec *spec, const char *name);
28 void sink_input_free(struct sink_input* i);
29
30 /* Code that didn't create the input stream should call this function to
31 * request destruction of it */
32 void sink_input_kill(struct sink_input *i);
33
34 uint32_t sink_input_get_latency(struct sink_input *i);
35 char *sink_input_list_to_string(struct core *c);
36
37 #endif