New upstream version 21.0.2+dfsg1
This commit is contained in:
parent
1f1bbb3518
commit
baafb6325b
706 changed files with 49633 additions and 5044 deletions
76
deps/obs-scripting/obspython/CMakeLists.txt
vendored
Normal file
76
deps/obs-scripting/obspython/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
project(obspython)
|
||||
|
||||
find_package(SWIG 2 REQUIRED)
|
||||
include(${SWIG_USE_FILE})
|
||||
|
||||
add_definitions(-DSWIG_TYPE_TABLE=obspython -DMS_NO_COREDLL -DPy_ENABLE_SHARED=1 -DSWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options("/wd4054")
|
||||
add_compile_options("/wd4100")
|
||||
add_compile_options("/wd4115")
|
||||
add_compile_options("/wd4197")
|
||||
add_compile_options("/wd4701")
|
||||
endif()
|
||||
|
||||
include_directories(${PYTHON_INCLUDE_DIR})
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
#add_definitions( -DSWIG_TYPE_TABLE=libobs )
|
||||
SET_SOURCE_FILES_PROPERTIES(obspython.i PROPERTIES SWIG_FLAGS "-modern")
|
||||
SET_SOURCE_FILES_PROPERTIES(obspython.i PROPERTIES SWIG_FLAGS "-builtin")
|
||||
SET_SOURCE_FILES_PROPERTIES(obspython.i PROPERTIES SWIG_FLAGS "-modernargs")
|
||||
SET_SOURCE_FILES_PROPERTIES(obspython.i PROPERTIES SWIG_FLAGS "-includeall")
|
||||
SET_SOURCE_FILES_PROPERTIES(obspython.i PROPERTIES SWIG_FLAGS "-importall")
|
||||
SET_SOURCE_FILES_PROPERTIES(obspython.i PROPERTIES SWIG_FLAGS "-py3")
|
||||
|
||||
if(WIN32)
|
||||
string(REGEX REPLACE "_d" "" PYTHON_LIBRARIES "${PYTHON_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
SWIG_ADD_MODULE(obspython python obspython.i ../cstrcache.cpp ../cstrcache.h)
|
||||
SWIG_LINK_LIBRARIES(obspython obs-scripting libobs ${PYTHON_LIBRARIES})
|
||||
|
||||
function(install_plugin_bin_swig target additional_target)
|
||||
if(APPLE)
|
||||
set(_bit_suffix "")
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_bit_suffix "64bit/")
|
||||
else()
|
||||
set(_bit_suffix "32bit/")
|
||||
endif()
|
||||
|
||||
set_target_properties(${additional_target} PROPERTIES
|
||||
PREFIX "")
|
||||
|
||||
if (APPLE)
|
||||
set_property(
|
||||
TARGET ${additional_target}
|
||||
APPEND
|
||||
PROPERTY INSTALL_RPATH
|
||||
"/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/"
|
||||
"/Library/Frameworks/Python.framework/Versions/3.6/lib/"
|
||||
"/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/"
|
||||
)
|
||||
endif()
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/obspython.py"
|
||||
DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}")
|
||||
install(TARGETS "${additional_target}"
|
||||
LIBRARY DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}")
|
||||
|
||||
add_custom_command(TARGET ${additional_target} POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/obspython.py"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/data/obs-scripting/${_bit_suffix}/obspython.py"
|
||||
VERBATIM)
|
||||
add_custom_command(TARGET ${additional_target} POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_FILE:${additional_target}>"
|
||||
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/data/obs-scripting/${_bit_suffix}$<TARGET_FILE_NAME:${additional_target}>"
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
install_plugin_bin_swig(obs-scripting _obspython)
|
||||
106
deps/obs-scripting/obspython/obspython.i
vendored
Normal file
106
deps/obs-scripting/obspython/obspython.i
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
%module(threads="1") obspython
|
||||
%nothread;
|
||||
%{
|
||||
#define SWIG_FILE_WITH_INIT
|
||||
#define DEPRECATED_START
|
||||
#define DEPRECATED_END
|
||||
#include <graphics/graphics.h>
|
||||
#include <graphics/vec4.h>
|
||||
#include <graphics/vec3.h>
|
||||
#include <graphics/vec2.h>
|
||||
#include <graphics/quat.h>
|
||||
#include <obs.h>
|
||||
#include <obs-hotkey.h>
|
||||
#include <obs-source.h>
|
||||
#include <obs-data.h>
|
||||
#include <obs-properties.h>
|
||||
#include <obs-interaction.h>
|
||||
#include <callback/calldata.h>
|
||||
#include <callback/decl.h>
|
||||
#include <callback/proc.h>
|
||||
#include <callback/signal.h>
|
||||
#include <util/bmem.h>
|
||||
#include <util/base.h>
|
||||
#include "obs-scripting-config.h"
|
||||
|
||||
#if UI_ENABLED
|
||||
#include "obs-frontend-api.h"
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
#define DEPRECATED_START
|
||||
#define DEPRECATED_END
|
||||
#define EXPORT
|
||||
|
||||
%rename(blog) wrap_blog;
|
||||
%inline %{
|
||||
static inline void wrap_blog(int log_level, const char *message)
|
||||
{
|
||||
blog(log_level, "%s", message);
|
||||
}
|
||||
%}
|
||||
|
||||
%include "stdint.i"
|
||||
|
||||
/* Used to free when using %newobject functions. E.G.:
|
||||
* %newobject obs_module_get_config_path; */
|
||||
%typemap(newfree) char * "bfree($1);";
|
||||
|
||||
%ignore blog;
|
||||
%ignore blogva;
|
||||
%ignore bcrash;
|
||||
%ignore obs_source_info;
|
||||
%ignore obs_register_source_s(const struct obs_source_info *info, size_t size);
|
||||
%ignore obs_output_set_video(obs_output_t *output, video_t *video);
|
||||
%ignore obs_output_video(const obs_output_t *output);
|
||||
%ignore obs_add_tick_callback;
|
||||
%ignore obs_remove_tick_callback;
|
||||
%ignore obs_add_main_render_callback;
|
||||
%ignore obs_remove_main_render_callback;
|
||||
%ignore obs_enum_sources;
|
||||
%ignore obs_properties_add_button;
|
||||
%ignore obs_property_set_modified_callback;
|
||||
%ignore signal_handler_connect;
|
||||
%ignore signal_handler_disconnect;
|
||||
%ignore signal_handler_connect_global;
|
||||
%ignore signal_handler_disconnect_global;
|
||||
%ignore signal_handler_remove_current;
|
||||
%ignore obs_hotkey_register_frontend;
|
||||
%ignore obs_hotkey_register_encoder;
|
||||
%ignore obs_hotkey_register_output;
|
||||
%ignore obs_hotkey_register_service;
|
||||
%ignore obs_hotkey_register_source;
|
||||
%ignore obs_hotkey_pair_register_frontend;
|
||||
%ignore obs_hotkey_pair_register_encoder;
|
||||
%ignore obs_hotkey_pair_register_output;
|
||||
%ignore obs_hotkey_pair_register_service;
|
||||
%ignore obs_hotkey_pair_register_source;
|
||||
|
||||
%include "graphics/graphics.h"
|
||||
%include "graphics/vec4.h"
|
||||
%include "graphics/vec3.h"
|
||||
%include "graphics/vec2.h"
|
||||
%include "graphics/quat.h"
|
||||
%include "obs-data.h"
|
||||
%include "obs-source.h"
|
||||
%include "obs-properties.h"
|
||||
%include "obs-interaction.h"
|
||||
%include "obs-hotkey.h"
|
||||
%include "obs.h"
|
||||
%include "callback/calldata.h"
|
||||
%include "callback/proc.h"
|
||||
%include "callback/signal.h"
|
||||
%include "util/bmem.h"
|
||||
%include "util/base.h"
|
||||
%include "obs-scripting-config.h"
|
||||
|
||||
#if UI_ENABLED
|
||||
%include "obs-frontend-api.h"
|
||||
#endif
|
||||
|
||||
/* declare these manually because mutex + GIL = deadlocks */
|
||||
%thread;
|
||||
void obs_enter_graphics(void); //Should only block on entering mutex
|
||||
%nothread;
|
||||
%include "obs.h"
|
||||
Loading…
Add table
Add a link
Reference in a new issue