2004-06-08 23:54:24 +00:00
|
|
|
#ifndef foosourcehfoo
|
|
|
|
|
#define foosourcehfoo
|
|
|
|
|
|
|
|
|
|
struct source;
|
|
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#include "core.h"
|
|
|
|
|
#include "sample.h"
|
|
|
|
|
#include "idxset.h"
|
|
|
|
|
#include "memblock.h"
|
|
|
|
|
|
|
|
|
|
struct source {
|
|
|
|
|
uint32_t index;
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
char *name;
|
2004-06-08 23:54:24 +00:00
|
|
|
struct core *core;
|
|
|
|
|
struct sample_spec sample_spec;
|
2004-06-15 17:05:03 +00:00
|
|
|
struct idxset *outputs;
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void (*notify)(struct source*source);
|
2004-06-08 23:54:24 +00:00
|
|
|
void *userdata;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct source* source_new(struct core *core, const char *name, const struct sample_spec *spec);
|
|
|
|
|
void source_free(struct source *s);
|
|
|
|
|
|
|
|
|
|
/* Pass a new memory block to all output streams */
|
|
|
|
|
void source_post(struct source*s, struct memchunk *b);
|
|
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void source_notify(struct source *s);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#endif
|