diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-06-14 02:28:36 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-08-07 06:51:36 -0700 |
commit | 5a0776f1fdc6b7780cd21d568150e804347a6f8a (patch) | |
tree | 646f1c6e73cd9d7cb63306a840879a0a64aebbed /src/modules/rtv | |
parent | 4eb5f55bb0087769e47d0dc745a831440c5041fe (diff) |
til: til_fb_fragment_t **fragment_ptr all the things
Preparatory commit for enabling cloneable/swappable fragments
There's an outstanding issue with the til_fb_page_t submission,
see comments. Doesn't matter for now since cloning doesn't happen
yet, but will need to be addressed before they do.
Diffstat (limited to 'src/modules/rtv')
-rw-r--r-- | src/modules/rtv/rtv.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index 3a8e7fc..13c8da9 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -63,8 +63,8 @@ typedef struct rtv_setup_t { static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks); static til_module_context_t * rtv_create_context(unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup); static void rtv_destroy_context(til_module_context_t *context); -static void rtv_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t *fragment); -static void rtv_finish_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment); +static void rtv_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr); +static void rtv_finish_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t **fragment_ptr); static int rtv_setup(const til_settings_t *settings, til_setting_t **res_setting, const til_setting_desc_t **res_desc, til_setup_t **res_setup); static rtv_setup_t rtv_default_setup = { @@ -268,7 +268,7 @@ static void rtv_destroy_context(til_module_context_t *context) } -static void rtv_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t *fragment) +static void rtv_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr) { rtv_context_t *ctxt = (rtv_context_t *)context; time_t now = time(NULL); @@ -279,13 +279,14 @@ static void rtv_render_fragment(til_module_context_t *context, unsigned ticks, u if (now >= ctxt->next_hide_caption) ctxt->caption = NULL; - til_module_render(ctxt->channel->module_ctxt, ticks, fragment); + til_module_render(ctxt->channel->module_ctxt, ticks, fragment_ptr); } -static void rtv_finish_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment) +static void rtv_finish_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t **fragment_ptr) { - rtv_context_t *ctxt = (rtv_context_t *)context; + rtv_context_t *ctxt = (rtv_context_t *)context; + til_fb_fragment_t *fragment = *fragment_ptr; if (!ctxt->caption) return; |