obs/source-factory: Add support for OBS Studio 27.x

Also improves the functionality logic slightly to be more in line with real behavior.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2022-05-11 05:33:38 +02:00
parent 9bbc35b293
commit e3c7b13d6f
15 changed files with 803 additions and 491 deletions

View file

@ -1086,7 +1086,7 @@ autoframing_factory::autoframing_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO; _info.output_flags = OBS_SOURCE_VIDEO;
set_resolution_enabled(true); support_size(true);
finish_setup(); finish_setup();
// Register proxy identifiers. // Register proxy identifiers.

View file

@ -604,7 +604,7 @@ blur_factory::blur_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO; _info.output_flags = OBS_SOURCE_VIDEO;
set_resolution_enabled(false); support_size(false);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-blur"); register_proxy("obs-stream-effects-filter-blur");
} }

View file

@ -584,7 +584,7 @@ color_grade_factory::color_grade_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO; _info.output_flags = OBS_SOURCE_VIDEO;
set_resolution_enabled(false); support_size(false);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-color-grade"); register_proxy("obs-stream-effects-filter-color-grade");
} }

View file

@ -550,7 +550,7 @@ denoising_factory::denoising_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW;
set_resolution_enabled(true); support_size(true);
finish_setup(); finish_setup();
// Proxies // Proxies

View file

@ -150,7 +150,7 @@ displacement_factory::displacement_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW | OBS_SOURCE_DEPRECATED | OBS_SOURCE_CAP_DISABLED; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW | OBS_SOURCE_DEPRECATED | OBS_SOURCE_CAP_DISABLED;
set_resolution_enabled(false); support_size(false);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-displacement"); register_proxy("obs-stream-effects-filter-displacement");
} }

View file

@ -455,11 +455,11 @@ dynamic_mask_factory::dynamic_mask_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW;
set_have_active_child_sources(true); support_active_child_sources(true);
set_have_child_sources(true); support_child_sources(true);
set_resolution_enabled(false); support_size(false);
set_activity_tracking_enabled(true); support_activity_tracking(true);
set_visibility_tracking_enabled(true); support_visibility_tracking(true);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-dynamic-mask"); register_proxy("obs-stream-effects-filter-dynamic-mask");
} }

View file

@ -570,7 +570,7 @@ sdf_effects_factory::sdf_effects_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO; _info.output_flags = OBS_SOURCE_VIDEO;
set_resolution_enabled(false); support_size(false);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-sdf-effects"); register_proxy("obs-stream-effects-filter-sdf-effects");
} }

View file

@ -179,8 +179,8 @@ shader_factory::shader_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO; _info.output_flags = OBS_SOURCE_VIDEO;
set_activity_tracking_enabled(true); support_activity_tracking(true);
set_visibility_tracking_enabled(true); support_visibility_tracking(true);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-shader"); register_proxy("obs-stream-effects-filter-shader");
} }

View file

@ -597,7 +597,7 @@ transform_factory::transform_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO; _info.output_flags = OBS_SOURCE_VIDEO;
set_resolution_enabled(false); support_size(false);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-filter-transform"); register_proxy("obs-stream-effects-filter-transform");
} }

View file

@ -550,7 +550,7 @@ upscaling_factory::upscaling_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW /*| OBS_SOURCE_SRGB*/; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW /*| OBS_SOURCE_SRGB*/;
set_resolution_enabled(true); support_size(true);
finish_setup(); finish_setup();
// Proxies // Proxies

View file

@ -554,7 +554,7 @@ virtual_greenscreen_factory::virtual_greenscreen_factory()
_info.type = OBS_SOURCE_TYPE_FILTER; _info.type = OBS_SOURCE_TYPE_FILTER;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW /*| OBS_SOURCE_SRGB*/; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW /*| OBS_SOURCE_SRGB*/;
set_resolution_enabled(true); support_size(true);
finish_setup(); finish_setup();
} }

File diff suppressed because it is too large Load diff

View file

@ -296,8 +296,8 @@ mirror_factory::mirror_factory()
_info.type = OBS_SOURCE_TYPE_INPUT; _info.type = OBS_SOURCE_TYPE_INPUT;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW | OBS_SOURCE_AUDIO; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW | OBS_SOURCE_AUDIO;
set_have_active_child_sources(true); support_active_child_sources(true);
set_have_child_sources(true); support_child_sources(true);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-source-mirror"); register_proxy("obs-stream-effects-source-mirror");
} }

View file

@ -132,8 +132,8 @@ shader_factory::shader_factory()
_info.type = OBS_SOURCE_TYPE_INPUT; _info.type = OBS_SOURCE_TYPE_INPUT;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW;
set_activity_tracking_enabled(true); support_activity_tracking(true);
set_visibility_tracking_enabled(true); support_visibility_tracking(true);
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-source-shader"); register_proxy("obs-stream-effects-source-shader");
} }

View file

@ -145,7 +145,7 @@ shader_factory::shader_factory()
_info.type = OBS_SOURCE_TYPE_TRANSITION; _info.type = OBS_SOURCE_TYPE_TRANSITION;
_info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW; _info.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW;
//set_activity_tracking_enabled(true); // Handled via transition start/stop //support_activity_tracking(true); // Handled via transition start/stop
finish_setup(); finish_setup();
register_proxy("obs-stream-effects-transition-shader"); register_proxy("obs-stream-effects-transition-shader");
} }