mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +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()
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 <atlutil.h>
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -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,13 +18,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "nvidia-cuda.hpp"
|
||||
#include <memory>
|
||||
#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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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