summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/til_stream.c22
-rw-r--r--src/til_stream.h4
2 files changed, 26 insertions, 0 deletions
diff --git a/src/til_stream.c b/src/til_stream.c
index 8fd4b07..3f220fb 100644
--- a/src/til_stream.c
+++ b/src/til_stream.c
@@ -100,6 +100,7 @@ typedef struct til_stream_t {
unsigned audio_controlled:1;
til_stream_pipe_t *pipe_buckets[TIL_STREAM_PIPE_BUCKETS_COUNT];
til_stream_module_context_t *module_context_buckets[TIL_STREAM_CTXT_BUCKETS_COUNT];
+ til_module_context_t *module_context;
} til_stream_t;
@@ -791,3 +792,24 @@ void til_stream_fprint_module_contexts(til_stream_t *stream, FILE *out)
(void) til_stream_for_each_module_context(stream, til_stream_fprint_module_context_cb, out);
fprintf(out, "\n");
}
+
+
+void til_stream_set_module_context(til_stream_t *stream, til_module_context_t *context)
+{
+ assert(stream);
+ assert(context);
+
+ /* TODO: it feels like this should probably take a reference */
+ stream->module_context = context;
+}
+
+
+void til_stream_render(til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr)
+{
+ assert(stream);
+ assert(fragment_ptr);
+
+ stream->frame++;
+
+ til_module_render(stream->module_context, stream, ticks, fragment_ptr);
+}
diff --git a/src/til_stream.h b/src/til_stream.h
index a0dde31..bae5abb 100644
--- a/src/til_stream.h
+++ b/src/til_stream.h
@@ -25,6 +25,7 @@
#include "til_setup.h"
typedef struct til_audio_context_t til_audio_context_t;
+typedef struct til_fb_fragment_t til_fb_fragment_t;
typedef struct til_stream_t til_stream_t;
typedef struct til_stream_module_context_t til_stream_module_context_t;
typedef struct til_stream_pipe_t til_stream_pipe_t;
@@ -80,4 +81,7 @@ int til_stream_find_module_contexts(til_stream_t *stream, const char *path, size
unsigned til_stream_gc_module_contexts(til_stream_t *stream);
void til_stream_fprint_module_contexts(til_stream_t *stream, FILE *out);
+void til_stream_set_module_context(til_stream_t *stream, til_module_context_t *context);
+void til_stream_render(til_stream_t *stream, unsigned ticks, til_fb_fragment_t **fragment_ptr);
+
#endif
© All Rights Reserved