summaryrefslogtreecommitdiffstats
path: root/src/source.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/source.h')
-rw-r--r--src/source.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/source.h b/src/source.h
new file mode 100644
index 00000000..3beb3f96
--- /dev/null
+++ b/src/source.h
@@ -0,0 +1,30 @@
+#ifndef foosourcehfoo
+#define foosourcehfoo
+
+struct source;
+
+#include <inttypes.h>
+#include "core.h"
+#include "sample.h"
+#include "idxset.h"
+#include "memblock.h"
+
+struct source {
+ char *name;
+ uint32_t index;
+
+ struct core *core;
+ struct sample_spec sample_spec;
+ struct idxset *output_streams;
+
+ void (*link_change_callback)(struct source*source, void *userdata);
+ 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);
+
+#endif