summaryrefslogtreecommitdiffstats
path: root/src/sinkinput.h
blob: e3114d94c2b8416cb9d3ffd598c3f143a4a8c778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef foosinkinputhfoo
#define foosinkinputhfoo

#include <inttypes.h>

#include "sink.h"
#include "sample.h"
#include "memblockq.h"

struct sink_input {
    uint32_t index;

    char *name;
    struct sink *sink;
    struct pa_sample_spec sample_spec;
    uint32_t volume;
    
    int (*peek) (struct sink_input *i, struct memchunk *chunk);
    void (*drop) (struct sink_input *i, size_t length);
    void (*kill) (struct sink_input *i);
    uint32_t (*get_latency) (struct sink_input *i);

    void *userdata;
};

struct sink_input* sink_input_new(struct sink *s, struct pa_sample_spec *spec, const char *name);
void sink_input_free(struct sink_input* i);

/* Code that didn't create the input stream should call this function to
 * request destruction of it */
void sink_input_kill(struct sink_input *i);

uint32_t sink_input_get_latency(struct sink_input *i);
char *sink_input_list_to_string(struct core *c);




#endif