Commit Graph

352 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks af41557e4d cmake: Require CMake 3.26 configuration 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 5ce59b4c12 cmake: Update clang integration to 1.0 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 81ed7241ff cmake, code: Remove Displacement Filter completely 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 3bc23341d5 cmake: Disable features by default based on their stability 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks eea4cadca2 cmake: Improve bootstrapping and versioning code
Should fix the "'u': undeclared identifier" problem when code is generated from a shallow clone. Also fixes the issue where the clang submodule is required instead of optional.
2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 9735e1bcec ui/obs-browser-widget: Pull in browser-panel.hpp to fix MacOS
MacOS complains that QCefWidget is an undefined type, while all other compilers are fine.
2023-04-05 19:08:31 +02:00
Michael Fabian 'Xaymar' Dirks f8dc0532e1 cmake: Require an up to date C standard as well, plus extensions
Fixes some strange compiler issues.
2023-04-05 19:08:29 +02:00
Michael Fabian 'Xaymar' Dirks dadd56b31d ui/obs-browser-widget: Integrate OBS Browser Source as a Qt Widget
Provides us with an easy and clean way to use Browser Sources as a Qt enabled widget.
2023-04-05 19:08:29 +02:00
Michael Fabian 'Xaymar' Dirks 5a3954ae0e project: Fix License, License headers and Copyright information
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project.

Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
2023-04-05 18:59:08 +02:00
Michael Fabian 'Xaymar' Dirks 7f3ab14128 cmake, code: Remove unused files
These files are not used, and serve no purpose.
2023-04-05 18:59:05 +02:00
Michael Fabian 'Xaymar' Dirks 2871b9ccef cmake: Define global clang-tidy and clang-format targets 2023-04-05 18:59:02 +02:00
Michael Fabian 'Xaymar' Dirks b15fd787b6 cmake: Require generation of PATCH and TWEAK variables
Might fix the missing PROJECT_VERSION_TWEAK issue that has been encountered.
2023-04-05 18:59:02 +02:00
Michael Fabian 'Xaymar' Dirks 52afca38aa gfx/mipmapper: Move gs-mipmapper into proper directory
This is not an obs feature, so it shouldn't be in the obs directory.
2023-04-05 18:58:56 +02:00
Michael Fabian 'Xaymar' Dirks 9b8ef5ac74 gfx/util: Rename debug to util(ity)
They may be useful for debugging, but they are still utilities.
2023-04-05 18:58:55 +02:00
Michael Fabian 'Xaymar' Dirks 53ceddd784 cmake, templates: Remove code signing integration
Time has unfortunately broken this integration beyond the point of usefulness.
2023-04-05 18:58:51 +02:00
Michael Fabian 'Xaymar' Dirks 825f93fb24 cmake: Disable pointless structure padding warning 2023-04-05 18:58:49 +02:00
Romain Vigier 3d293bac6a cmake: Require nlohmann-json when building the front-end
Nlohmann-json is used in the about dialog, yet wasn't required when building the front-end, leading to failing compilation. This ensures that it is correctly required.
2023-04-05 18:58:45 +02:00
Michael Fabian 'Xaymar' Dirks d4ef043043 cmake: Export Loadable Bundles on MacOS
With OBS Studio 28.0.0 a new requirement was added to MacOS plugin: Loadable Bundles. These bundles are similar to Application Bundles, and have many of the same features, but are designed to be loaded by Applications instead of being the Application. This allows for almost all of the advantages to persist, with some minimal drawbacks.
2023-04-05 18:58:44 +02:00
Michael Fabian 'Xaymar' Dirks e3d0cabb09 cmake: Always show templates for all architectures 2023-04-05 18:58:43 +02:00
Michael Fabian 'Xaymar' Dirks c750fa9a5c cmake: Use `@rpath` on MacOS
This removes the additional patch steps after building, and are more stable across architectures.
2023-04-05 18:58:43 +02:00
Michael Fabian 'Xaymar' Dirks 9adc49b164 templates: Move MacOS-only files into dedicated folder 2023-04-05 18:58:43 +02:00
Michael Fabian 'Xaymar' Dirks 4382ad469f templates: Move Windows-only files into dedicated folder 2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks 7f1ae7f9f1 cmake: Require MacOSX 10.15 or newer 2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks f40c7a9906 cmake: Automatically discover data files
Prevents missing data due to it not being in the PROJECT_DATA variable. Bit of a hacky solution, but you gotta do what you gotta do to fix it.
2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks a66b46965e cmake: Add media files to IDE projects
These files should be ignored as they have the HEADER_FILE_ONLY flag set.
2023-04-05 18:58:42 +02:00
Michael Fabian 'Xaymar' Dirks 15bf5b8e64 cmake: Remove pointless floating math contract option 2023-04-05 18:58:40 +02:00
Michael Fabian 'Xaymar' Dirks 08544b4116 cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
Michael Fabian 'Xaymar' Dirks 678399ce81 cmake: Ignore not-so-useful warnings
These warnings are mostly hints or complete nonsense based on broken parsing. It is easier to disable them than to find a common solution that works on all compilers.
2023-04-05 18:58:36 +02:00
Michael Fabian 'Xaymar' Dirks bb79b574b5 cmake: Enable all warnings 2023-04-05 18:58:36 +02:00
Michael Fabian 'Xaymar' Dirks c1b832c03a cmake: Fix bad version strings
PROJECT_VERSION is defined by CMake, and can't be relied on.
2023-04-05 18:58:35 +02:00
Michael Fabian 'Xaymar' Dirks 9fbed3a319 cmake: Workaround for missing INTERFACE_INCLUDE_DIRECTORIES (MacOS)
This work-around adds the necessary include directories, as the 'libobs' target does not export any include directories visible without BUILD_INTERFACE evaluating to TRUE. Hopefully the true cause for this problem can be identified and fixed later.
2023-04-05 18:58:33 +02:00
Michael Fabian 'Xaymar' Dirks 1d066caed3 cmake: Set correct path for Qt6 binaries (MacOS) 2023-04-05 18:58:33 +02:00
Michael Fabian 'Xaymar' Dirks 730987ba77 cmake: Define SHOWWINDOW constants (Windows) 2023-04-05 18:58:31 +02:00
Michael Fabian 'Xaymar' Dirks 7937ff4a44 cmake: Remove Auto-Dependency system
While the system helped users get started quickly, it also presented a unique problem by itself. As CMake grew, the code that supported this system became more and more fragile to the point of failing at random, with no indication of why it would fail. Additionally as OBS Studio 28.0 adopted a much nicer system, it is no longer necessary to have this system at all.

As an addition to this change, all systems that could rely on FindModules now do so. This drastically reduces the complexity of the CMake system, while allowing significantly more flexibility with what binaries are really being used. In the best case this should allow a prepared user to build StreamFX by itself within seconds.
2023-04-05 18:58:31 +02:00
Michael Fabian 'Xaymar' Dirks 2acaf7c280 cmake: Support building with Qt5 and Qt6
This allows developers to pick their flavor of Qt, potentially enabling more advanced integrations with Qt in the future. Eventually Qt5 support may be dropped in favor of Qt6.

Fixes #811
2023-04-05 18:58:28 +02:00
Michael Fabian 'Xaymar' Dirks f10096da98 cmake: Unify project metadata across platforms 2023-04-05 18:58:28 +02:00
Michael Fabian 'Xaymar' Dirks a149531fb8 cmake: Upgrade version code to shared cmake-version module
This module handles parsing, generating, modifying and comparing of versions with pure CMake.
2023-04-05 18:58:28 +02:00
Michael Fabian 'Xaymar' Dirks e9283aec37 project: Add support for multi stage release cycles
To ensure better stability of future releases, we need to adopt multiple stages in the release cycle. As we already label Alpha, Beta, Candidate and Stable differently, simply adopting this classification system already does everything for us. This also allows us to maintain compatibility with the existing system, while offering something new entirely.
2023-04-05 18:58:27 +02:00
Michael Fabian 'Xaymar' Dirks 9e6171ab06 ci: Upgrade to LLVM/Clang 14.x 2023-04-05 18:58:26 +02:00
Michael Fabian 'Xaymar' Dirks d7dc5804d4 cmake: Update clang submodule
Fixes #799
2023-04-05 18:58:25 +02:00
Michael Fabian 'Xaymar' Dirks 0ea796de94 cmake: Fix some poorly formatted messages 2023-04-05 18:58:25 +02:00
Michael Fabian 'Xaymar' Dirks afdddd9381 cmake: Split optimizations by platform and compiler
Also make fast math optional on all platforms and compilers.
2023-04-05 18:58:25 +02:00
Michael Fabian 'Xaymar' Dirks a5b20c85b0 cmake: Add support for older libOBS versions
This is necessary for libOBS 27.2 and earlier, as the file name is LibObsConfig.cmake, not libobsConfig.cmake.
2023-04-05 18:58:24 +02:00
Michael Fabian 'Xaymar' Dirks 9fbbcdf89d cmake: Adjust install and package logic for libOBS 27.2
Also add basic support for libOBS 28.0
2023-04-05 18:58:24 +02:00
Michael Fabian 'Xaymar' Dirks 7e41414f57 cmake: Allow targeting a specific architecture level 2023-04-05 18:58:24 +02:00
Michael Fabian 'Xaymar' Dirks 5f050515ba cmake: Further improve libOBS and obs-frontend-api detection 2023-04-05 18:58:23 +02:00
Michael Fabian 'Xaymar' Dirks ad48e74410 cmake: Fix formatting 2023-04-05 18:58:23 +02:00
Michael Fabian 'Xaymar' Dirks 59411d42d5 cmake: Don't enable clang integration by default
Affects #799
2023-04-05 18:58:23 +02:00
Michael Fabian 'Xaymar' Dirks a5de211768 cmake: Add Link-Time Optimization option if supported 2023-04-05 18:58:23 +02:00
Michael Fabian 'Xaymar' Dirks 583ba282f8 cmake: Merge standalone detection into single conditional 2023-04-05 18:58:22 +02:00
Michael Fabian 'Xaymar' Dirks 65afefd0ba cmake: Use CMAKE_MESSAGE_INDENT if available 2023-04-05 18:58:22 +02:00
Michael Fabian 'Xaymar' Dirks 56f50fcc54 cmake: Require version 3.13 or newer 2023-04-05 18:58:22 +02:00
Michael Fabian 'Xaymar' Dirks 6852a2468b project: Version 0.12.0a1 2023-04-05 18:58:22 +02:00
Michael Fabian 'Xaymar' Dirks 9bbc35b293 obs/source: Refactor old deprecated classes 2023-04-05 18:58:21 +02:00
Michael Fabian 'Xaymar' Dirks f160580794 cmake: Improve build system with additional features and options
- Moved all auto-dependencies to a uniform subdirectory for easier caching and cleanup.
- Add an option to download or specify a path for libOBS+obs-frontend-api.
- Remove the dependency on the non-standard obs-frontend-apiConfig.cmake file.
- Add an option to download or specify a path for OBS Dependencies.
- Add an option to download or specify a path for Qt.
- Add an option to download or specify a path for AOM.
- Fix and improve architecture and platform detection.
- Fix some messages having two :, or no prefix at all.
- Fix detection of obs-frontend-api.
- Fix applying custom compiler and linker flags for MSVC and GNU-style builds.
- Use target_compile_options over add_compile_options for compatibility.
2023-04-05 18:58:20 +02:00
carsten.braun 0540a18f27 encoders/ffmpeg/dnxhr: Add Avid DNxHR Encoder based on FFmpeg 2023-04-05 18:58:18 +02:00
Michael Fabian 'Xaymar' Dirks 4d4db59b23 project: Version 0.11.0 2023-04-05 18:51:56 +02:00
Michael Fabian 'Xaymar' Dirks 53e9811f11 project: Version 0.11.0c1 2023-04-05 18:51:56 +02:00
Michael Fabian 'Xaymar' Dirks b72e4ee83e project: Version 0.11.0b3 2023-04-05 18:51:54 +02:00
Michael Fabian 'Xaymar' Dirks 292562b63e project: Version 0.11.0b2 2023-04-05 18:51:48 +02:00
Michael Fabian 'Xaymar' Dirks 7edda268e0 project: Version 0.11.0b1 2023-04-05 18:51:45 +02:00
Michael Fabian 'Xaymar' Dirks 1f78de676d cmake: Fix and improve Code Signing on Windows
It was sometimes impossible to sign the binaries on Windows, depending on how CMake was being run. By explicitly converting to the intended native format, we avoid this problem for most situations. Additionally we now support per-project certificates, instead of global certificates only. This also allows multiple uses of cmake-codesign in the same overall project.
2023-04-05 18:51:41 +02:00
Michael Fabian 'Xaymar' Dirks 655ff6e367 third-party: Add GLAD OpenGL wrapper 2023-04-05 18:51:40 +02:00
Michael Fabian 'Xaymar' Dirks 0e26018cd3 ci: Sign builds with the provided key automatically 2023-04-05 18:51:39 +02:00
Michael Fabian 'Xaymar' Dirks e7d17695c5 cmake: Add support for Code Signing on supported platforms 2023-04-05 18:51:39 +02:00
Michael Fabian 'Xaymar' Dirks 5d89b0d8b1 project: Version 0.11.0a8 2023-04-05 18:51:39 +02:00
Michael Fabian 'Xaymar' Dirks ad3ac69cd7 filter/auto-framing: Frame your face, automatically! 2023-04-05 18:51:36 +02:00
Michael Fabian 'Xaymar' Dirks e6ec0fc4c7 nvidia/ar/facedetection: Add Face Detection feature 2023-04-05 18:51:36 +02:00
Michael Fabian 'Xaymar' Dirks c1ecfe70b3 nvidia/ar/feature: Add wrapper for AR features 2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks 913ac4b309 nvidia/ar: Add modern wrapper for Maxine AR SDK 2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks c3440d2069 project: Remove undocumented "NVIDIA Face Tracking" feature
Originally intended to be an experiment with no future, it turned out to be very popular with streamers that move a lot. In the end it was popular enough that NVIDIA added their own variant to their Broadcast software, which works decently enough. Unfortunately my wrapper code around the library was written very poorly, so it didn't take long for it to break out of nowhere.
2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks 28fa127ead gfx/debug: Helper class to handle common debug rendering 2023-04-05 18:51:35 +02:00
Michael Fabian 'Xaymar' Dirks 22f0bd1da1 project: Version 0.11.0a7 2023-04-05 18:51:32 +02:00
Michael Fabian 'Xaymar' Dirks b4a7cc7f2f cmake: NVIDIA Video Effects SDK requires CUDA 2023-04-05 18:51:31 +02:00
Michael Fabian 'Xaymar' Dirks 6b0a14135c cmake: Fix is_feature_enabled and set_feature_disabled 2023-04-05 18:51:31 +02:00
Michael Fabian 'Xaymar' Dirks 90bb03779c filter/virtual-greenscreen: Add Virtual Greenscreen filter 2023-04-05 18:51:31 +02:00
Michael Fabian 'Xaymar' Dirks 6d20280956 nvidia/vfx/greenscreen: Simple wrapper for the Green Screen effect 2023-04-05 18:51:30 +02:00
Michael Fabian 'Xaymar' Dirks 1cb84fa6b5 project: Version 0.11.0a6 2023-04-05 18:51:26 +02:00
Michael Fabian 'Xaymar' Dirks d3808f3960 project: Version 0.11.0a5
- Updated the AOM library to libAOM v3.1.2-882-03b6f69.
- Fixed the Denoising filter not working correctly with unexpected sizes.
- Fixed the Denoising filter not rendering at the correct size.
- Fixed the Denoising and Upscaling filter destroying the Alpha channel.
- Fixed the Denoising filter running twice on the same image, resulting in a far worse image.
- Fixed Upscaling not automatically deciding on a proper scale factor for you when the selected one is not supported.
2023-04-05 18:51:23 +02:00
Michael Fabian 'Xaymar' Dirks 889fea6422 effects: Add standard effect file
There are a number of duplicate shader routines we should combine into a single shader to save disk space, and remove unexpected errors in one copy but not the other.
2023-04-05 18:51:22 +02:00
Michael Fabian 'Xaymar' Dirks 168d04293a project: Version 0.11.0a4
* The "Super Resolution" filter is now called "Upscaling" and in the future will support additional providers, like FidelityFX "Super-Resolution" and NVIDIA "Upscaling".
* The entire plugin now has identical logging behavior, so it should be easy to identify exact parts of the plugin in log files.
* A crash caused by log functions on Linux/Mac has been fixed, which was caused by reusing variable length arguments. (#632)
* Radeghast submitted a new 'Swirl' example shader. (#618)
* Added an AV1 encoder based on AOM-AV1, although its stability and quality may not be great so far.
* Denoising of Video content is now possible with the new "Denoising" filter on NVIDIA RTX hardware.
* Fixed a few bugs affecting the "Upscaling" (previously "Super Resolution") filter.
* Fixed references to NVIDIA missing the ®.
2023-04-05 18:51:19 +02:00
Michael Fabian 'Xaymar' Dirks a0fc00ed64 cmake: Fix incorrect target for interface include directories 2023-04-05 18:51:18 +02:00
Michael Fabian 'Xaymar' Dirks 247553fa74 filter/denoising: Add Denoising filter 2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks 843a76d1c6 filter/upscaling: 'Video Super-Resolution' -> 'Upscaling'
The previous name was too strict on what could be put into the effect, and would result in additional clutter in the Filter menu when we eventually decide to support other Upscaling methods than Super-Resolution networks.
2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks cebd8fa744 nvidia/vfx/effect: Implement managed effect wrapper
Slightly simplifies interaction with effects.
2023-04-05 18:51:16 +02:00
Michael Fabian 'Xaymar' Dirks 9a4ab558c0 encoders/aom-av1: AV1 encoder based on libaom 2023-04-05 18:51:15 +02:00
Michael Fabian 'Xaymar' Dirks 91c9df3097 project: Apply Coding Guidelines 2023-04-05 18:51:13 +02:00
Michael Fabian 'Xaymar' Dirks 668b8af213 project: Version 0.11.0a3 2023-04-05 18:51:12 +02:00
Michael Fabian 'Xaymar' Dirks 3dd65e8815 cmake: Check for provider instead of feature 2023-04-05 18:51:10 +02:00
Michael Fabian 'Xaymar' Dirks da339e6e26 project: Version 0.11.0a2 2023-04-05 18:51:09 +02:00
Michael Fabian 'Xaymar' Dirks bb03864664 filter/video-superresolution: Add Video Super-Resolution filter 2023-04-05 18:51:09 +02:00
Michael Fabian 'Xaymar' Dirks 02c6156f2e nvidia/vfx: Add wrapper for NVIDIA Video Effects SDK 2023-04-05 18:51:09 +02:00
Michael Fabian 'Xaymar' Dirks 04c3b88d5d nvidia/cv/texture: Wrapper for gs::texture Images 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks 8784c91ec6 nvidia/cv/image: Wrapper for Images 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks 84a7685d7b nvidia/cv: Add NVIDIA Computer Vision wrapper 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks 5279993f4b plugin: If CUDA is requested, ensure it is loaded first 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks 57f15b64f7 util/platform: Add Path and String conversion utility functions 2023-04-05 18:51:06 +02:00
Michael Fabian 'Xaymar' Dirks 8eef6ddd85 project: Version 0.11.0a1 2023-04-05 18:51:02 +02:00
Michael Fabian 'Xaymar' Dirks 5d4f88e614 gfx/blur: Reduce code duplication with shared file
A lot of the blur effects share quite a bit of code, which can be offloaded into a single include.
2023-04-05 18:51:01 +02:00
Michael Fabian 'Xaymar' Dirks bac7323357 cmake: Fix NVIDIA trademark 2023-04-05 18:50:55 +02:00