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-07-03 00:19:17 +00:00
|
|
|
#include "resampler.h"
|
2004-07-10 20:56:38 +00:00
|
|
|
#include "module.h"
|
|
|
|
|
#include "client.h"
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_sink_input {
|
2004-06-08 23:54:24 +00:00
|
|
|
uint32_t index;
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
char *name;
|
2004-07-10 20:56:38 +00:00
|
|
|
struct pa_module *owner;
|
|
|
|
|
struct pa_client *client;
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_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-07-03 23:35:12 +00:00
|
|
|
int (*peek) (struct pa_sink_input *i, struct pa_memchunk *chunk);
|
|
|
|
|
void (*drop) (struct pa_sink_input *i, size_t length);
|
|
|
|
|
void (*kill) (struct pa_sink_input *i);
|
|
|
|
|
uint32_t (*get_latency) (struct pa_sink_input *i);
|
2004-06-14 20:30:50 +00:00
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void *userdata;
|
2004-07-03 00:19:17 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_memchunk resampled_chunk;
|
|
|
|
|
struct pa_resampler *resampler;
|
2004-06-08 23:54:24 +00:00
|
|
|
};
|
|
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, const struct pa_sample_spec *spec);
|
|
|
|
|
void pa_sink_input_free(struct pa_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-07-03 23:35:12 +00:00
|
|
|
void pa_sink_input_kill(struct pa_sink_input *i);
|
2004-06-15 00:29:01 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
uint32_t pa_sink_input_get_latency(struct pa_sink_input *i);
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
int pa_sink_input_peek(struct pa_sink_input *i, struct pa_memchunk *chunk);
|
|
|
|
|
void pa_sink_input_drop(struct pa_sink_input *i, size_t length);
|
2004-07-02 18:47:03 +00:00
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#endif
|