From e8c1ec40354ed5fe689e9fbf3e3968ea882df393 Mon Sep 17 00:00:00 2001 From: VodBox Date: Thu, 13 Jun 2019 12:30:07 +1200 Subject: [PATCH] libobs: Send activate and show signals to filters --- libobs/obs-source.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 9a00fa0d5..d6269cb13 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -1088,6 +1088,18 @@ void obs_source_video_tick(obs_source_t *source, float seconds) hide_source(source); } + if (source->filters.num) { + for (size_t i = source->filters.num; i > 0; i--) { + obs_source_t *filter = + source->filters.array[i - 1]; + if (now_showing) { + show_source(filter); + } else { + hide_source(filter); + } + } + } + source->showing = now_showing; } @@ -1100,6 +1112,18 @@ void obs_source_video_tick(obs_source_t *source, float seconds) deactivate_source(source); } + if (source->filters.num) { + for (size_t i = source->filters.num; i > 0; i--) { + obs_source_t *filter = + source->filters.array[i - 1]; + if (now_active) { + activate_source(filter); + } else { + deactivate_source(filter); + } + } + } + source->active = now_active; }