Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
96 changes: 7 additions & 89 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ env:
CEF_BUILD_VERSION_LINUX: '5060'
CEF_BUILD_VERSION_WIN: '5060'
QT_VERSION_MAC: '6.3.1'
QT_HASH_MAC_X86_64: 'a83f72a11023b03b6cb2dc365f0a66ad9df31163bbb4fe2df32d601856a9fad3'
QT_HASH_MAC_ARM64: '2f30af90c049670a5660656adbb440668aa1b0567f75a5f29e1def9108928403'
QT_HASH_MAC_UNIVERSAL: '252e6684f43ab9c6f262c73af739e2296ce391b998da2c4ee04c254aaa07db18'
QT_HASH_MAC_X86_64: 'dbd67cee6cd4fb9e6e15ed9053910895ab94c6b53b77d58c87e4b81d99979489'
QT_HASH_MAC_ARM64: 'de4241a34c755da481364c439675f3489d4e063fae4868996058f869a8f9c72e'
QT_HASH_MAC_UNIVERSAL: '8b86d24da1d6d240ace19ecc0f81ac0e8f72c5a925b3e5f841637d64c8d65b03'
QT_VERSION_WIN: '6.3.1'
DEPS_VERSION_MAC: '2022-08-02'
DEPS_HASH_MAC_X86_64: '7637e52305e6fc53014b5aabd583f1a4490b1d97450420e977cae9a336a29525'
DEPS_HASH_MAC_ARM64: '755e0fa69b17a3ae444e1befa9d91d77e3cafe628fbd1c6333686091826595cd'
DEPS_VERSION_WIN: '2022-08-02'
DEPS_VERSION_MAC: '2022-10-19'
DEPS_HASH_MAC_X86_64: '77fb53b600c54085b87a99e7927448fe0e8ceb4cb186f919a82a43f8a14103ad'
DEPS_HASH_MAC_ARM64: '9a82706380b00f0b6f91ee2146e135ce6cb4788ce7ead23d81d78d5d075718a6'
DEPS_VERSION_WIN: '2022-10-19'
VLC_VERSION_MAC: '3.0.8'
VLC_HASH_MAC: 'e0149ef4a20a19b9ecd87309c2d27787ee3f47dfd47c6639644bc1f6fd95bdf6'
VLC_VERSION_WIN: '3.0.0-git'
Expand Down Expand Up @@ -199,88 +199,6 @@ jobs:
name: 'obs-studio-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }}'
path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'

linux_build:
name: '02 - Linux'
runs-on: ${{ matrix.ubuntu }}
strategy:
matrix:
ubuntu: ['ubuntu-20.04', 'ubuntu-22.04']
if: always()
needs: [clang_check]
defaults:
run:
shell: bash
working-directory: 'obs-studio'
env:
BUILD_FOR_DISTRIBUTION: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
submodules: 'recursive'
path: 'obs-studio'
fetch-depth: 0

- name: 'Check for Github Labels'
if: github.event_name == 'pull_request'
run: |
if test -n "$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "${{ github.event.pull_request.url }}" | jq -e '.labels[] | select(.name == "Seeking Testers")')"; then
echo "SEEKING_TESTERS=1" >> $GITHUB_ENV
else
echo "SEEKING_TESTERS=0" >> $GITHUB_ENV
fi

echo "CACHE_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV

- name: 'Restore ccache from cache'
id: ccache-cache
uses: actions/cache@v3
env:
CACHE_NAME: 'ccache-cache'
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ matrix.ubuntu }}-${{ env.CACHE_DATE }}

- name: 'Restore Chromium Embedded Framework from cache'
id: cef-cache
uses: actions/cache@v3
env:
CACHE_NAME: 'cef-cache'
with:
path: ${{ github.workspace }}/obs-build-dependencies/cef_binary_${{ env.CEF_BUILD_VERSION_LINUX }}_linux64
key: ${{ runner.os }}-pr-${{ env.CACHE_NAME }}-${{ env.CEF_BUILD_VERSION_LINUX }}-${{ env.CACHE_REVISION }}

- name: 'Setup build environment'
id: setup
run: |
echo "commitHash=$(git rev-parse --short=9 HEAD)" >> $GITHUB_OUTPUT

- name: 'Install dependencies'
env:
RESTORED_CEF: ${{ steps.cef-cache.outputs.cache-hit }}
run: CI/linux/01_install_dependencies.sh --disable-pipewire

- name: 'Build OBS'
run: CI/linux/02_build_obs.sh --disable-pipewire

- name: 'Run tests'
if: success()
run: cmake --build build -t test

- name: 'Create build artifact'
if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
run: |
CI/linux/03_package_obs.sh
ARTIFACT_NAME=$(basename $(/usr/bin/find build -maxdepth 1 -type f -name "obs-studio-*.deb" | sort -rn | head -1))
echo "FILE_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV

- name: 'Upload build Artifact'
if: ${{ success() && (github.event_name != 'pull_request' || env.SEEKING_TESTERS == '1') }}
uses: actions/upload-artifact@v3
with:
name: 'obs-studio-${{ matrix.ubuntu }}-${{ steps.setup.outputs.commitHash }}'
path: '${{ github.workspace }}/obs-studio/build/${{ env.FILE_NAME }}'

windows_build:
name: '02 - Windows'
runs-on: [windows-2022]
Expand Down
15 changes: 15 additions & 0 deletions CI/flatpak/com.obsproject.Studio.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,21 @@
}
]
},
{
"name": "ads",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts":[
"-DCMAKE_BUILD_TYPE=Release"
],
"sources": [
{
"type": "git",
"url": "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git",
"tag": "3.8.3"
}
]
},
{
"name": "cef",
"buildsystem": "cmake-ninja",
Expand Down
4 changes: 2 additions & 2 deletions CI/macos/01_install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install_obs-deps() {
status "Set up precompiled macOS OBS dependencies v${1}"
ensure_dir "${DEPS_BUILD_DIR}"
step "Download..."
check_and_fetch "https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-${1}-${ARCH:-x86_64}.tar.xz" "${2}"
check_and_fetch "https://github.com/tytan652/obs-deps/releases/download/${1}/macos-deps-${1}-${ARCH:-x86_64}.tar.xz" "${2}"
mkdir -p obs-deps
step "Unpack..."
/usr/bin/tar -xf "./macos-deps-${1}-${ARCH:-x86_64}.tar.xz" -C ./obs-deps
Expand All @@ -35,7 +35,7 @@ install_qt-deps() {
_HASH="${2}"
fi

check_and_fetch "https://github.com/obsproject/obs-deps/releases/download/${1}/macos-deps-qt6-${1}-${_ARCH}.tar.xz" "${_HASH}"
check_and_fetch "https://github.com/tytan652/obs-deps/releases/download/${1}/macos-deps-qt6-${1}-${_ARCH}.tar.xz" "${_HASH}"
mkdir -p obs-deps
step "Unpack..."
/usr/bin/tar -xf "./macos-deps-qt6-${1}-${_ARCH}.tar.xz" -C ./obs-deps
Expand Down
4 changes: 2 additions & 2 deletions CI/windows/01_install_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Function Install-obs-deps {

Write-Step "Download..."
$ProgressPreference = $(if ($Quiet.isPresent) { "SilentlyContinue" } else { "Continue" })
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/${Version}/windows-deps-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-${Version}-${ArchSuffix}.zip"
Invoke-WebRequest -Uri "https://github.com/tytan652/obs-deps/releases/download/${Version}/windows-deps-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-${Version}-${ArchSuffix}.zip"
$ProgressPreference = "Continue"

Write-Step "Unpack..."
Expand All @@ -58,7 +58,7 @@ function Install-qt-deps {

Write-Step "Download..."
$ProgressPreference = $(if ($Quiet.isPresent) { 'SilentlyContinue' } else { 'Continue' })
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/${Version}/windows-deps-qt6-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-qt6-${Version}-${ArchSuffix}.zip"
Invoke-WebRequest -Uri "https://github.com/tytan652/obs-deps/releases/download/${Version}/windows-deps-qt6-${Version}-${ArchSuffix}.zip" -UseBasicParsing -OutFile "windows-deps-qt6-${Version}-${ArchSuffix}.zip"
$ProgressPreference = "Continue"

Write-Step "Unpack..."
Expand Down
28 changes: 24 additions & 4 deletions UI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ add_subdirectory(frontend-plugins)
add_executable(obs)

find_qt(COMPONENTS Widgets Network Svg Xml COMPONENTS_LINUX Gui)
find_package(qtadvanceddocking CONFIG REQUIRED)

target_link_libraries(obs PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network)
target_link_libraries(obs PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network
ads::qtadvanceddocking)

set_target_properties(
obs
Expand All @@ -98,11 +100,17 @@ target_sources(
forms/OBSAbout.ui
forms/OBSAdvAudio.ui
forms/OBSBasic.ui
forms/OBSBasicCentral.ui
forms/OBSBasicControls.ui
forms/OBSBasicFilters.ui
forms/OBSBasicInteraction.ui
forms/OBSBasicMixer.ui
forms/OBSBasicScenes.ui
forms/OBSBasicSettings.ui
forms/OBSBasicSources.ui
forms/OBSBasicSourceSelect.ui
forms/OBSBasicTransform.ui
forms/OBSBasicTransitions.ui
forms/OBSBasicVCamConfig.ui
forms/OBSExtraBrowsers.ui
forms/OBSImporter.ui
Expand Down Expand Up @@ -191,8 +199,6 @@ target_sources(
properties-view.cpp
properties-view.hpp
properties-view.moc.hpp
record-button.cpp
record-button.hpp
remote-text.cpp
remote-text.hpp
scene-tree.cpp
Expand Down Expand Up @@ -223,7 +229,20 @@ target_sources(

target_sources(
obs
PRIVATE window-basic-about.cpp
PRIVATE basic-central.cpp
basic-central.hpp
basic-controls.cpp
basic-controls.hpp
basic-controls-button.hpp
basic-mixer.cpp
basic-mixer.hpp
basic-scenes.cpp
basic-scenes.hpp
basic-sources.cpp
basic-sources.hpp
basic-transitions.cpp
basic-transitions.hpp
window-basic-about.cpp
window-basic-about.hpp
window-basic-auto-config.cpp
window-basic-auto-config.hpp
Expand Down Expand Up @@ -261,6 +280,7 @@ target_sources(
window-basic-transform.cpp
window-basic-transform.hpp
window-basic-preview.hpp
window-basic-vcam.hpp
window-basic-vcam-config.cpp
window-basic-vcam-config.hpp
window-dock.cpp
Expand Down
18 changes: 9 additions & 9 deletions UI/api-interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "qt-wrappers.hpp"
#include "window-basic-main.hpp"
#include "window-basic-main-outputs.hpp"
#include "basic-central.hpp"

#include <functional>

Expand Down Expand Up @@ -76,8 +77,8 @@ struct OBSStudioAPI : obs_frontend_callbacks {
void obs_frontend_get_scenes(
struct obs_frontend_source_list *sources) override
{
for (int i = 0; i < main->ui->scenes->count(); i++) {
QListWidgetItem *item = main->ui->scenes->item(i);
for (int i = 0; i < main->GetScenes()->count(); i++) {
QListWidgetItem *item = main->GetScenes()->item(i);
OBSScene scene = GetOBSRef<OBSScene>(item);
obs_source_t *source = obs_scene_get_source(scene);

Expand Down Expand Up @@ -113,9 +114,8 @@ struct OBSStudioAPI : obs_frontend_callbacks {
void obs_frontend_get_transitions(
struct obs_frontend_source_list *sources) override
{
for (int i = 0; i < main->ui->transitions->count(); i++) {
obs_source_t *tr = main->ui->transitions->itemData(i)
.value<OBSSource>();
for (int i = 0; i < main->transitions.count(); i++) {
obs_source_t *tr = main->transitions[i];

if (!tr)
continue;
Expand All @@ -141,13 +141,13 @@ struct OBSStudioAPI : obs_frontend_callbacks {

int obs_frontend_get_transition_duration(void) override
{
return main->ui->transitionDuration->value();
return main->transitionDuration;
}

void obs_frontend_set_transition_duration(int duration) override
{
QMetaObject::invokeMethod(main->ui->transitionDuration,
"setValue", Q_ARG(int, duration));
QMetaObject::invokeMethod(main, "SetTransitionDuration",
Q_ARG(int, duration));
}

void obs_frontend_release_tbar(void) override
Expand Down Expand Up @@ -554,7 +554,7 @@ struct OBSStudioAPI : obs_frontend_callbacks {
void obs_frontend_set_preview_enabled(bool enable) override
{
if (main->previewEnabled != enable)
main->EnablePreviewDisplay(enable);
main->centralWidget->EnablePreviewDisplay(enable);
}

obs_source_t *obs_frontend_get_current_preview_scene(void) override
Expand Down
Loading