diff --git a/CMakeLists.txt b/CMakeLists.txt index 26470484..cadd2b66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang" "${CMAKE_CURRENT # CMake Modules include("util") -if(EXISTS "${CMAKE_SOURCE_DIR}/cmake/Clang/Clang.cmake") +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Clang/Clang.cmake") include("Clang") set(HAVE_CLANG ON) endif() diff --git a/source/encoders/codecs/prores.hpp b/source/encoders/codecs/prores.hpp index 78a04803..668a425c 100644 --- a/source/encoders/codecs/prores.hpp +++ b/source/encoders/codecs/prores.hpp @@ -34,18 +34,18 @@ namespace encoder::codec::prores { enum class profile : std::int32_t { - APCO = 0, + APCO = 0, Y422_PROXY = APCO, - APCS = 1, - Y422_LT = APCS, - APCN = 2, - Y422 = APCN, - APCH = 3, - Y422_HQ = APCH, - AP4H = 4, - Y4444 = AP4H, - AP4X = 5, - Y4444_XQ = AP4X, + APCS = 1, + Y422_LT = APCS, + APCN = 2, + Y422 = APCN, + APCH = 3, + Y422_HQ = APCH, + AP4H = 4, + Y4444 = AP4H, + AP4X = 5, + Y4444_XQ = AP4X, _COUNT, }; } diff --git a/source/encoders/handlers/nvenc_h264_handler.cpp b/source/encoders/handlers/nvenc_h264_handler.cpp index 47001785..41023c9c 100644 --- a/source/encoders/handlers/nvenc_h264_handler.cpp +++ b/source/encoders/handlers/nvenc_h264_handler.cpp @@ -20,12 +20,12 @@ // SOFTWARE. #include "nvenc_h264_handler.hpp" +#include "strings.hpp" #include "../codecs/h264.hpp" #include "../ffmpeg-encoder.hpp" #include "ffmpeg/tools.hpp" #include "nvenc_shared.hpp" #include "plugin.hpp" -#include "strings.hpp" #include "utility.hpp" extern "C" { diff --git a/source/encoders/handlers/nvenc_hevc_handler.cpp b/source/encoders/handlers/nvenc_hevc_handler.cpp index b5d53522..2a27bca2 100644 --- a/source/encoders/handlers/nvenc_hevc_handler.cpp +++ b/source/encoders/handlers/nvenc_hevc_handler.cpp @@ -20,12 +20,12 @@ // SOFTWARE. #include "nvenc_hevc_handler.hpp" +#include "strings.hpp" #include "../codecs/hevc.hpp" #include "../ffmpeg-encoder.hpp" #include "ffmpeg/tools.hpp" #include "nvenc_shared.hpp" #include "plugin.hpp" -#include "strings.hpp" #include "utility.hpp" extern "C" { diff --git a/source/encoders/handlers/nvenc_shared.cpp b/source/encoders/handlers/nvenc_shared.cpp index 1f19e7f4..13311012 100644 --- a/source/encoders/handlers/nvenc_shared.cpp +++ b/source/encoders/handlers/nvenc_shared.cpp @@ -20,12 +20,12 @@ // SOFTWARE. #include "nvenc_shared.hpp" +#include "strings.hpp" #include #include "../codecs/hevc.hpp" #include "../ffmpeg-encoder.hpp" #include "ffmpeg/tools.hpp" #include "plugin.hpp" -#include "strings.hpp" #include "utility.hpp" extern "C" { diff --git a/source/filters/filter-blur.cpp b/source/filters/filter-blur.cpp index 3b2a6a9b..1659fe29 100644 --- a/source/filters/filter-blur.cpp +++ b/source/filters/filter-blur.cpp @@ -18,6 +18,7 @@ */ #include "filter-blur.hpp" +#include "strings.hpp" #include #include #include @@ -30,7 +31,6 @@ #include "gfx/blur/gfx-blur-gaussian.hpp" #include "obs/gs/gs-helper.hpp" #include "obs/obs-source-tracker.hpp" -#include "strings.hpp" #include "util-math.hpp" // OBS diff --git a/source/filters/filter-color-grade.cpp b/source/filters/filter-color-grade.cpp index 88bf31c3..16a76595 100644 --- a/source/filters/filter-color-grade.cpp +++ b/source/filters/filter-color-grade.cpp @@ -18,8 +18,8 @@ */ #include "filter-color-grade.hpp" -#include #include "strings.hpp" +#include #include "util-math.hpp" // OBS diff --git a/source/filters/filter-color-grade.hpp b/source/filters/filter-color-grade.hpp index 6a133484..91972bd2 100644 --- a/source/filters/filter-color-grade.hpp +++ b/source/filters/filter-color-grade.hpp @@ -18,13 +18,13 @@ */ #pragma once -#include "plugin.hpp" #include #include "obs/gs/gs-mipmapper.hpp" #include "obs/gs/gs-rendertarget.hpp" #include "obs/gs/gs-texture.hpp" #include "obs/gs/gs-vertexbuffer.hpp" #include "obs/obs-source-factory.hpp" +#include "plugin.hpp" namespace filter::color_grade { enum class detection_mode { diff --git a/source/filters/filter-displacement.cpp b/source/filters/filter-displacement.cpp index da48b22d..19455ead 100644 --- a/source/filters/filter-displacement.cpp +++ b/source/filters/filter-displacement.cpp @@ -18,9 +18,9 @@ */ #include "filter-displacement.hpp" +#include "strings.hpp" #include #include -#include "strings.hpp" #define ST "Filter.Displacement" #define ST_FILE "Filter.Displacement.File" diff --git a/source/filters/filter-dynamic-mask.cpp b/source/filters/filter-dynamic-mask.cpp index 28dc815a..5fa1f837 100644 --- a/source/filters/filter-dynamic-mask.cpp +++ b/source/filters/filter-dynamic-mask.cpp @@ -18,9 +18,9 @@ */ #include "filter-dynamic-mask.hpp" +#include "strings.hpp" #include #include -#include "strings.hpp" // Filter to allow dynamic masking // Allow any channel to affect any other channel diff --git a/source/filters/filter-sdf-effects.cpp b/source/filters/filter-sdf-effects.cpp index 6a41e998..d723a0d9 100644 --- a/source/filters/filter-sdf-effects.cpp +++ b/source/filters/filter-sdf-effects.cpp @@ -18,9 +18,9 @@ */ #include "filter-sdf-effects.hpp" +#include "strings.hpp" #include #include "obs/gs/gs-helper.hpp" -#include "strings.hpp" #define LOG_PREFIX " " diff --git a/source/filters/filter-shader.cpp b/source/filters/filter-shader.cpp index 284f1c32..44b039de 100644 --- a/source/filters/filter-shader.cpp +++ b/source/filters/filter-shader.cpp @@ -18,9 +18,9 @@ */ #include "filter-shader.hpp" +#include "strings.hpp" #include #include "obs/gs/gs-helper.hpp" -#include "strings.hpp" #include "utility.hpp" #define ST "Filter.Shader" diff --git a/source/filters/filter-transform.cpp b/source/filters/filter-transform.cpp index 52ff5034..2a1b2b14 100644 --- a/source/filters/filter-transform.cpp +++ b/source/filters/filter-transform.cpp @@ -18,10 +18,10 @@ */ #include "filter-transform.hpp" +#include "strings.hpp" #include #include #include "obs/gs/gs-helper.hpp" -#include "strings.hpp" #include "util-math.hpp" // OBS diff --git a/source/gfx/blur/gfx-blur-box-linear.cpp b/source/gfx/blur/gfx-blur-box-linear.cpp index ad243d82..b21b9493 100644 --- a/source/gfx/blur/gfx-blur-box-linear.cpp +++ b/source/gfx/blur/gfx-blur-box-linear.cpp @@ -27,8 +27,8 @@ #pragma warning(push) #pragma warning(disable : 4201) #endif -#include #include +#include #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/source/gfx/blur/gfx-blur-box.cpp b/source/gfx/blur/gfx-blur-box.cpp index 6a02681a..8e73ed4e 100644 --- a/source/gfx/blur/gfx-blur-box.cpp +++ b/source/gfx/blur/gfx-blur-box.cpp @@ -27,8 +27,8 @@ #pragma warning(push) #pragma warning(disable : 4201) #endif -#include #include +#include #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/source/gfx/blur/gfx-blur-dual-filtering.cpp b/source/gfx/blur/gfx-blur-dual-filtering.cpp index f7205bae..99bde16c 100644 --- a/source/gfx/blur/gfx-blur-dual-filtering.cpp +++ b/source/gfx/blur/gfx-blur-dual-filtering.cpp @@ -25,8 +25,8 @@ #pragma warning(push) #pragma warning(disable : 4201) #endif -#include #include +#include #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/source/gfx/blur/gfx-blur-gaussian-linear.cpp b/source/gfx/blur/gfx-blur-gaussian-linear.cpp index 552a9b59..616d1ceb 100644 --- a/source/gfx/blur/gfx-blur-gaussian-linear.cpp +++ b/source/gfx/blur/gfx-blur-gaussian-linear.cpp @@ -24,8 +24,8 @@ #pragma warning(push) #pragma warning(disable : 4201) #endif -#include #include +#include #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/source/gfx/blur/gfx-blur-gaussian.cpp b/source/gfx/blur/gfx-blur-gaussian.cpp index a4726fb7..1e1d953a 100644 --- a/source/gfx/blur/gfx-blur-gaussian.cpp +++ b/source/gfx/blur/gfx-blur-gaussian.cpp @@ -25,8 +25,8 @@ #pragma warning(push) #pragma warning(disable : 4201) #endif -#include #include +#include #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/source/gfx/shader/gfx-shader-param-basic.cpp b/source/gfx/shader/gfx-shader-param-basic.cpp index d9464095..d3a5f3b4 100644 --- a/source/gfx/shader/gfx-shader-param-basic.cpp +++ b/source/gfx/shader/gfx-shader-param-basic.cpp @@ -16,11 +16,11 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "gfx-shader-param-basic.hpp" +#include "strings.hpp" #include #include #include #include -#include "strings.hpp" #define ANNO_FIELD_TYPE "field_type" #define ANNO_SUFFIX "suffix" diff --git a/source/gfx/shader/gfx-shader-param.hpp b/source/gfx/shader/gfx-shader-param.hpp index d34043dd..55afc70c 100644 --- a/source/gfx/shader/gfx-shader-param.hpp +++ b/source/gfx/shader/gfx-shader-param.hpp @@ -16,8 +16,8 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #pragma once -#include #include +#include #include "obs/gs/gs-effect-parameter.hpp" namespace gfx { diff --git a/source/nvidia/ar/nvidia-ar-feature.cpp b/source/nvidia/ar/nvidia-ar-feature.cpp index f34a39dd..baad0a98 100644 --- a/source/nvidia/ar/nvidia-ar-feature.cpp +++ b/source/nvidia/ar/nvidia-ar-feature.cpp @@ -26,9 +26,7 @@ nvidia::ar::feature::feature(std::shared_ptr<::nvidia::ar::ar> ar, NvAR_FeatureI throw std::runtime_error("Failed to create feature."); } - _feature = std::shared_ptr{feat, [this](NvAR_FeatureHandle v) { - _ar->destroy(v); - }}; + _feature = std::shared_ptr{feat, [this](NvAR_FeatureHandle v) { _ar->destroy(v); }}; } nvidia::ar::feature::~feature() diff --git a/source/nvidia/ar/nvidia-ar.hpp b/source/nvidia/ar/nvidia-ar.hpp index 4b384e3d..cffa56f3 100644 --- a/source/nvidia/ar/nvidia-ar.hpp +++ b/source/nvidia/ar/nvidia-ar.hpp @@ -23,7 +23,6 @@ #include #include - #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable : 4138) diff --git a/source/nvidia/cuda/nvidia-cuda-context-stack.hpp b/source/nvidia/cuda/nvidia-cuda-context-stack.hpp index 736527f3..b9d6baf4 100644 --- a/source/nvidia/cuda/nvidia-cuda-context-stack.hpp +++ b/source/nvidia/cuda/nvidia-cuda-context-stack.hpp @@ -24,7 +24,7 @@ namespace nvidia::cuda { class context_stack { - std::shared_ptr<::nvidia::cuda::cuda> _cuda; + std::shared_ptr<::nvidia::cuda::cuda> _cuda; std::shared_ptr<::nvidia::cuda::context> _ctx; public: diff --git a/source/nvidia/cuda/nvidia-cuda-context.cpp b/source/nvidia/cuda/nvidia-cuda-context.cpp index 749354fd..2b886b37 100644 --- a/source/nvidia/cuda/nvidia-cuda-context.cpp +++ b/source/nvidia/cuda/nvidia-cuda-context.cpp @@ -23,7 +23,7 @@ #ifdef WIN32 #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable: 4191 4365 4777 5039 5204) +#pragma warning(disable : 4191 4365 4777 5039 5204) #endif #include #ifdef _MSC_VER diff --git a/source/nvidia/cuda/nvidia-cuda-memory.cpp b/source/nvidia/cuda/nvidia-cuda-memory.cpp index e84b5865..73081c86 100644 --- a/source/nvidia/cuda/nvidia-cuda-memory.cpp +++ b/source/nvidia/cuda/nvidia-cuda-memory.cpp @@ -20,7 +20,8 @@ #include "nvidia-cuda-memory.hpp" #include -nvidia::cuda::memory::memory(std::shared_ptr<::nvidia::cuda::cuda> cuda, std::size_t size) : _cuda(cuda), _pointer(), _size(size) +nvidia::cuda::memory::memory(std::shared_ptr<::nvidia::cuda::cuda> cuda, std::size_t size) + : _cuda(cuda), _pointer(), _size(size) { ::nvidia::cuda::cu_result res = _cuda->cuMemAlloc(&_pointer, size); switch (res) { diff --git a/source/nvidia/cuda/nvidia-cuda-stream.hpp b/source/nvidia/cuda/nvidia-cuda-stream.hpp index 6bf94b72..5d5e2674 100644 --- a/source/nvidia/cuda/nvidia-cuda-stream.hpp +++ b/source/nvidia/cuda/nvidia-cuda-stream.hpp @@ -18,13 +18,13 @@ */ #pragma once -#include "nvidia-cuda.hpp" #include +#include "nvidia-cuda.hpp" namespace nvidia::cuda { class stream { std::shared_ptr<::nvidia::cuda::cuda> _cuda; - ::nvidia::cuda::cu_stream_t _stream; + ::nvidia::cuda::cu_stream_t _stream; public: stream(std::shared_ptr<::nvidia::cuda::cuda> cuda); diff --git a/source/nvidia/cuda/nvidia-cuda.cpp b/source/nvidia/cuda/nvidia-cuda.cpp index c95fc3a4..3187a819 100644 --- a/source/nvidia/cuda/nvidia-cuda.cpp +++ b/source/nvidia/cuda/nvidia-cuda.cpp @@ -90,20 +90,20 @@ nvidia::cuda::cuda::cuda() CUDA_LOAD_SYMBOL_V2(cuMemcpyHtoAAsync); CUDA_LOAD_SYMBOL_V2(cuMemcpyHtoD); CUDA_LOAD_SYMBOL_V2(cuMemcpyHtoDAsync); - - // Stream Managment + + // Stream Managment CUDA_LOAD_SYMBOL(cuStreamCreate); CUDA_LOAD_SYMBOL_V2(cuStreamDestroy); CUDA_LOAD_SYMBOL(cuStreamSynchronize); - - // Graphics Interoperability + + // Graphics Interoperability CUDA_LOAD_SYMBOL(cuGraphicsMapResources); CUDA_LOAD_SYMBOL(cuGraphicsSubResourceGetMappedArray); CUDA_LOAD_SYMBOL(cuGraphicsUnmapResources); CUDA_LOAD_SYMBOL(cuGraphicsUnregisterResource); #ifdef WIN32 - // Direct3D11 Interopability + // Direct3D11 Interopability CUDA_LOAD_SYMBOL(cuD3D11GetDevice); CUDA_LOAD_SYMBOL(cuGraphicsD3D11RegisterResource); #endif diff --git a/source/nvidia/cuda/nvidia-cuda.hpp b/source/nvidia/cuda/nvidia-cuda.hpp index ba5f0462..946823ea 100644 --- a/source/nvidia/cuda/nvidia-cuda.hpp +++ b/source/nvidia/cuda/nvidia-cuda.hpp @@ -82,8 +82,8 @@ namespace nvidia::cuda { typedef void* cu_stream_t; struct cu_memcpy2d_t { - size_t src_x_in_bytes; - size_t src_y; + size_t src_x_in_bytes; + size_t src_y; cu_memory_type src_memory_type; const void* src_host; @@ -91,8 +91,8 @@ namespace nvidia::cuda { cu_array_t src_array; std::size_t src_pitch; - size_t dst_x_in_bytes; - size_t dst_y; + size_t dst_x_in_bytes; + size_t dst_y; cu_memory_type dst_memory_type; const void* dst_host; @@ -100,8 +100,8 @@ namespace nvidia::cuda { cu_array_t dst_array; std::size_t dst_pitch; - std::size_t width_in_bytes; - std::size_t height; + std::size_t width_in_bytes; + std::size_t height; }; struct cu_array_descriptor_t { diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 0d149d76..8dc44ca5 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -18,6 +18,7 @@ */ #include "source-mirror.hpp" +#include "strings.hpp" #include #include #include @@ -28,7 +29,6 @@ #include "obs/gs/gs-helper.hpp" #include "obs/obs-source-tracker.hpp" #include "obs/obs-tools.hpp" -#include "strings.hpp" // OBS #ifdef _MSC_VER diff --git a/source/sources/source-shader.cpp b/source/sources/source-shader.cpp index 0febbc58..1d0fa5e4 100644 --- a/source/sources/source-shader.cpp +++ b/source/sources/source-shader.cpp @@ -18,16 +18,15 @@ */ #include "source-shader.hpp" -#include #include "strings.hpp" +#include #include "utility.hpp" #define ST "Source.Shader" using namespace source; -shader::shader_instance::shader_instance(obs_data_t* data, obs_source_t* self) - : obs::source_instance(data, self), _fx() +shader::shader_instance::shader_instance(obs_data_t* data, obs_source_t* self) : obs::source_instance(data, self), _fx() { _fx = std::make_shared(self, gfx::shader::shader_mode::Source); diff --git a/source/transitions/transition-shader.cpp b/source/transitions/transition-shader.cpp index eb6f10ff..b4ec6fb6 100644 --- a/source/transitions/transition-shader.cpp +++ b/source/transitions/transition-shader.cpp @@ -17,9 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "transition-shader.hpp" -#include #include "strings.hpp" +#include +#include "transition-shader.hpp" #include "utility.hpp" #define ST "Transition.Shader" diff --git a/source/util-event.hpp b/source/util-event.hpp index 6b992141..226d84d7 100644 --- a/source/util-event.hpp +++ b/source/util-event.hpp @@ -18,10 +18,10 @@ */ #pragma once +#include "common.hpp" #include #include #include -#include "common.hpp" namespace util { template