mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-23 20:05:11 +00:00
common: Common header include for improved platform support
This header includes all common data between headers used in the plugin. This should improve cross-platform compiling support whenever possible, as all platform-dependent common includes and defines can be done here.
This commit is contained in:
parent
451d31546f
commit
59fa1d36d7
60 changed files with 150 additions and 416 deletions
|
@ -20,10 +20,12 @@ NamespaceIndentation: All
|
|||
# Includes
|
||||
#IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '^(<|")(common.hpp|obs.h)("|>)'
|
||||
Priority: 0
|
||||
- Regex: '^<'
|
||||
Priority: 1
|
||||
Priority: 10
|
||||
- Regex: '^"'
|
||||
Priority: 2
|
||||
Priority: 20
|
||||
SortIncludes: true
|
||||
|
||||
# Alignment
|
||||
|
|
|
@ -106,7 +106,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
# using Intel C++
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
set(MSVC_EXTRA_FLAGS "/wd4061 /wd4100 /wd4180 /wd4201 /wd4464 /wd4505 /wd4514 /wd4571 /wd4623 /wd4625 /wd4626 /wd4668 /wd4710 /wd4774 /wd4820 /wd5026 /wd5027 /wd5039 /wd5045")
|
||||
set(MSVC_EXTRA_FLAGS "/wd4061 /wd4100 /wd4180 /wd4201 /wd4464 /wd4505 /wd4514 /wd4571 /wd4623 /wd4625 /wd4626 /wd4668 /wd4710 /wd4774 /wd4820 /wd5026 /wd5027 /wd5039 /wd5045 /wd26812")
|
||||
# Force to always compile with W4
|
||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string(REGEX REPLACE "/W[0-4]" "/Wall" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
@ -342,6 +342,7 @@ if(WIN32)
|
|||
endif()
|
||||
list(APPEND PROJECT_PRIVATE_SOURCE
|
||||
# Plugin
|
||||
"source/common.hpp"
|
||||
"source/plugin.hpp"
|
||||
"source/plugin.cpp"
|
||||
"source/strings.hpp"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <cstddef>
|
||||
|
||||
#define STREAMFX_MAKE_VERSION(major,minor,patch,tweak) ((uint64_t(major) & 0xFFFFull) << 48ull) | ((uint64_t(minor) & 0xFFFFull) << 32ull) | ((uint64_t(patch) & 0xFFFFull) << 16ull) | ((uint64_t(tweak) & 0xFFFFull))
|
||||
|
||||
|
|
90
source/common.hpp
Normal file
90
source/common.hpp
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Modern effects for a modern Streamer
|
||||
* Copyright (C) 2020 Michael Fabian Dirks
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Common C includes
|
||||
#include <cfloat>
|
||||
#include <cinttypes>
|
||||
#include <climits>
|
||||
#include <clocale>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
// Common C++ includes
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
// Common Plugin includes
|
||||
#include "strings.hpp"
|
||||
#include "util-profiler.hpp"
|
||||
#include "util-threadpool.hpp"
|
||||
#include "utility.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
// Common OBS includes
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#include <obs-data.h>
|
||||
#include <obs-encoder.h>
|
||||
#include <obs-module.h>
|
||||
#include <obs-properties.h>
|
||||
#include <obs-source.h>
|
||||
#include <util/platform.h>
|
||||
#include <graphics/graphics.h>
|
||||
#include <graphics/vec3.h>
|
||||
#include <graphics/matrix4.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
// Common Global defines
|
||||
/// Logging
|
||||
#define LOG_(level, ...) blog(level, "[" PLUGIN_NAME "] " __VA_ARGS__)
|
||||
#define LOG_ERROR(...) LOG_(LOG_ERROR, __VA_ARGS__)
|
||||
#define LOG_WARNING(...) LOG_(LOG_WARNING, __VA_ARGS__)
|
||||
#define LOG_INFO(...) LOG_(LOG_INFO, __VA_ARGS__)
|
||||
#define LOG_DEBUG(...) LOG_(LOG_DEBUG, __VA_ARGS__)
|
||||
/// Currrent function name (as const char*)
|
||||
#ifdef _MSC_VER
|
||||
// Microsoft Visual Studio
|
||||
#define __FUNCTION_SIG__ __FUNCSIG__
|
||||
#define __FUNCTION_NAME__ __func__
|
||||
#elif defined(__GNUC__) || defined(__MINGW32__)
|
||||
// GCC and MinGW
|
||||
#define __FUNCTION_SIG__ __PRETTY_FUNCTION__
|
||||
#define __FUNCTION_NAME__ __func__
|
||||
#else
|
||||
// Any other compiler
|
||||
#define __FUNCTION_SIG__ __func__
|
||||
#define __FUNCTION_NAME__ __func__
|
||||
#endif
|
|
@ -20,13 +20,12 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <condition_variable>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include "ffmpeg/avframe-queue.hpp"
|
||||
|
@ -42,7 +41,6 @@ extern "C" {
|
|||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/frame.h>
|
||||
#include <obs-properties.h>
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -20,16 +20,10 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "ffmpeg/hwapi/base.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs.h>
|
||||
|
||||
#include <obs-data.h>
|
||||
#include <obs-encoder.h>
|
||||
#include <obs-properties.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4242 4244 4365)
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "handler.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs-properties.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244)
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "handler.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs-properties.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244)
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "handler.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
|
@ -31,7 +30,6 @@ extern "C" {
|
|||
#pragma warning(disable : 4242 4244 4365)
|
||||
#endif
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <obs-properties.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "handler.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs-properties.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244)
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <deque>
|
||||
#include <mutex>
|
||||
|
||||
|
|
|
@ -20,11 +20,8 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "base.hpp"
|
||||
|
||||
extern "C++" {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
#include <utility>
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <functional>
|
||||
#include <obs.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include "gfx/blur/gfx-blur-base.hpp"
|
||||
#include "gfx/gfx-source-texture.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
|
@ -30,17 +30,6 @@
|
|||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/gs/gs-texture.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace filter::blur {
|
||||
enum class mask_type : int64_t {
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#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,22 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-source.h>
|
||||
#include <util/platform.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace filter::displacement {
|
||||
class displacement_instance : public obs::source_instance {
|
||||
|
|
|
@ -18,27 +18,14 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "gfx/gfx-source-texture.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "obs/obs-source-tracker.hpp"
|
||||
#include "obs/obs-source.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-source.h>
|
||||
#include <util/platform.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace filter::dynamic_mask {
|
||||
enum class channel : int8_t { Invalid = -1, Red, Green, Blue, Alpha };
|
||||
|
|
|
@ -18,15 +18,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/gs/gs-vertexbuffer.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
#include "util-profiler.hpp"
|
||||
|
||||
// Nvidia
|
||||
#include "nvidia/ar/nvidia-ar.hpp"
|
||||
|
|
|
@ -18,24 +18,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include "common.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/gs/gs-sampler.hpp"
|
||||
#include "obs/gs/gs-texture.hpp"
|
||||
#include "obs/gs/gs-vertexbuffer.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace filter::sdf_effects {
|
||||
class sdf_effects_instance : public obs::source_instance {
|
||||
|
|
|
@ -18,15 +18,10 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
#include "gfx/shader/gfx-shader.hpp"
|
||||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs.h>
|
||||
}
|
||||
|
||||
namespace filter::shader {
|
||||
class shader_instance : public obs::source_instance {
|
||||
|
|
|
@ -18,14 +18,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include "common.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::transform {
|
||||
class transform_instance : public obs::source_instance {
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
#include "common.hpp"
|
||||
#include "obs/gs/gs-texture.hpp"
|
||||
|
||||
namespace gfx {
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include "common.hpp"
|
||||
#include <mutex>
|
||||
#include "gfx-blur-base.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include "common.hpp"
|
||||
#include <mutex>
|
||||
#include "gfx-blur-base.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include "common.hpp"
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include "gfx-blur-base.hpp"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include "gfx-blur-base.hpp"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include "gfx-blur-base.hpp"
|
||||
|
|
|
@ -16,23 +16,12 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/gs/gs-texture.hpp"
|
||||
#include "obs/obs-source.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gfx {
|
||||
class source_texture {
|
||||
std::shared_ptr<obs::deprecated_source> _parent;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include <vector>
|
||||
#include "gfx-shader-param.hpp"
|
||||
#include "obs/gs/gs-effect-parameter.hpp"
|
||||
|
|
|
@ -16,22 +16,10 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include "obs/gs/gs-effect-parameter.hpp"
|
||||
|
||||
// OBS
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace gfx {
|
||||
namespace shader {
|
||||
enum class parameter_type {
|
||||
|
|
|
@ -16,27 +16,14 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <filesystem>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include "gfx/shader/gfx-shader-param.hpp"
|
||||
#include "obs/gs/gs-effect.hpp"
|
||||
|
||||
// OBS
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#include <util/platform.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace gfx {
|
||||
namespace shader {
|
||||
enum class size_type {
|
||||
|
|
|
@ -18,26 +18,10 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "gs-sampler.hpp"
|
||||
#include "gs-texture.hpp"
|
||||
|
||||
// OBS
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#include <graphics/matrix4.h>
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace gs {
|
||||
class effect_parameter : public std::shared_ptr<gs_eparam_t> {
|
||||
std::shared_ptr<gs_effect_t>* _effect_parent;
|
||||
|
|
|
@ -18,23 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "gs-effect-parameter.hpp"
|
||||
|
||||
// OBS
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace gs {
|
||||
class effect_pass : public std::shared_ptr<gs_epass_t> {
|
||||
std::shared_ptr<gs_technique_t>* _parent;
|
||||
|
|
|
@ -18,23 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "gs-effect-pass.hpp"
|
||||
|
||||
// OBS
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace gs {
|
||||
class effect_technique : public std::shared_ptr<gs_technique_t> {
|
||||
std::shared_ptr<gs_effect_t>* _parent;
|
||||
|
|
|
@ -18,26 +18,12 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
#include <filesystem>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "gs-effect-parameter.hpp"
|
||||
#include "gs-effect-technique.hpp"
|
||||
|
||||
// OBS
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace gs {
|
||||
class effect : public std::shared_ptr<gs_effect_t> {
|
||||
public:
|
||||
|
|
|
@ -18,20 +18,10 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include <vector>
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
class context {
|
||||
public:
|
||||
|
|
|
@ -18,19 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
#include <vector>
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
class index_buffer : public std::vector<uint32_t> {
|
||||
public:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
|
||||
namespace gs {
|
||||
static const uint32_t MAXIMUM_VERTICES = 0xFFFFFFu;
|
||||
|
|
|
@ -18,21 +18,12 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "gs-effect.hpp"
|
||||
#include "gs-rendertarget.hpp"
|
||||
#include "gs-texture.hpp"
|
||||
#include "gs-vertexbuffer.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
class mipmapper {
|
||||
std::unique_ptr<gs::vertex_buffer> _vb;
|
||||
|
|
|
@ -18,20 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include "common.hpp"
|
||||
#include "gs-texture.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
class rendertarget_op;
|
||||
|
||||
|
|
|
@ -18,17 +18,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include "common.hpp"
|
||||
|
||||
namespace gs {
|
||||
class sampler {
|
||||
|
|
|
@ -18,20 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
class texture {
|
||||
public:
|
||||
|
|
|
@ -18,20 +18,10 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
#include <xmmintrin.h>
|
||||
#include "gs-limits.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/vec3.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
struct vertex {
|
||||
vec3* position;
|
||||
|
|
|
@ -18,21 +18,11 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include "common.hpp"
|
||||
#include "gs-limits.hpp"
|
||||
#include "gs-vertex.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <graphics/graphics.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace gs {
|
||||
class vertex_buffer {
|
||||
uint32_t _size;
|
||||
|
|
|
@ -18,12 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "util-event.hpp"
|
||||
|
||||
#include <obs.h>
|
||||
|
||||
namespace obs {
|
||||
template<typename T>
|
||||
class signal_handler_base {
|
||||
|
|
|
@ -17,23 +17,10 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef STREAMFX_SOURCE_FACTORY_HPP
|
||||
#define STREAMFX_SOURCE_FACTORY_HPP
|
||||
|
||||
#pragma once
|
||||
#include <stdexcept>
|
||||
#include "common.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-source.h>
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace obs {
|
||||
template<class _factory, typename _instance>
|
||||
class source_factory {
|
||||
|
@ -610,5 +597,3 @@ namespace obs {
|
|||
};
|
||||
|
||||
} // namespace obs
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,19 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace obs {
|
||||
class source_tracker {
|
||||
|
|
|
@ -17,24 +17,10 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef OBS_STREAM_EFFECTS_OBS_SOURCE_HPP
|
||||
#define OBS_STREAM_EFFECTS_OBS_SOURCE_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include <string>
|
||||
#include "common.hpp"
|
||||
#include "util-event.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace obs {
|
||||
class deprecated_source {
|
||||
obs_source_t* _self;
|
||||
|
@ -149,5 +135,3 @@ namespace obs {
|
|||
} events;
|
||||
};
|
||||
} // namespace obs
|
||||
|
||||
#endif
|
||||
|
|
|
@ -17,23 +17,8 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef OBS_STREAM_EFFECTS_OBS_TOOLS_HPP
|
||||
#define OBS_STREAM_EFFECTS_OBS_TOOLS_HPP
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include "common.hpp"
|
||||
|
||||
namespace obs {
|
||||
namespace tools {
|
||||
|
@ -73,5 +58,3 @@ namespace obs {
|
|||
obs_sceneitem_remove(v);
|
||||
}
|
||||
} // namespace obs
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,35 +18,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "strings.hpp"
|
||||
#include "version.hpp"
|
||||
#include "util-threadpool.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include "obs-module.h"
|
||||
#include "util/platform.h"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
// Logging
|
||||
#define LOG_(level, ...) blog(level, "[" PLUGIN_NAME "] " __VA_ARGS__)
|
||||
#define LOG_ERROR(...) LOG_(LOG_ERROR, __VA_ARGS__)
|
||||
#define LOG_WARNING(...) LOG_(LOG_WARNING, __VA_ARGS__)
|
||||
#define LOG_INFO(...) LOG_(LOG_INFO, __VA_ARGS__)
|
||||
#define LOG_DEBUG(...) LOG_(LOG_DEBUG, __VA_ARGS__)
|
||||
|
||||
#ifndef __FUNCTION_NAME__
|
||||
#ifdef WIN32 // WINDOWS
|
||||
#define __FUNCTION_NAME__ __FUNCTION__
|
||||
#else // *NIX
|
||||
#define __FUNCTION_NAME__ __func__
|
||||
#endif
|
||||
#endif
|
||||
#include "common.hpp"
|
||||
|
||||
// Threadpool
|
||||
std::shared_ptr<util::threadpool> get_global_threadpool();
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <condition_variable>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <thread>
|
||||
|
@ -31,17 +31,6 @@
|
|||
#include "obs/obs-source-factory.hpp"
|
||||
#include "obs/obs-source.hpp"
|
||||
#include "obs/obs-tools.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201)
|
||||
#endif
|
||||
#include <obs-source.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
namespace source::mirror {
|
||||
struct mirror_audio_data {
|
||||
|
|
|
@ -18,16 +18,12 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
#include "gfx/shader/gfx-shader.hpp"
|
||||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs.h>
|
||||
}
|
||||
|
||||
namespace source::shader {
|
||||
class shader_instance : public obs::source_instance {
|
||||
std::shared_ptr<gfx::shader::shader> _fx;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "plugin.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
#define PLUGIN_NAME "StreamFX"
|
||||
|
||||
|
|
|
@ -18,16 +18,12 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
#include "gfx/shader/gfx-shader.hpp"
|
||||
#include "obs/gs/gs-rendertarget.hpp"
|
||||
#include "obs/obs-source-factory.hpp"
|
||||
#include "plugin.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <obs.h>
|
||||
}
|
||||
|
||||
namespace transition::shader {
|
||||
class shader_instance : public obs::source_instance {
|
||||
std::shared_ptr<gfx::shader::shader> _fx;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <functional>
|
||||
#include <list>
|
||||
#include <mutex>
|
||||
#include "common.hpp"
|
||||
|
||||
namespace util {
|
||||
template<typename... _args>
|
||||
|
|
|
@ -17,11 +17,10 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
namespace util {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <list>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <thread>
|
||||
|
||||
namespace util {
|
||||
|
|
|
@ -18,11 +18,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cinttypes>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include "common.hpp"
|
||||
|
||||
extern "C" {
|
||||
#ifdef _MSC_VER
|
||||
|
|
Loading…
Reference in a new issue