mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
code: Fix initialization order for constructors
Prevents some out-of-order events from occurring.
This commit is contained in:
parent
08544b4116
commit
1c7350edf7
6 changed files with 14 additions and 19 deletions
|
@ -183,8 +183,8 @@ autoframing_instance::autoframing_instance(obs_data_t* data, obs_source_t* self)
|
|||
|
||||
_track_mode(tracking_mode::SOLO), _track_frequency(1),
|
||||
|
||||
_motion_prediction(0.0), _motion_smoothing(0.0), _motion_smoothing_kalman_pnc(1.),
|
||||
_motion_smoothing_kalman_mnc(1.),
|
||||
_motion_smoothing(0.0), _motion_smoothing_kalman_pnc(1.), _motion_smoothing_kalman_mnc(1.),
|
||||
_motion_prediction(0.0),
|
||||
|
||||
_frame_stability(0.), _frame_stability_kalman(1.), _frame_padding_prc(), _frame_padding(), _frame_offset_prc(),
|
||||
_frame_offset(), _frame_aspect_ratio(0.0),
|
||||
|
|
|
@ -128,14 +128,10 @@ static constexpr std::string_view HELP_URL = "https://github.com/Xaymar/obs-Stre
|
|||
color_grade_instance::~color_grade_instance() {}
|
||||
|
||||
color_grade_instance::color_grade_instance(obs_data_t* data, obs_source_t* self)
|
||||
: obs::source_instance(data, self), _effect(),
|
||||
|
||||
_lift(), _gamma(), _gain(), _offset(), _tint_detection(), _tint_luma(), _tint_exponent(), _tint_low(),
|
||||
_tint_mid(), _tint_hig(), _correction(), _lut_enabled(true), _lut_depth(),
|
||||
|
||||
_cache_rt(), _cache_texture(), _cache_fresh(false),
|
||||
|
||||
_lut_initialized(false), _lut_dirty(true), _lut_producer(), _lut_consumer()
|
||||
: obs::source_instance(data, self), _effect(), _lift(), _gamma(), _gain(), _offset(), _tint_detection(),
|
||||
_tint_luma(), _tint_exponent(), _tint_low(), _tint_mid(), _tint_hig(), _correction(), _lut_enabled(true),
|
||||
_lut_depth(), _ccache_rt(), _ccache_texture(), _ccache_fresh(false), _lut_initialized(false), _lut_dirty(true),
|
||||
_lut_producer(), _lut_consumer(), _lut_rt(), _lut_texture(), _cache_rt(), _cache_texture(), _cache_fresh(false)
|
||||
{
|
||||
{
|
||||
auto gctx = streamfx::obs::gs::context();
|
||||
|
|
|
@ -90,8 +90,8 @@ std::string streamfx::filter::denoising::string(denoising_provider provider)
|
|||
denoising_instance::denoising_instance(obs_data_t* data, obs_source_t* self)
|
||||
: obs::source_instance(data, self),
|
||||
|
||||
_size(1, 1), _provider_ready(false), _provider(denoising_provider::INVALID), _provider_lock(), _provider_task(),
|
||||
_input(), _output()
|
||||
_size(1, 1), _provider(denoising_provider::INVALID), _provider_ui(denoising_provider::INVALID),
|
||||
_provider_ready(false), _provider_lock(), _provider_task(), _input(), _output()
|
||||
{
|
||||
D_LOG_DEBUG("Initializating... (Addr: 0x%" PRIuPTR ")", this);
|
||||
|
||||
|
|
|
@ -108,8 +108,8 @@ enum RotationOrder : int64_t {
|
|||
};
|
||||
|
||||
transform_instance::transform_instance(obs_data_t* data, obs_source_t* context)
|
||||
: obs::source_instance(data, context), _camera_mode(), _camera_fov(), _standard_effect(), _transform_effect(),
|
||||
_sampler(), _params(), _corners(), _cache_rendered(), _mipmap_enabled(), _source_rendered(), _source_size(),
|
||||
: obs::source_instance(data, context), _camera_mode(), _camera_fov(), _params(), _corners(), _standard_effect(),
|
||||
_transform_effect(), _sampler(), _cache_rendered(), _mipmap_enabled(), _source_rendered(), _source_size(),
|
||||
_update_mesh(true)
|
||||
{
|
||||
{
|
||||
|
|
|
@ -93,10 +93,9 @@ std::string streamfx::filter::upscaling::string(upscaling_provider provider)
|
|||
// Instance
|
||||
//------------------------------------------------------------------------------
|
||||
upscaling_instance::upscaling_instance(obs_data_t* data, obs_source_t* self)
|
||||
: obs::source_instance(data, self),
|
||||
|
||||
_in_size(1, 1), _out_size(1, 1), _provider_ready(false), _provider(upscaling_provider::INVALID), _provider_lock(),
|
||||
_provider_task(), _input(), _output(), _dirty(false)
|
||||
: obs::source_instance(data, self), _in_size(1, 1), _out_size(1, 1), _provider(upscaling_provider::INVALID),
|
||||
_provider_ui(upscaling_provider::INVALID), _provider_ready(false), _provider_lock(), _provider_task(), _input(),
|
||||
_output(), _dirty(false)
|
||||
{
|
||||
D_LOG_DEBUG("Initializating... (Addr: 0x%" PRIuPTR ")", this);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ streamfx::gfx::source_texture::~source_texture()
|
|||
}
|
||||
|
||||
streamfx::gfx::source_texture::source_texture(streamfx::obs::weak_source child, streamfx::obs::weak_source parent)
|
||||
: _child(child.lock()), _parent(parent.lock())
|
||||
: _parent(parent.lock()), _child(child.lock())
|
||||
{
|
||||
// Verify that 'child' and 'parent' exist.
|
||||
if (!_child || !_parent) {
|
||||
|
|
Loading…
Reference in a new issue