mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
Add mac-syphon plugin
Allows adding Syphon servers as sources, and provides game-capture if used with SyphonInject (specifically the scripting additions have to be installed for SyphonInject to work from within OBS)
This commit is contained in:
parent
0f15cc143e
commit
019a70f0d4
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,3 +1,7 @@
|
||||
[submodule "plugins/win-dshow/libdshowcapture"]
|
||||
path = plugins/win-dshow/libdshowcapture
|
||||
url = https://github.com/jp9000/libdshowcapture.git
|
||||
|
||||
[submodule "plugins/mac-syphon/syphon-framework"]
|
||||
path = plugins/mac-syphon/syphon-framework
|
||||
url = https://github.com/palana/Syphon-Framework.git
|
||||
|
@ -6,6 +6,7 @@ if(WIN32)
|
||||
elseif(APPLE)
|
||||
add_subdirectory(mac-avcapture)
|
||||
add_subdirectory(mac-capture)
|
||||
add_subdirectory(mac-syphon)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
add_subdirectory(linux-capture)
|
||||
add_subdirectory(linux-pulseaudio)
|
||||
|
84
plugins/mac-syphon/CMakeLists.txt
Normal file
84
plugins/mac-syphon/CMakeLists.txt
Normal file
@ -0,0 +1,84 @@
|
||||
project(mac-syphon)
|
||||
|
||||
find_library(COCOA Cocoa)
|
||||
find_library(IOSURF IOSurface)
|
||||
find_library(SCRIPTINGBRIDGE ScriptingBridge)
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
include_directories(${COCOA}
|
||||
${IOSURF}
|
||||
${SCRIPTINGBIRDGE}
|
||||
${OPENGL_INCLUDE_DIR})
|
||||
|
||||
set(syphon_HEADERS
|
||||
syphon-framework/Syphon_Prefix.pch
|
||||
syphon-framework/Syphon.h
|
||||
syphon-framework/SyphonBuildMacros.h
|
||||
syphon-framework/SyphonCFMessageReceiver.h
|
||||
syphon-framework/SyphonCFMessageSender.h
|
||||
syphon-framework/SyphonClient.h
|
||||
syphon-framework/SyphonClientConnectionManager.h
|
||||
syphon-framework/SyphonDispatch.h
|
||||
syphon-framework/SyphonIOSurfaceImage.h
|
||||
syphon-framework/SyphonImage.h
|
||||
syphon-framework/SyphonMachMessageReceiver.h
|
||||
syphon-framework/SyphonMachMessageSender.h
|
||||
syphon-framework/SyphonMessageQueue.h
|
||||
syphon-framework/SyphonMessageReceiver.h
|
||||
syphon-framework/SyphonMessageSender.h
|
||||
syphon-framework/SyphonMessaging.h
|
||||
syphon-framework/SyphonOpenGLFunctions.h
|
||||
syphon-framework/SyphonPrivate.h
|
||||
syphon-framework/SyphonServer.h
|
||||
syphon-framework/SyphonServerConnectionManager.h
|
||||
syphon-framework/SyphonServerDirectory.h
|
||||
)
|
||||
|
||||
set(syphon_SOURCES
|
||||
syphon-framework/SyphonCFMessageReceiver.m
|
||||
syphon-framework/SyphonCFMessageSender.m
|
||||
syphon-framework/SyphonClient.m
|
||||
syphon-framework/SyphonClientConnectionManager.m
|
||||
syphon-framework/SyphonDispatch.c
|
||||
syphon-framework/SyphonImage.m
|
||||
syphon-framework/SyphonIOSurfaceImage.m
|
||||
syphon-framework/SyphonMachMessageReceiver.m
|
||||
syphon-framework/SyphonMachMessageSender.m
|
||||
syphon-framework/SyphonMessageQueue.m
|
||||
syphon-framework/SyphonMessageReceiver.m
|
||||
syphon-framework/SyphonMessageSender.m
|
||||
syphon-framework/SyphonMessaging.m
|
||||
syphon-framework/SyphonOpenGLFunctions.c
|
||||
syphon-framework/SyphonPrivate.m
|
||||
syphon-framework/SyphonServer.m
|
||||
syphon-framework/SyphonServerConnectionManager.m
|
||||
syphon-framework/SyphonServerDirectory.m
|
||||
)
|
||||
|
||||
set(mac-syphon_HEADERS
|
||||
)
|
||||
|
||||
set(mac-syphon_SOURCES
|
||||
syphon.m
|
||||
plugin-main.c)
|
||||
|
||||
set_source_files_properties(${mac-syphon_SOURCES} ${syphon_SOURCES}
|
||||
PROPERTIES LANGUAGE C)
|
||||
|
||||
add_definitions(-DSYPHON_UNIQUE_CLASS_NAME_PREFIX=OBS_ -include
|
||||
${PROJECT_SOURCE_DIR}/syphon-framework/Syphon_Prefix.pch)
|
||||
|
||||
add_library(mac-syphon MODULE
|
||||
${mac-syphon_SOURCES}
|
||||
${mac-syphon_HEADERS}
|
||||
${syphon_HEADERS}
|
||||
${syphon_SOURCES})
|
||||
|
||||
target_link_libraries(mac-syphon
|
||||
libobs
|
||||
${COCOA}
|
||||
${IOSURF}
|
||||
${SCRIPTINGBRIDGE}
|
||||
${OPENGL_gl_LIBRARY})
|
||||
|
||||
install_obs_plugin_with_data(mac-syphon data)
|
10
plugins/mac-syphon/data/locale/en-US.ini
Normal file
10
plugins/mac-syphon/data/locale/en-US.ini
Normal file
@ -0,0 +1,10 @@
|
||||
Source="Source"
|
||||
LaunchSyphonInject="Launch SyphonInject"
|
||||
Inject="Inject"
|
||||
Application="Application"
|
||||
SyphonLicense="Syphon License"
|
||||
Crop="Crop"
|
||||
Crop.origin.x="Crop left"
|
||||
Crop.origin.y="Crop top"
|
||||
Crop.size.width="Crop right"
|
||||
Crop.size.height="Crop bottom"
|
26
plugins/mac-syphon/data/syphon_license.txt
Normal file
26
plugins/mac-syphon/data/syphon_license.txt
Normal file
@ -0,0 +1,26 @@
|
||||
Syphon
|
||||
|
||||
Copyright 2010-2011 bangnoise (Tom Butterworth) & vade (Anton Marini).
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
12
plugins/mac-syphon/plugin-main.c
Normal file
12
plugins/mac-syphon/plugin-main.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include <obs-module.h>
|
||||
|
||||
OBS_DECLARE_MODULE()
|
||||
OBS_MODULE_USE_DEFAULT_LOCALE("syphon", "en-US")
|
||||
|
||||
extern struct obs_source_info syphon_info;
|
||||
|
||||
bool obs_module_load(void)
|
||||
{
|
||||
obs_register_source(&syphon_info);
|
||||
return true;
|
||||
}
|
1
plugins/mac-syphon/syphon-framework
Submodule
1
plugins/mac-syphon/syphon-framework
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 01b144811f6f7080b70b2d7cc729da071f86f9d7
|
1125
plugins/mac-syphon/syphon.m
Normal file
1125
plugins/mac-syphon/syphon.m
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user