obs-studio/plugins/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

188 lines
5.2 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.22...3.25)
option(ENABLE_PLUGINS "Enable building OBS plugins" ON)
if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
if(NOT ENABLE_PLUGINS)
set_property(GLOBAL APPEND PROPERTY OBS_FEATURES_DISABLED "Plugin Support")
return()
endif()
set_property(GLOBAL APPEND PROPERTY OBS_FEATURES_ENABLED "Plugin Support")
macro(check_obs_browser)
if(NOT (OS_WINDOWS AND NOT CMAKE_GENERATOR_PLATFORM MATCHES "(Win32|x64)"))
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-browser/cmake/macos/Info.plist.in")
add_subdirectory(obs-browser)
elseif(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-browser/CMakeLists.txt")
message(FATAL_ERROR "Required submodule 'obs-browser' not available.")
endif()
endif()
endmacro()
macro(check_obs_websocket)
if(OS_WINDOWS
OR OS_MACOS
OR OS_LINUX)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/cmake/macos/Info.plist.in")
add_subdirectory(obs-websocket)
elseif(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/CMakeLists.txt")
message(FATAL_ERROR "Required submodule 'obs-websocket' not available.")
endif()
endif()
endmacro()
# Add plugins in alphabetical order to retain order in IDE projects
add_subdirectory(aja)
if(OS_WINDOWS OR OS_MACOS)
add_subdirectory(coreaudio-encoder)
endif()
if(OS_WINDOWS
OR OS_MACOS
OR OS_LINUX)
add_subdirectory(decklink)
endif()
add_subdirectory(image-source)
if(OS_LINUX)
add_subdirectory(linux-alsa)
add_subdirectory(linux-capture)
add_subdirectory(linux-jack)
add_subdirectory(linux-pipewire)
add_subdirectory(linux-pulseaudio)
add_subdirectory(linux-v4l2)
endif()
if(OS_MACOS)
add_subdirectory(mac-avcapture)
add_subdirectory(mac-capture)
add_subdirectory(mac-syphon)
add_subdirectory(mac-videotoolbox)
add_subdirectory(mac-virtualcam)
endif()
check_obs_browser()
add_subdirectory(obs-ffmpeg)
add_subdirectory(obs-filters)
add_subdirectory(obs-outputs)
if(OS_WINDOWS)
add_subdirectory(obs-qsv11)
add_subdirectory(obs-text)
endif()
add_subdirectory(obs-transitions)
if(OS_WINDOWS
OR OS_MACOS
OR OS_LINUX)
add_subdirectory(obs-vst)
endif()
add_subdirectory(obs-webrtc)
check_obs_websocket()
add_subdirectory(obs-x264)
add_subdirectory(rtmp-services)
if(OS_LINUX)
add_subdirectory(sndio)
endif()
add_subdirectory(text-freetype2)
if(OS_WINDOWS
OR OS_MACOS
OR OS_LINUX)
add_subdirectory(vlc-video)
endif()
if(OS_WINDOWS)
add_subdirectory(win-capture)
add_subdirectory(win-dshow)
add_subdirectory(win-wasapi)
endif()
return()
endif()
if(NOT ENABLE_PLUGINS)
obs_status(STATUS "Building with plugins disabled.")
return()
endif()
function(check_obs_browser)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/obs-browser/CMakeLists.txt)
add_subdirectory(obs-browser)
else()
obs_status(FATAL_ERROR "obs-browser submodule not available.")
endif()
endfunction()
# APPLE/WIN32/UNIX are soft-deprecated: https://discourse.cmake.org/t/platform-id-vs-win32-vs-cmake-system-name/1226/2
if(OS_WINDOWS)
add_subdirectory(coreaudio-encoder)
add_subdirectory(win-wasapi)
add_subdirectory(win-dshow)
add_subdirectory(win-capture)
add_subdirectory(decklink)
add_subdirectory(obs-qsv11)
add_subdirectory(obs-text)
add_subdirectory(vlc-video)
obs-vst: Remove submodule in favour of direct merge 2/2 Please visit the submodule repo for blame history: https://github.com/obsproject/obs-vst This also replaces the obs-vst .clang-format with obs-studio's. This commit depends on the previous commit, which removes the submodule separately as Git complains otherwise. Co-authored-by: Alex Anderson <anderson.john.alexander@gmail.com> Co-authored-by: Anton <camotank12345@gmail.com> Co-authored-by: Blue Cat Audio <support@bluecataudio.com> Co-authored-by: Cephas Reis <c3r1c3@nevermindonline.com> Co-authored-by: Colin Edwards <colin@recursivepenguin.com> Co-authored-by: Florian Zwoch <fzwoch@gmail.com> Co-authored-by: Fogmoon <i@fogmoon.com> Co-authored-by: Gol-D-Ace <Gol-D-Ace@users.noreply.github.com> Co-authored-by: Igor Bochkariov <ujifgc@gmail.com> Co-authored-by: Jesse Chappell <jesse@sonosaurus.com> Co-authored-by: Keen <523059842@qq.com> Co-authored-by: Kurt Kartaltepe <kkartaltepe@gmail.com> Co-authored-by: Matt Gajownik <matt@obsproject.com> Co-authored-by: Matt Gajownik <matt@wizardcm.com> Co-authored-by: Richard Stanway <notr1ch@users.noreply.github.com> Co-authored-by: Ryan Foster <RytoEX@gmail.com> Co-authored-by: follower <github@rancidbacon.com> Co-authored-by: gxalpha <beckmann.sebastian@outlook.de> Co-authored-by: jp9000 <obs.jim@gmail.com> Co-authored-by: jpark37 <jpark37@users.noreply.github.com> Co-authored-by: mntone <sd8@live.jp> Co-authored-by: tytan652 <tytan652@tytanium.xyz> Co-authored-by: wangshaohui <97082645@qq.com> Co-authored-by: wangshaohui <wang.shaohui@navercorp.com>
2022-05-22 07:11:33 +00:00
add_subdirectory(obs-vst)
check_obs_browser()
elseif(OS_MACOS)
add_subdirectory(coreaudio-encoder)
add_subdirectory(mac-avcapture)
add_subdirectory(mac-capture)
add_subdirectory(mac-videotoolbox)
add_subdirectory(mac-syphon)
add_subdirectory(mac-virtualcam)
add_subdirectory(decklink)
add_subdirectory(vlc-video)
add_subdirectory(linux-jack)
obs-vst: Remove submodule in favour of direct merge 2/2 Please visit the submodule repo for blame history: https://github.com/obsproject/obs-vst This also replaces the obs-vst .clang-format with obs-studio's. This commit depends on the previous commit, which removes the submodule separately as Git complains otherwise. Co-authored-by: Alex Anderson <anderson.john.alexander@gmail.com> Co-authored-by: Anton <camotank12345@gmail.com> Co-authored-by: Blue Cat Audio <support@bluecataudio.com> Co-authored-by: Cephas Reis <c3r1c3@nevermindonline.com> Co-authored-by: Colin Edwards <colin@recursivepenguin.com> Co-authored-by: Florian Zwoch <fzwoch@gmail.com> Co-authored-by: Fogmoon <i@fogmoon.com> Co-authored-by: Gol-D-Ace <Gol-D-Ace@users.noreply.github.com> Co-authored-by: Igor Bochkariov <ujifgc@gmail.com> Co-authored-by: Jesse Chappell <jesse@sonosaurus.com> Co-authored-by: Keen <523059842@qq.com> Co-authored-by: Kurt Kartaltepe <kkartaltepe@gmail.com> Co-authored-by: Matt Gajownik <matt@obsproject.com> Co-authored-by: Matt Gajownik <matt@wizardcm.com> Co-authored-by: Richard Stanway <notr1ch@users.noreply.github.com> Co-authored-by: Ryan Foster <RytoEX@gmail.com> Co-authored-by: follower <github@rancidbacon.com> Co-authored-by: gxalpha <beckmann.sebastian@outlook.de> Co-authored-by: jp9000 <obs.jim@gmail.com> Co-authored-by: jpark37 <jpark37@users.noreply.github.com> Co-authored-by: mntone <sd8@live.jp> Co-authored-by: tytan652 <tytan652@tytanium.xyz> Co-authored-by: wangshaohui <97082645@qq.com> Co-authored-by: wangshaohui <wang.shaohui@navercorp.com>
2022-05-22 07:11:33 +00:00
add_subdirectory(obs-vst)
check_obs_browser()
elseif(OS_LINUX)
add_subdirectory(linux-capture)
add_subdirectory(linux-pulseaudio)
add_subdirectory(linux-v4l2)
add_subdirectory(linux-jack)
add_subdirectory(linux-alsa)
add_subdirectory(linux-pipewire)
add_subdirectory(decklink)
add_subdirectory(vlc-video)
add_subdirectory(sndio)
obs-vst: Remove submodule in favour of direct merge 2/2 Please visit the submodule repo for blame history: https://github.com/obsproject/obs-vst This also replaces the obs-vst .clang-format with obs-studio's. This commit depends on the previous commit, which removes the submodule separately as Git complains otherwise. Co-authored-by: Alex Anderson <anderson.john.alexander@gmail.com> Co-authored-by: Anton <camotank12345@gmail.com> Co-authored-by: Blue Cat Audio <support@bluecataudio.com> Co-authored-by: Cephas Reis <c3r1c3@nevermindonline.com> Co-authored-by: Colin Edwards <colin@recursivepenguin.com> Co-authored-by: Florian Zwoch <fzwoch@gmail.com> Co-authored-by: Fogmoon <i@fogmoon.com> Co-authored-by: Gol-D-Ace <Gol-D-Ace@users.noreply.github.com> Co-authored-by: Igor Bochkariov <ujifgc@gmail.com> Co-authored-by: Jesse Chappell <jesse@sonosaurus.com> Co-authored-by: Keen <523059842@qq.com> Co-authored-by: Kurt Kartaltepe <kkartaltepe@gmail.com> Co-authored-by: Matt Gajownik <matt@obsproject.com> Co-authored-by: Matt Gajownik <matt@wizardcm.com> Co-authored-by: Richard Stanway <notr1ch@users.noreply.github.com> Co-authored-by: Ryan Foster <RytoEX@gmail.com> Co-authored-by: follower <github@rancidbacon.com> Co-authored-by: gxalpha <beckmann.sebastian@outlook.de> Co-authored-by: jp9000 <obs.jim@gmail.com> Co-authored-by: jpark37 <jpark37@users.noreply.github.com> Co-authored-by: mntone <sd8@live.jp> Co-authored-by: tytan652 <tytan652@tytanium.xyz> Co-authored-by: wangshaohui <97082645@qq.com> Co-authored-by: wangshaohui <wang.shaohui@navercorp.com>
2022-05-22 07:11:33 +00:00
add_subdirectory(obs-vst)
add_subdirectory(obs-qsv11)
check_obs_browser()
elseif(OS_FREEBSD)
add_subdirectory(linux-capture)
add_subdirectory(linux-pipewire)
add_subdirectory(linux-pulseaudio)
add_subdirectory(linux-v4l2)
add_subdirectory(linux-jack)
add_subdirectory(linux-alsa)
add_subdirectory(vlc-video)
add_subdirectory(oss-audio)
add_subdirectory(sndio)
obs_status(STATUS "obs-browser plugin not available.")
obs_status(STATUS "obs-vst plugin not available.")
elseif(OS_OPENBSD)
add_subdirectory(linux-capture)
add_subdirectory(sndio)
obs_status(STATUS "obs-browser plugin not available.")
obs_status(STATUS "obs-vst plugin not available.")
endif()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/obs-websocket/CMakeLists.txt)
add_subdirectory(obs-websocket)
else()
obs_status(FATAL_ERROR "obs-websocket submodule not available.")
endif()
add_subdirectory(image-source)
Implement encoder interface (still preliminary) - Implement OBS encoder interface. It was previously incomplete, but now is reaching some level of completion, though probably should still be considered preliminary. I had originally implemented it so that encoders only have a 'reset' function to reset their parameters, but I felt that having both a 'start' and 'stop' function would be useful. Encoders are now assigned to a specific video/audio media output each rather than implicitely assigned to the main obs video/audio contexts. This allows separate encoder contexts that aren't necessarily assigned to the main video/audio context (which is useful for things such as recording specific sources). Will probably have to do this for regular obs outputs as well. When creating an encoder, you must now explicitely state whether that encoder is an audio or video encoder. Audio and video can optionally be automatically converted depending on what the encoder specifies. When something 'attaches' to an encoder, the first attachment starts the encoder, and the encoder automatically attaches to the media output context associated with it. Subsequent attachments won't have the same effect, they will just start receiving the same encoder data when the next keyframe plays (along with SEI if any). When detaching from the encoder, the last detachment will fully stop the encoder and detach the encoder from the media output context associated with the encoder. SEI must actually be exported separately; because new encoder attachments may not always be at the beginning of the stream, the first keyframe they get must have that SEI data in it. If the encoder has SEI data, it needs only add one small function to simply query that SEI data, and then that data will be handled automatically by libobs for all subsequent encoder attachments. - Implement x264 encoder plugin, move x264 files to separate plugin to separate necessary dependencies. - Change video/audio frame output structures to not use const qualifiers to prevent issues with non-const function usage elsewhere. This was an issue when writing the x264 encoder, as the x264 encoder expects non-const frame data. Change stagesurf_map to return a non-const data type to prevent this as well. - Change full range parameter of video scaler to be an enum rather than boolean
2014-03-16 23:21:34 +00:00
add_subdirectory(obs-x264)
2014-05-22 10:07:17 +00:00
add_subdirectory(obs-libfdk)
add_subdirectory(obs-ffmpeg)
add_subdirectory(obs-outputs)
add_subdirectory(obs-filters)
add_subdirectory(obs-transitions)
add_subdirectory(rtmp-services)
2014-08-17 12:20:38 +00:00
add_subdirectory(text-freetype2)
aja: Capture and Output plugin for AJA Video Systems IO devices * aja: Initial commit of AJA capture/output plugin * aja: Fix clang-format on aja-output-ui code * aja: Remove script used during dev/testing * aja: Address pull request feedback from @RytoEX * aja: Remove the SDK sources and update CMakeLists to point to new headers-only/static libs dependency distribution. * aja: Only build AJA plugin on x64 on macOS for now * aja: Remove the non-English placeholder locale files. The english strings/files will be produced via crowdin, according to @ddrboxman. * aja: Add FindLibAJANTV2.cmake script to locate the ajantv2 headers and static libs in the OBS external deps package(s). Tested on Windows x64. macOS and Linux x64 TBD. * aja: Add ajantv2/includes to FindLibAJANTV2 include search paths * aja: Remove commented code from aja CMakeLists * aja: Remove debug code and comments that are no longer needed. * aja: Fix indentation * aja: Remove disablement of clang-format in routing table and SDIWireFormat map * aja: Use spaces for all indentation in widget crosspoint arrays where we disable clang-format * aja: Address code style comments made by @RytoEX * aja: Fix uneven indentation * aja: More fixes to if/else placement and remove superfluous comments. * aja: Rename 'dwns' to 'deactivateWhileNotShowing' for clarity. The DeckLink plugin still uses the variable name 'dwns' and should be changed, if desired, in a separate PR. * aja: Remove X11Extras dependency from AJA Output frontend plugin * aja: Add patch from Jim to find AJA release/debug libs * aja: Improve AV sync of queued video/audio sent to the AJA card in the AJA Output plugin.
2021-11-24 02:31:11 +00:00
add_subdirectory(aja)
add_subdirectory(obs-webrtc)