2004-06-15 17:05:03 +00:00
|
|
|
#ifndef foosinkinputhfoo
|
|
|
|
|
#define foosinkinputhfoo
|
2004-06-08 23:54:24 +00:00
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
|
|
|
|
|
#include "sink.h"
|
|
|
|
|
#include "sample.h"
|
|
|
|
|
#include "memblockq.h"
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
struct sink_input {
|
2004-06-08 23:54:24 +00:00
|
|
|
uint32_t index;
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
char *name;
|
2004-06-08 23:54:24 +00:00
|
|
|
struct sink *sink;
|
2004-06-23 23:17:30 +00:00
|
|
|
struct pa_sample_spec sample_spec;
|
2004-06-29 20:37:24 +00:00
|
|
|
uint32_t volume;
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-06-18 17:12:50 +00:00
|
|
|
int (*peek) (struct sink_input *i, struct memchunk *chunk);
|
2004-06-15 17:05:03 +00:00
|
|
|
void (*drop) (struct sink_input *i, size_t length);
|
|
|
|
|
void (*kill) (struct sink_input *i);
|
2004-06-18 17:12:50 +00:00
|
|
|
uint32_t (*get_latency) (struct sink_input *i);
|
2004-06-14 20:30:50 +00:00
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void *userdata;
|
2004-06-08 23:54:24 +00:00
|
|
|
};
|
|
|
|
|
|
2004-06-23 23:17:30 +00:00
|
|
|
struct sink_input* sink_input_new(struct sink *s, struct pa_sample_spec *spec, const char *name);
|
2004-06-15 17:05:03 +00:00
|
|
|
void sink_input_free(struct sink_input* i);
|
2004-06-14 20:30:50 +00:00
|
|
|
|
|
|
|
|
/* Code that didn't create the input stream should call this function to
|
|
|
|
|
* request destruction of it */
|
2004-06-15 17:05:03 +00:00
|
|
|
void sink_input_kill(struct sink_input *i);
|
2004-06-15 00:29:01 +00:00
|
|
|
|
2004-06-18 17:12:50 +00:00
|
|
|
uint32_t sink_input_get_latency(struct sink_input *i);
|
|
|
|
|
char *sink_input_list_to_string(struct core *c);
|
2004-06-08 23:54:24 +00:00
|
|
|
|
|
|
|
|
#endif
|