]> code.delx.au - pulseaudio/blob - src/sinkinput.h
partial implementation of native protocol
[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 void *userdata;
24 };
25
26 struct sink_input* sink_input_new(struct sink *s, struct sample_spec *spec, const char *name);
27 void sink_input_free(struct sink_input* i);
28
29 /* Code that didn't create the input stream should call this function to
30 * request destruction of it */
31 void sink_input_kill(struct sink_input *i);
32
33 uint32_t sink_input_get_latency(struct sink_input *i);
34 char *sink_input_list_to_string(struct core *c);
35
36 #endif