Skip to content

Commit 7558ed1

Browse files
committed
always render the source with filters
1 parent a7aa566 commit 7558ed1

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ else()
66
cmake_minimum_required(VERSION 3.18)
77
endif()
88

9-
project(source-clone VERSION 0.1.3)
9+
project(source-clone VERSION 0.1.4)
1010
set(PROJECT_FULL_NAME "Source Clone")
1111

1212
# Set new UUIDs when you start to create a new plugin.

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@
7979
}
8080
},
8181
"name": "source-clone",
82-
"version": "0.1.3"
82+
"version": "0.1.4"
8383
}

source-clone.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,8 @@ void source_clone_video_render(void *data, gs_effect_t *effect)
363363
context->rendering = false;
364364
return;
365365
}
366-
const uint32_t source_flags = obs_source_get_output_flags(source);
367-
const bool custom_draw = (source_flags & OBS_SOURCE_CUSTOM_DRAW) != 0;
368-
const bool async = (source_flags & OBS_SOURCE_ASYNC) != 0;
369-
const bool video = (source_flags & OBS_SOURCE_VIDEO) != 0;
370366
if (context->buffer_frame == 0) {
371-
if (!custom_draw && !async && video)
372-
obs_source_default_render(source);
373-
else if (video)
374-
obs_source_video_render(source);
367+
obs_source_video_render(source);
375368
obs_source_release(source);
376369
context->rendering = false;
377370
return;
@@ -408,14 +401,10 @@ void source_clone_video_render(void *data, gs_effect_t *effect)
408401

409402
vec4_zero(&clear_color);
410403
gs_clear(GS_CLEAR_COLOR, &clear_color, 0.0f, 0);
411-
if (context->source_cx && context->source_cy && video) {
404+
if (context->source_cx && context->source_cy) {
412405
gs_ortho(0.0f, (float)context->source_cx, 0.0f,
413406
(float)context->source_cy, -100.0f, 100.0f);
414-
415-
if (!custom_draw && !async)
416-
obs_source_default_render(source);
417-
else
418-
obs_source_video_render(source);
407+
obs_source_video_render(source);
419408
}
420409
gs_texrender_end(context->render);
421410

0 commit comments

Comments
 (0)