提交 019a70f0 编写于 作者: P Palana

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)
上级 0f15cc14
[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)
......
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)
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"
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.
#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;
}
Subproject commit 01b144811f6f7080b70b2d7cc729da071f86f9d7
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册