Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yd #1

Merged
merged 66 commits into from
Jan 4, 2024
Merged

yd #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
50c8560
cmake: Initial work towards component-ification
Xaymar Sep 3, 2023
25ba51d
code: Throw an error on nullptr for util::library::load
Xaymar Sep 3, 2023
9021274
cmake: Fix up missing linked objects in component system
Xaymar Sep 3, 2023
f26565c
cmake: Remove clang integration, as it breaks on the new system
Xaymar Sep 3, 2023
d82d390
cmake: Remove remnants of AOM AV1
Xaymar Sep 3, 2023
8fb37b8
cmake: Fix up missing sub-components due to add_subdirectory
Xaymar Sep 3, 2023
9840312
cmake: Fix missing public info, and remove PROJECT_NAME usage
Xaymar Sep 3, 2023
0ce977b
cmake: Uncomment still working code
Xaymar Sep 3, 2023
efb6e9f
cmake: Only enable Qt on components, not on the module
Xaymar Sep 3, 2023
d8a673a
cmake: Always provide at least one file to a target
Xaymar Sep 3, 2023
54cd3ee
cmake: Actually add sources to the Core component
Xaymar Sep 3, 2023
ac307a4
cmake: Add common include directories and fix Windows
Xaymar Sep 7, 2023
a3b80da
Update Contributor guidelines
Xaymar Sep 7, 2023
0af846e
Migrate building guide from wiki to code
Xaymar Sep 7, 2023
8f7dd1b
Remove useless pull request template
Xaymar Sep 7, 2023
3d3aef4
Reorder the template for issues and bugs
Xaymar Sep 7, 2023
cfcf975
fix: add decimal place to remove ambiguity
vantaboard Jul 21, 2023
6b02b76
Add prefix to commit titles when needed
Xaymar Sep 30, 2023
d2a543f
core: Clean up some older C++ code
Xaymar Sep 6, 2023
d5cf2d2
ffmpeg: Move into its own component
Xaymar Sep 6, 2023
ecaf39b
shader: Move into its own component
Xaymar Sep 7, 2023
792bf16
dynamic-mask: Move into its own component
Xaymar Sep 29, 2023
02f8ca8
transform: Move into its own component
Xaymar Sep 29, 2023
4f845ac
blur: Move into its own component
Xaymar Sep 29, 2023
5d5852c
color-grade: Move into its own component
Xaymar Sep 29, 2023
65e91fb
mirror: Move into its own component
Xaymar Sep 29, 2023
7ebe4f5
sdf-effects: Move into its own component
Xaymar Sep 29, 2023
d7d8253
autoframing: Move into its own component
Xaymar Sep 29, 2023
e3ddbe4
denoising: Move into its own component
Xaymar Sep 29, 2023
484c790
virtual-greenscreen: Move into its own component
Xaymar Sep 29, 2023
72b0dac
upscaling: Move into its own component
Xaymar Sep 29, 2023
e6c81ca
Always build Frontend and Updater
Xaymar Sep 29, 2023
090f49d
Add NVIDIA Maxine Audio Effects SDK as a third party dependency
Xaymar Sep 29, 2023
7c887c0
nvidia: Move into its own component
Xaymar Sep 29, 2023
434936b
Split Find/Resolve/Link component discovery stages
Xaymar Sep 29, 2023
a48a329
Update build guide with latest instructiosn
Xaymar Sep 29, 2023
92b93a2
nvidia: Add optional dependencies to the NVIDIA component
Xaymar Sep 30, 2023
0e913ed
Update component logic to support required and optional resolving
Xaymar Sep 30, 2023
4339a5f
Update copyright.js tool
Xaymar Sep 30, 2023
4cf2a39
Update Copyright headers
Xaymar Sep 30, 2023
92ddbd1
Fix up some dependency logic in component resolving
Xaymar Sep 30, 2023
afcd5df
nvidia: We only support Windows at the current time
Xaymar Sep 30, 2023
3239f5e
virtual-greenscreen: Check if NVIDIA component is available
Xaymar Sep 30, 2023
4ebc969
autoframing: Check if NVIDIA component is available
Xaymar Sep 30, 2023
34e754d
upscaling: Check if NVIDIA component is available
Xaymar Sep 30, 2023
a63eb8b
denoising: Check if NVIDIA component is available
Xaymar Sep 30, 2023
915c85e
core: Frontend and Updater are default features
Xaymar Sep 30, 2023
df70723
ffmpeg: Don't break on MacOS
Xaymar Sep 30, 2023
b9b4dba
nvidia: Actually test for windows
Xaymar Sep 30, 2023
4982a79
Fix incorrect target_compile_definitions calls
Xaymar Sep 30, 2023
7fb8c6f
nvidia: Require explicit set/get commands
Xaymar Sep 30, 2023
ef55651
nvidia: Fix missing includes
Xaymar Sep 30, 2023
1eecb35
autoframing: I have no idea why this is necessary
Xaymar Sep 30, 2023
0b99ef1
nvidia: Fix header includes now that they're in include not source
Xaymar Sep 30, 2023
54b6df0
Potential fix for linker issues
Xaymar Oct 1, 2023
2277c60
Opt for more modern linkers on CI
Xaymar Oct 1, 2023
34f0306
Remove Qt 5.x and Ubuntu 20.04 builds
Xaymar Oct 1, 2023
9a8be4d
Fix up bundles for MacOS installation
Xaymar Oct 4, 2023
0efbaa6
Strip out unnecessary packaging logic
Xaymar Oct 4, 2023
487769f
Fix link ordering errors with ld on Linux
nuudlman Oct 3, 2023
b5c4c27
Switch to AsciiDoc
Xaymar Oct 4, 2023
69a6849
Github wants .adoc, not .ad
Xaymar Oct 4, 2023
b373ba1
Fix up copyright headers once again
Xaymar Oct 4, 2023
43dbd81
Don't set values that may have side effects during build tests
Xaymar Oct 4, 2023
e0ffe85
Simplify the CMake file even more
Xaymar Oct 5, 2023
bbcce86
Fix or disable some useless warnings
Xaymar Oct 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ title: "REPLACE ME"
description: "This form is for bug and crash reports only, primarily used by developers. Abuse of this form will lead to a permanent interaction ban."
labels: ["bug"]
body:
- type: textarea
attributes:
label: "OBS Studio Logs"
description: "Paste the content or attach the log files from OBS Studio here. In the event of a crash, paste or attach both the crash log and the normal log file."
validations:
required: true
- type: textarea
attributes:
label: "Current and Expected Behavior"
Expand All @@ -25,6 +19,12 @@ body:
description: "What steps are required to consistently reproduce the bug/crash/freeze?"
validations:
required: true
- type: textarea
attributes:
label: "Log files & Crash Dumps"
description: "Paste the content or attach the log files from OBS Studio here. In the event of a crash, paste or attach both the crash log and the normal log file."
validations:
required: false
- type: textarea
attributes:
label: "Any additional Information we need to know?"
15 changes: 0 additions & 15 deletions .github/pull_request_template.md

This file was deleted.

31 changes: 7 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,24 +312,13 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: [ "ubuntu-22.04", "ubuntu-20.04" ]
compiler: [ "GCC-12", "GCC-11", "Clang-16" ]
qt: [ 5, 6 ]
runner: [ "ubuntu-22.04" ]
compiler: [ "GCC-12", "Clang-16" ]
qt: [ 6 ]
CMAKE_GENERATOR: [ "Ninja Multi-Config" ]
exclude:
- runner: "ubuntu-22.04"
qt: 5
- runner: "ubuntu-22.04"
compiler: "GCC-11"
- runner: "ubuntu-20.04"
qt: 6
- runner: "ubuntu-20.04"
compiler: "GCC-12"
include:
- runner: "ubuntu-22.04"
name: "Ubuntu 22.04"
- runner: "ubuntu-20.04"
name: "Ubuntu 20.04"
runs-on: "${{ matrix.runner }}"
name: "${{ matrix.name }} (${{ matrix.compiler }}, Qt${{ matrix.qt }})"
env:
Expand Down Expand Up @@ -359,6 +348,7 @@ jobs:

echo "CMAKE_C_COMPILER=gcc-${compiler[1]}" >> "$GITHUB_ENV"
echo "CMAKE_CXX_COMPILER=g++-${compiler[1]}" >> "$GITHUB_ENV"
echo "CMAKE_LINKER=gold" >> "$GITHUB_ENV"
elif [[ "${compiler[0]}" == "Clang" ]]; then
curl -jLo /tmp/llvm.sh "https://apt.llvm.org/llvm.sh"
chmod +x /tmp/llvm.sh
Expand All @@ -373,6 +363,7 @@ jobs:

echo "CMAKE_C_COMPILER=clang-${compiler[1]}" >> "$GITHUB_ENV"
echo "CMAKE_CXX_COMPILER=clang++-${compiler[1]}" >> "$GITHUB_ENV"
echo "CMAKE_LINKER=ld.lld-${compiler[1]}" >> "$GITHUB_ENV"
else
echo "Unknown Compiler"
exit 1
Expand All @@ -381,13 +372,8 @@ jobs:
id: qt
shell: bash
run: |
if [[ ${{ matrix.qt }} -eq 5 ]]; then
sudo apt-get -y install -V \
qtbase5-dev qtbase5-private-dev libqt5svg5-dev
elif [[ ${{ matrix.qt }} -eq 6 ]]; then
sudo apt-get -y install -V \
qt6-base-dev qt6-base-private-dev libqt6svg6-dev libgles2-mesa-dev libegl1-mesa-dev libgl1-mesa-dev
fi
sudo apt-get -y install -V \
qt6-base-dev qt6-base-private-dev libqt6svg6-dev libgles2-mesa-dev libegl1-mesa-dev libgl1-mesa-dev
- name: "Dependency: Prebuilt OBS Studio Dependencies"
id: obsdeps
shell: bash
Expand Down Expand Up @@ -458,9 +444,6 @@ jobs:
-DCMAKE_C_COMPILER="${{ env.CMAKE_C_COMPILER }}" \
-DCMAKE_CXX_COMPILER="${{ env.CMAKE_CXX_COMPILER }}" \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/build/ci/install" \
-DPACKAGE_NAME="streamfx-${{ env.PACKAGE_NAME }}" \
-DPACKAGE_PREFIX="${{ github.workspace }}/build/package" \
-Dlibobs_DIR="${{ github.workspace }}/build/obs/install"
- name: "Build: Debug"
continue-on-error: true
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@
[submodule "third-party/obs-studio"]
path = third-party/obs-studio
url = https://github.com/obsproject/obs-studio.git
[submodule "third-party/nvidia-maxine-afx-sdk"]
path = third-party/nvidia-maxine-afx-sdk
url = https://github.com/NVIDIA/MAXINE-AFX-SDK.git
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ Michael Fabian 'Xaymar' Dirks <[email protected]> <[email protected]>
Vainock <[email protected]> <[email protected]>
Charles Fettinger <[email protected]> <[email protected]>
Charles Fettinger <[email protected]> <[email protected]>
Radegast Stravinsky <[email protected]> <[email protected]>
Radegast Stravinsky <[email protected]> <[email protected]>
Carsten Braun <[email protected]> <[email protected]>
153 changes: 153 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Building
This document intends to guide you through the process of building StreamFX. It requires understanding of the tools used, and may require you to learn tools yourself before you can advance further in the guide. It is intended to be used by developers and contributors.

## Building Bundled
<details open><summary>The main method to build StreamFX is to first set up an OBS Studio copy and then integrate the StreamFX repository into it.</summary>

1. [Uninstall](Uninstallation) any currently installed versions of StreamFX to prevent conflicts.
2. Follow the [OBS Studio build guide](https://obsproject.com/wiki/install-instructions) for automated building on your platform of choice.
- **MacOS:** You will need to use the XCode generator to build StreamFX as the Ninja generator does not support the flags StreamFX requires.
3. Integrate StreamFX into the OBS Studio build flow:
1. Navigate to `<obs studio source>/UI/frontend-plugins`
2. Open a `git` enabled shell (git-bash on windows).
3. Run `git submodule add 'https://github.com/Xaymar/obs-StreamFX.git' streamfx`.
4. Run `git submodule update --init --recursive`.
5. Append the line `add_subdirectory(streamfx)` to the `CMakeLists.txt` file in the same directory.
4. Run the same steps from the build guide in step 2 again.
5. Done. StreamFX is now part of the build.

</details>

## Building CI-Style
<details><summary>This method is designed for continuous integration and releases, and requires significant knowledge of CMake, OBS, and various other tools. Additionally it is not guaranteed to work on every machine, as it is only designed for use in continuous integration and nowhere else. It may even stop being maintained entirely with no warning whatsoever. You are entirely on your own when you choose this method.</summary>

#### Install Prerequisites / Dependencies
- [Git](https://git-scm.com/)
- **Debian / Ubuntu:** `sudo apt install git`
- [CMake](https://cmake.org/) 3.20 (or newer)
- **Debian / Ubuntu:** `sudo apt install cmake`
- A compatible Compiler:
- **Windows**
[Visual Studio](https://visualstudio.microsoft.com/vs/) 2019 (or newer)
- **MacOS**
Xcode 11.x (or newer) for x86_64
Xcode 12.x (or newer) for arm64
- **Debian / Ubuntu**
- Essential Build Tools:
`sudo apt install build-essential pkg-config checkinstall make ninja-build`
- One of:
- GCC 11 (or newer)
`sudo apt install gcc-11 g++-11`
- [LLVM](https://releases.llvm.org/) Clang 14 (or newer)
`sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"`
- One of:
- ld or gold
`sudo apt install binutils`
- [LLVM](https://releases.llvm.org/) lld
`sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"`
- [mold](https://github.com/rui314/mold)
`sudo apt install mold`
- [Qt](https://www.qt.io/) 6:
- **Windows**
A Node.JS based tool is provided toread and parse the `/third-party/obs-studio/buildspec.json` file. See `/.github/workflows/main.yml` on usage and output parsing.
- **MacOS**
A Node.JS based tool is provided toread and parse the `/third-party/obs-studio/buildspec.json` file. See `/.github/workflows/main.yml` on usage and output parsing.
- **Debian / Ubuntu:**
`sudo apt install qt6-base-dev qt6-base-private-dev libqt6svg6-dev`
- [CURL](https://curl.se/):
- **Windows**
A Node.JS based tool is provided toread and parse the `/third-party/obs-studio/buildspec.json` file. See `/.github/workflows/main.yml` on usage and output parsing.
- **MacOS**
A Node.JS based tool is provided toread and parse the `/third-party/obs-studio/buildspec.json` file. See `/.github/workflows/main.yml` on usage and output parsing.
- **Debian / Ubuntu:**
`sudo apt install libcurl4-openssl-dev`
- [FFmpeg](https://ffmpeg.org/) (Optional, for FFmpeg component only):
- **Windows**
A Node.JS based tool is provided toread and parse the `/third-party/obs-studio/buildspec.json` file. See `/.github/workflows/main.yml` on usage and output parsing.
- **MacOS**
A Node.JS based tool is provided toread and parse the `/third-party/obs-studio/buildspec.json` file. See `/.github/workflows/main.yml` on usage and output parsing.
- **Debian / Ubuntu**
`sudo apt install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev`
- [LLVM](https://releases.llvm.org/) (Optional, for clang-format and clang-tidy integration only):
- **Debian / Ubuntu**
`sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" all`
- [InnoSetup](https://jrsoftware.org/isinfo.php) (Optional, for **Windows** installer only)

### Cloning the Project
Using your preferred tool of choice for git, clone the repository including all submodules into a directory. If you use git directly, then you can clone the entire project with `git clone --recursive https://github.com/Xaymar/obs-StreamFX.git streamfx`.

### Configuring with CMake
There are two ways to handle this step, with the GUI variant of CMake and with the command line version of CMake. This guide will focus on the GUI variant, but all the steps below can be done with the command line version as well.

1. Launch CMake-GUI and wait for it to open.
2. Click the button named `Browse Build` and point it at an empty folder. For example, create a folder in the project called `build` and select that folder.
3. Click the button named `Browse Source` and point it at the project itself.
4. Click the button named `Configure`, select your preferred Generator (the default is usually fine), and wait for it to complete. This will most likely result in an error which is expected.
5. Adjust the variables in the variable list as necessary. Take a look at [the documentation](#CMake-Options) for what each option does.
6. Click the button named `Generate`, which will also run `Configure`. Both together should succeed if you did everything correctly.
7. If available, you can now click the button named `Open Project` to immediately jump into your IDE of choice.

</details>

## CMake Options
<details><summary>The project is intended to be versatile and configurable, so we offer almost everything to be configured on a silver platter directly in CMake (if possible). If StreamFX detects that it is being built together with other projects, it will automatically prefix all options with `StreamFX_` to prevent collisions.</summary>

### Generic
- `GIT` (not prefixed)
Path to the `git` binary on your system, for use with features that require git during configuration and generation.
- `VERSION`
Set or override the version of the project with a custom one. Allowed formats are: SemVer 2.0.0, CMake.

### Code
- `ENABLE_CLANG`
Enable integration of `clang-format` and `clang-tidy`
- `CLANG_PATH` (not prefixed, only with `ENABLE_CLANG`)
Path to the `clang` installation containing `clang-format` and `clang-tidy`. Only used as a hint.
- `CLANG_FORMAT_PATH` and `CLANG_TIDY_PATH` (not prefixed)
Path to `clang-format` and `clang-tidy` that will be used.

### Dependencies
- `LibObs_DIR`
Path to the obs-studio libraries.
- `Qt5_DIR`, `Qt6_DIR` or `Qt_DIR` (autodetect)
Path to Qt5 (OBS Studio 27.x and lower) or Qt6 (OBS Studio 28.x and higher).
- `FFmpeg_DIR`
Path to compatible FFmpeg libraries and headers.
- `CURL_DIR`
Path to compatible CURL libraries and headers.
- `AOM_DIR`
Path to compatible AOM libraries and headers.

### Compiling
- `ENABLE_FASTMATH`
Enable fast math optimizations if the compiler supports them. This trades precision for performance, and is usually good enough anyway.
- `ENABLE_LTO`
Enable link time optimization for faster binaries in exchange for longer build times.
- `ENABLE_PROFILING`
Enable CPU and GPU profiling code, this option reduces performance drastically.
- `TARGET_*`
Specify which architecture target the generated binaries will use.

### Components
- `COMPONENT_<NAME>`
Enable the component by the given name.

### Installing & Packaging
These options are only available in CI-Style mode.

- `CMAKE_INSTALL_PREFIX`
The path in which installed content should be placed when building the `install` target.
- `STRUCTURE_PACKAGEMANAGER`
If enabled will install files in a layout compatible with package managers.
- `STRUCTURE_UNIFIED`
Enable to install files in a layout compatible with an OBS Studio plugin manager.
- `PACKAGE_NAME`
The name of the packaged archive, excluding the prefix, suffix and extension.
- `PACKAGE_PREFIX`
The path in which the packages should be placed.
- `PACKAGE_SUFFIX`
The suffix to attach to the name, before the file extension. If left blank will attach the current version string to the package.
- `STRUCTURE_UNIFIED`
Enable to replace the PACKAGE_ZIP target with a target that generates a single `.obs` file instead.

</details>
Loading
Loading