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;
|
|
|
|
|
struct sample_spec spec;
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
int (*peek) (struct sink_input *i, struct memchunk *chunk, uint8_t *volume);
|
|
|
|
|
void (*drop) (struct sink_input *i, size_t length);
|
|
|
|
|
void (*kill) (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-15 17:05:03 +00:00
|
|
|
struct sink_input* sink_input_new(struct sink *s, struct sample_spec *spec, const char *name);
|
|
|
|
|
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-08 23:54:24 +00:00
|
|
|
|
|
|
|
|
#endif
|