]> code.delx.au - pulseaudio/blob - src/sinkinput.h
make a symbol in module-ptorocol-stub static
[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 #include "resampler.h"
10 #include "module.h"
11 #include "client.h"
12
13 struct pa_sink_input {
14 uint32_t index;
15
16 char *name;
17 struct pa_module *owner;
18 struct pa_client *client;
19 struct pa_sink *sink;
20 struct pa_sample_spec sample_spec;
21 uint32_t volume;
22
23 int (*peek) (struct pa_sink_input *i, struct pa_memchunk *chunk);
24 void (*drop) (struct pa_sink_input *i, size_t length);
25 void (*kill) (struct pa_sink_input *i);
26 uint32_t (*get_latency) (struct pa_sink_input *i);
27
28 void *userdata;
29
30 struct pa_memchunk resampled_chunk;
31 struct pa_resampler *resampler;
32 };
33
34 struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, const struct pa_sample_spec *spec);
35 void pa_sink_input_free(struct pa_sink_input* i);
36
37 /* Code that didn't create the input stream should call this function to
38 * request destruction of it */
39 void pa_sink_input_kill(struct pa_sink_input *i);
40
41 uint32_t pa_sink_input_get_latency(struct pa_sink_input *i);
42
43 int pa_sink_input_peek(struct pa_sink_input *i, struct pa_memchunk *chunk);
44 void pa_sink_input_drop(struct pa_sink_input *i, size_t length);
45
46 #endif