mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-13 07:15:06 +00:00
cmake: Fix clang support in native OBS Studio build
This commit is contained in:
parent
d54630a197
commit
a138f95126
32 changed files with 54 additions and 57 deletions
|
@ -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()
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#include "nvenc_shared.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <algorithm>
|
||||
#include "../codecs/hevc.hpp"
|
||||
#include "../ffmpeg-encoder.hpp"
|
||||
#include "ffmpeg/tools.hpp"
|
||||
#include "plugin.hpp"
|
||||
#include "strings.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "filter-blur.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <cfloat>
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
|
@ -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
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#include "filter-color-grade.hpp"
|
||||
#include <stdexcept>
|
||||
#include "strings.hpp"
|
||||
#include <stdexcept>
|
||||
#include "util-math.hpp"
|
||||
|
||||
// OBS
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "plugin.hpp"
|
||||
#include <vector>
|
||||
#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 {
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
*/
|
||||
|
||||
#include "filter-displacement.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <stdexcept>
|
||||
#include <sys/stat.h>
|
||||
#include "strings.hpp"
|
||||
|
||||
#define ST "Filter.Displacement"
|
||||
#define ST_FILE "Filter.Displacement.File"
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
*/
|
||||
|
||||
#include "filter-dynamic-mask.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include "strings.hpp"
|
||||
|
||||
// Filter to allow dynamic masking
|
||||
// Allow any channel to affect any other channel
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
*/
|
||||
|
||||
#include "filter-sdf-effects.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <stdexcept>
|
||||
#include "obs/gs/gs-helper.hpp"
|
||||
#include "strings.hpp"
|
||||
|
||||
#define LOG_PREFIX "<filter-sdf-effects> "
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
*/
|
||||
|
||||
#include "filter-shader.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <stdexcept>
|
||||
#include "obs/gs/gs-helper.hpp"
|
||||
#include "strings.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
#define ST "Filter.Shader"
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
*/
|
||||
|
||||
#include "filter-transform.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include "obs/gs/gs-helper.hpp"
|
||||
#include "strings.hpp"
|
||||
#include "util-math.hpp"
|
||||
|
||||
// OBS
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-module.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-module.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-module.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-module.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-module.h>
|
||||
#include <obs.h>
|
||||
#include <obs-module.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -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 <algorithm>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include "strings.hpp"
|
||||
|
||||
#define ANNO_FIELD_TYPE "field_type"
|
||||
#define ANNO_SUFFIX "suffix"
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include "obs/gs/gs-effect-parameter.hpp"
|
||||
|
||||
namespace gfx {
|
||||
|
|
|
@ -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<nvAR_Feature>{feat, [this](NvAR_FeatureHandle v) {
|
||||
_ar->destroy(v);
|
||||
}};
|
||||
_feature = std::shared_ptr<nvAR_Feature>{feat, [this](NvAR_FeatureHandle v) { _ar->destroy(v); }};
|
||||
}
|
||||
|
||||
nvidia::ar::feature::~feature()
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4138)
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
#include "nvidia-cuda-memory.hpp"
|
||||
#include <stdexcept>
|
||||
|
||||
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) {
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "nvidia-cuda.hpp"
|
||||
#include <memory>
|
||||
#include "nvidia-cuda.hpp"
|
||||
|
||||
namespace nvidia::cuda {
|
||||
class stream {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "source-mirror.hpp"
|
||||
#include "strings.hpp"
|
||||
#include <bitset>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
|
@ -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
|
||||
|
|
|
@ -18,16 +18,15 @@
|
|||
*/
|
||||
|
||||
#include "source-shader.hpp"
|
||||
#include <stdexcept>
|
||||
#include "strings.hpp"
|
||||
#include <stdexcept>
|
||||
#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<gfx::shader::shader>(self, gfx::shader::shader_mode::Source);
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "transition-shader.hpp"
|
||||
#include <stdexcept>
|
||||
#include "strings.hpp"
|
||||
#include <stdexcept>
|
||||
#include "transition-shader.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
#define ST "Transition.Shader"
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <mutex>
|
||||
#include "common.hpp"
|
||||
|
||||
namespace util {
|
||||
template<typename... _args>
|
||||
|
|
Loading…
Reference in a new issue