From c714d932b881098bf561670c559b53199efc89b1 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 23 Oct 2021 17:12:06 +0200 Subject: [PATCH] nvidia/vfx/effect: Fix 'run()' defaulting to async and expose internals --- source/nvidia/vfx/nvidia-vfx-effect.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source/nvidia/vfx/nvidia-vfx-effect.hpp b/source/nvidia/vfx/nvidia-vfx-effect.hpp index 461ae074..604ec136 100644 --- a/source/nvidia/vfx/nvidia-vfx-effect.hpp +++ b/source/nvidia/vfx/nvidia-vfx-effect.hpp @@ -35,6 +35,7 @@ namespace streamfx::nvidia::vfx { using namespace ::streamfx::nvidia; class effect { + protected: std::shared_ptr _nvcuda; std::shared_ptr _nvcvi; std::shared_ptr _nvvfx; @@ -112,40 +113,40 @@ namespace streamfx::nvidia::vfx { }; cv::result get(parameter_t param, std::string& value); - inline cv::result set_stream(parameter_t param, cuda::stream_t value) + inline cv::result set(parameter_t param, cuda::stream_t value) { return _nvvfx->NvVFX_SetCudaStream(_fx.get(), param, value); }; - inline cv::result get_stream(parameter_t param, cuda::stream_t& value) + inline cv::result get(parameter_t param, cuda::stream_t& value) { return _nvvfx->NvVFX_GetCudaStream(_fx.get(), param, &value); }; - inline cv::result set_stream(parameter_t param, std::shared_ptr value) + inline cv::result set(parameter_t param, std::shared_ptr value) { return _nvvfx->NvVFX_SetCudaStream(_fx.get(), param, value->get()); }; //cv::result get_stream(parameter_t param, std::shared_ptr& value); - inline cv::result set_image(parameter_t param, cv::image_t& value) + inline cv::result set(parameter_t param, cv::image_t& value) { return _nvvfx->NvVFX_SetImage(_fx.get(), param, &value); }; - inline cv::result get_image(parameter_t param, cv::image_t& value) + inline cv::result get(parameter_t param, cv::image_t& value) { return _nvvfx->NvVFX_GetImage(_fx.get(), param, &value); }; - inline cv::result set_image(parameter_t param, std::shared_ptr value) + inline cv::result set(parameter_t param, std::shared_ptr value) { return _nvvfx->NvVFX_SetImage(_fx.get(), param, value->get_image()); }; - inline cv::result get_image(parameter_t param, std::shared_ptr& value) + inline cv::result get(parameter_t param, std::shared_ptr& value) { return _nvvfx->NvVFX_GetImage(_fx.get(), param, value->get_image()); }; - inline cv::result set_image(parameter_t param, std::shared_ptr value) + inline cv::result set(parameter_t param, std::shared_ptr value) { return _nvvfx->NvVFX_SetImage(_fx.get(), param, value->get_image()); }; @@ -167,7 +168,7 @@ namespace streamfx::nvidia::vfx { inline cv::result run(bool async = false) { - return _nvvfx->NvVFX_Run(_fx.get(), async ? 0 : 1); + return _nvvfx->NvVFX_Run(_fx.get(), async ? 1 : 0); }; }; } // namespace streamfx::nvidia::vfx