From b8fcfd3b72eb08ea7fa759b5799a586fb90719d8 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Thu, 5 Oct 2023 14:49:46 -0400 Subject: [PATCH] add logs (#466) --- src/background-filter.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/background-filter.cpp b/src/background-filter.cpp index a7cb2def..bdc81546 100644 --- a/src/background-filter.cpp +++ b/src/background-filter.cpp @@ -285,6 +285,32 @@ void background_filter_update(void *data, obs_data_t *settings) bfree(kawaseBlurEffectPath); obs_leave_graphics(); + + // Log the currently selected options + obs_log(LOG_INFO, "Background Removal Filter Options:"); + // name of the source that the filter is attached to + obs_log(LOG_INFO, " Source: %s", obs_source_get_name(tf->source)); + obs_log(LOG_INFO, " Model: %s", tf->modelSelection.c_str()); + obs_log(LOG_INFO, " Inference Device: %s", tf->useGPU.c_str()); + obs_log(LOG_INFO, " Num Threads: %d", tf->numThreads); + obs_log(LOG_INFO, " Enable Threshold: %s", + tf->enableThreshold ? "true" : "false"); + obs_log(LOG_INFO, " Threshold: %f", tf->threshold); + obs_log(LOG_INFO, " Contour Filter: %f", tf->contourFilter); + obs_log(LOG_INFO, " Smooth Contour: %f", tf->smoothContour); + obs_log(LOG_INFO, " Feather: %f", tf->feather); + obs_log(LOG_INFO, " Mask Every X Frames: %d", tf->maskEveryXFrames); + obs_log(LOG_INFO, " Blur Background: %d", tf->blurBackground); + obs_log(LOG_INFO, " Enable Focal Blur: %s", + tf->enableFocalBlur ? "true" : "false"); + obs_log(LOG_INFO, " Blur Focus Point: %f", tf->blurFocusPoint); + obs_log(LOG_INFO, " Blur Focus Depth: %f", tf->blurFocusDepth); + obs_log(LOG_INFO, " Disabled: %s", tf->isDisabled ? "true" : "false"); +#ifdef _WIN32 + obs_log(LOG_INFO, " Model file path: %S", tf->modelFilepath); +#else + obs_log(LOG_INFO, " Model file path: %s", tf->modelFilepath); +#endif } void background_filter_activate(void *data)