diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 839c9545..f4067645 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -69,8 +69,8 @@ body:
label: obs-websocket Version
description: What version of obs-websocket are you using?
options:
+ - 5.0.0-alpha3
- 5.0.0-alpha2
- - 5.0.0-alpha1
- 4.9.1
- 4.9.0
- Git
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 50e63703..93b7dad7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,4 +1,4 @@
-name: "CI Multiplatform Build"
+name: 'CI Multiplatform Build'
on:
push:
@@ -18,15 +18,15 @@ on:
jobs:
windows:
name: 'Windows 32/64-bit'
- runs-on: [windows-latest]
+ runs-on: [windows-2019]
if: contains(github.event.head_commit.message, '[skip ci]') != true
env:
QT_CACHE_VERSION: '2' # Change whenever updating OBS dependencies URL, in order to force a cache reset
QT_VERSION: '5.15.2'
WINDOWS_DEPS_CACHE_VERSION: '1' # Change whenever updating Qt dependency URL, in order to force a cache reset
WINDOWS_DEPS_VERSION: '2019'
- CMAKE_GENERATOR: "Visual Studio 16 2019"
- CMAKE_SYSTEM_VERSION: "10.0"
+ CMAKE_GENERATOR: 'Visual Studio 16 2019'
+ CMAKE_SYSTEM_VERSION: '10.0'
steps:
- name: 'Add msbuild to PATH'
uses: microsoft/setup-msbuild@v1.0.2
@@ -35,20 +35,20 @@ jobs:
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- - name: 'Checkout OBS-Studio'
+ - name: 'Checkout OBS Studio'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- - name: 'Get OBS-Studio Git Info'
+ - name: 'Get OBS Studio Git Info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- - name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
+ - name: 'Checkout last OBS Studio release (${{ env.OBS_GIT_TAG }})'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
@@ -78,8 +78,6 @@ jobs:
with:
path: Qt_${{ env.QT_VERSION }}.7z
key: 'qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}'
- restore-keys: |
- qtdep-${{ env.QT_CACHE_VERSION }} | ${{ runner.os }}
- name: 'Download Prerequisite: Qt'
if: steps.qtcache.outputs.cache-hit != 'true'
run: |
@@ -87,20 +85,18 @@ jobs:
- name: 'Extract Prerequisite: Qt'
run: |
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
- - name: 'Restore Cached OBS-Studio Dependencies'
+ - name: 'Restore Cached OBS Studio Dependencies'
id: obscache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}\cmbuild\deps\**
key: 'obsdep-${{ env.WINDOWS_DEPS_CACHE_VERSION }} | ${{ runner.os }}'
- restore-keys: |
- obsdep-${{ env.WINDOWS_DEPS_CACHE_VERSION }} | ${{ runner.os }}
- - name: 'Install Prerequisite: Pre-built OBS-Studio dependencies'
+ - name: 'Install Prerequisite: Pre-built OBS Studio dependencies'
if: steps.obscache.outputs.cache-hit != 'true'
run: |
curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C -
7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps"
- - name: 'Restore OBS-Studio 32-bit Build v${{ env.OBS_GIT_TAG }} from Cache'
+ - name: 'Restore OBS Studio 32-bit Build v${{ env.OBS_GIT_TAG }} from Cache'
id: build-cache-obs-32
uses: actions/cache@v2
env:
@@ -108,22 +104,20 @@ jobs:
with:
path: ${{ github.workspace }}/obs-studio/build32
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
- restore-keys: |
- ${{ runner.os }}-${{ env.CACHE_NAME }}-
- - name: 'Configure OBS-Studio 32-bit'
+ - name: 'Configure OBS Studio 32-bit'
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
if(!(Test-Path -Path ".\build32")){New-Item -ItemType directory -Path .\build32}
cd .\build32
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF ..
- - name: 'Build OBS-Studio 32-bit'
+ - name: 'Build OBS Studio 32-bit'
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj
- - name: 'Restore OBS-Studio 64-bit Build v${{ env.OBS_GIT_TAG }} from Cache'
+ - name: 'Restore OBS Studio 64-bit Build v${{ env.OBS_GIT_TAG }} from Cache'
id: build-cache-obs-64
uses: actions/cache@v1
env:
@@ -131,16 +125,14 @@ jobs:
with:
path: ${{ github.workspace }}/obs-studio/build64
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
- restore-keys: |
- ${{ runner.os }}-${{ env.CACHE_NAME }}-
- - name: 'Configure OBS-Studio 64-bit'
+ - name: 'Configure OBS Studio 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
if(!(Test-Path -Path ".\build64")){New-Item -ItemType directory -Path .\build64}
cd .\build64
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF ..
- - name: 'Build OBS-Studio 64-bit'
+ - name: 'Build OBS Studio 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
@@ -188,7 +180,7 @@ jobs:
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Windows-Installer'
path: ${{ github.workspace }}/obs-websocket/package/*.exe
ubuntu64:
- name: "Linux/Ubuntu 64-bit"
+ name: 'Linux/Ubuntu 64-bit'
runs-on: [ubuntu-latest]
if: contains(github.event.head_commit.message, '[skip ci]') != true
steps:
@@ -197,20 +189,20 @@ jobs:
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- - name: 'Checkout OBS-Studio'
+ - name: 'Checkout OBS Studio'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- - name: 'Get OBS-Studio Git Info'
+ - name: 'Get OBS Studio Git Info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- - name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
+ - name: 'Checkout last OBS Studio release (${{ env.OBS_GIT_TAG }})'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
@@ -284,21 +276,21 @@ jobs:
libx11-xcb-dev \
libxcb1-dev \
libxss-dev \
- - name: 'Configure OBS-Studio'
+ - name: 'Configure OBS Studio'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
mkdir ./build
cd ./build
cmake -DDISABLE_PLUGINS=YES -DENABLE_SCRIPTING=NO -DUNIX_STRUCTURE=YES -DCMAKE_INSTALL_PREFIX=/usr ..
- - name: 'Build OBS-Studio'
+ - name: 'Build OBS Studio'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
set -e
cd ./build
make -j4 libobs obs-frontend-api
- - name: 'Install OBS-Studio'
+ - name: 'Install OBS Studio'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
@@ -316,7 +308,7 @@ jobs:
if [ "${{ env.GIT_TAG }}" ] ; then \
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE -DOBS_WEBSOCKET_VERSION_SUFFIX="${{ env.CMAKE_VERSION_SUFFIX }}" -DCMAKE_BUILD_TYPE=Release .. ; \
else \
- cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE -DOBS_WEBSOCKET_VERSION_SUFFIX="${{ env.CMAKE_VERSION_SUFFIX }}" .. ; \
+ cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=TRUE -DOBS_WEBSOCKET_VERSION_SUFFIX="${{ env.CMAKE_VERSION_SUFFIX }}" -DPLUGIN_TESTS=TRUE .. ; \
fi
- name: 'Build obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
@@ -355,3 +347,213 @@ jobs:
with:
name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-Ubuntu64'
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
+ macOS:
+ name: 'macOS 64-bit'
+ runs-on: [macos-latest]
+ if: contains(github.event.head_commit.message, '[skip ci]') != true
+ env:
+ MACOS_DEPS_VERSION: '2022-01-01'
+ MACOS_DEPS_CACHE_VERSION: '2' # Change whenever updating dependencies version, in order to force a cache reset
+ steps:
+ - name: 'Checkout obs-websocket'
+ uses: actions/checkout@v2
+ with:
+ path: ${{ github.workspace }}/obs-websocket
+ submodules: 'recursive'
+ - name: 'Checkout OBS Studio'
+ uses: actions/checkout@v2
+ with:
+ repository: obsproject/obs-studio
+ path: ${{ github.workspace }}/obs-studio
+ submodules: 'recursive'
+ - name: 'Install Prerequisite: Binary Signing Certificate'
+ if: github.event_name != 'pull_request'
+ uses: apple-actions/import-codesign-certs@v1
+ with:
+ p12-file-base64: ${{ secrets.MACOS_SIGNING_CERT }}
+ p12-password: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
+ create-keychain: true
+ keychain-password: ${{ secrets.MACOS_TEMP_CI_KEYCHAIN_PASSWORD }}
+ - name: 'Install Prerequisite: Installer Signing Certificate'
+ if: github.event_name != 'pull_request'
+ uses: apple-actions/import-codesign-certs@v1
+ with:
+ p12-file-base64: ${{ secrets.MACOS_INSTALLER_CERT }}
+ p12-password: ${{ secrets.MACOS_INSTALLER_CERT_PASSWORD }}
+ create-keychain: false
+ keychain-password: ${{ secrets.MACOS_TEMP_CI_KEYCHAIN_PASSWORD }}
+ - name: 'Get OBS Studio Git Info'
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-studio
+ run: |
+ git fetch --prune --unshallow
+ echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+ echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
+ - name: 'Checkout last OBS Studio release (${{ env.OBS_GIT_TAG }})'
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-studio
+ run: |
+ git checkout ${{ env.OBS_GIT_TAG }}
+ git submodule update
+ - name: 'Get obs-websocket git info'
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-websocket
+ run: |
+ git fetch --prune --unshallow
+ GIT_HASH=$(git rev-parse --short HEAD)
+ echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
+ GIT_TAG=$(git describe --exact-match --tags --abbrev=0) || GIT_TAG=""
+ echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
+ if [ "$GIT_TAG" ] ; then \
+ VERSION="$GIT_TAG" \
+ VERSION_SUFFIX=$(echo "$GIT_TAG" | cut -c6-20) ; \
+ else \
+ VERSION="$GIT_HASH-git" \
+ VERSION_SUFFIX="-$GIT_HASH-git" ; \
+ fi
+ echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
+ echo "CMAKE_VERSION_SUFFIX=$VERSION_SUFFIX" >> $GITHUB_ENV
+ - name: 'Install Packages'
+ shell: bash
+ run: |
+ curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg
+ sudo hdiutil attach ./Packages.dmg
+ sudo installer -pkg /Volumes/Packages\ 1.2.10/Install\ Packages.pkg -target /
+ - name: 'Restore Cached Qt & OBS Studio dependencies'
+ id: deps-cache
+ uses: actions/cache@v2
+ with:
+ path: ${{ github.workspace }}/obsdeps/**
+ key: 'deps-cache-${{ env.MACOS_DEPS_CACHE_VERSION }} | ${{ runner.os }}'
+ - name: 'Install Prerequisite: Qt + OBS Studio dependencies'
+ if: steps.deps-cache.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ mkdir -p obsdeps
+ curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/macos-deps-qt-${{ env.MACOS_DEPS_VERSION }}-universal.tar.xz
+ tar -xf macos-deps-qt-${{ env.MACOS_DEPS_VERSION }}-universal.tar.xz -C "./obsdeps"
+ curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/macos-deps-${{ env.MACOS_DEPS_VERSION }}-universal.tar.xz
+ tar -xf macos-deps-${{ env.MACOS_DEPS_VERSION }}-universal.tar.xz -C "./obsdeps"
+ - run: xattr -r -d com.apple.quarantine ./obsdeps
+ shell: bash
+ - name: 'Configue OBS Studio'
+ if: steps.cache-obs-build.outputs.cache-hit != 'true'
+ working-directory: ${{ github.workspace }}/obs-studio
+ shell: bash
+ run: |
+ mkdir -p ./build
+ cd ./build
+ cmake .. \
+ -DQTDIR=${{ github.workspace }}/obsdeps \
+ -DDepsPath=${{ github.workspace }}/obsdeps \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
+ -DDISABLE_PLUGINS=true \
+ -DENABLE_SCRIPTING=0 \
+ -DCMAKE_PREFIX_PATH=${{ github.workspace }}/obsdeps/lib/cmake
+ - name: 'Build OBS Studio'
+ if: steps.cache-obs-build.outputs.cache-hit != 'true'
+ working-directory: ${{ github.workspace }}/obs-studio/build
+ shell: bash
+ run: |
+ set -e
+ make -j4 libobs obs-frontend-api
+ - name: 'Configure obs-websocket'
+ working-directory: ${{ github.workspace }}/obs-websocket
+ shell: bash
+ run: |
+ mkdir -p build
+ cd build
+ cmake .. \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
+ -DQTDIR=${{ github.workspace }}/obsdeps \
+ -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs \
+ -DLIBOBS_LIB=${{ github.workspace }}/obs-studio/libobs \
+ -DOBS_FRONTEND_LIB="${{ github.workspace }}/obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ - name: 'Build obs-websocket'
+ working-directory: ${{ github.workspace }}/obs-websocket/build
+ shell: bash
+ run: |
+ set -e
+ make -j4
+ - name: 'Relink Qt'
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-websocket/build
+ run: |
+ install_name_tool \
+ -change /tmp/obsdeps/lib/QtWidgets.framework/Versions/5/QtWidgets \
+ @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets \
+ -change /tmp/obsdeps/lib/QtGui.framework/Versions/5/QtGui \
+ @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui \
+ -change /tmp/obsdeps/lib/QtCore.framework/Versions/5/QtCore \
+ @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore \
+ -change /tmp/obsdeps/lib/QtNetwork.framework/Versions/5/QtNetwork \
+ @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork \
+ -change /tmp/obsdeps/lib/QtSvg.framework/Versions/5/QtSvg \
+ @executable_path/../Frameworks/QtSvg.framework/Versions/5/QtSvg \
+ ./obs-websocket.so
+ - name: 'Sign plugin binary'
+ if: github.event_name != 'pull_request'
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-websocket/build
+ run: |
+ codesign --sign "${{ secrets.MACOS_SIGNING_IDENTITY }}" ./obs-websocket.so
+ - name: 'Set PR Artifact Filename'
+ shell: bash
+ run: |
+ echo "MACOS_FILENAME=obs-websocket-${{ env.PACKAGE_VERSION }}-macOS.pkg" >> $GITHUB_ENV
+ echo "MACOS_FILENAME_UNSIGNED=obs-websocket-${{ env.PACKAGE_VERSION }}-macOS-Unsigned.pkg" >> $GITHUB_ENV
+ - name: 'Package ${{ env.MACOS_FILENAME_UNSIGNED }}'
+ if: success()
+ working-directory: ${{ github.workspace }}/obs-websocket
+ shell: bash
+ run: |
+ packagesbuild ./CI/macos/obs-websocket.pkgproj
+ mv ./release/obs-websocket.pkg ./release/${{ env.MACOS_FILENAME_UNSIGNED }}
+ - name: 'Sign plugin package'
+ if: ${{ env.GIT_TAG != '' }}
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-websocket
+ run: |
+ productsign \
+ --sign "${{ secrets.MACOS_INSTALLER_IDENTITY }}" \
+ ./release/${{ env.MACOS_FILENAME_UNSIGNED }} \
+ ./release/${{ env.MACOS_FILENAME }}
+ rm ./release/${{ env.MACOS_FILENAME_UNSIGNED }}
+ - name: 'Notarize package'
+ if: ${{ env.GIT_TAG != '' }}
+ shell: bash
+ working-directory: ${{ github.workspace }}/obs-websocket
+ run: |
+ zip -r ./release/${{ env.MACOS_FILENAME }}.zip ./release/${{ env.MACOS_FILENAME }}
+ UPLOAD_RESULT=$(xcrun altool --notarize-app \
+ --primary-bundle-id "com.obsproject.obs-websocket" \
+ --username "${{ secrets.MACOS_NOTARIZATION_USERNAME }}" \
+ --password "${{ secrets.MACOS_NOTARIZATION_PASSWORD }}" \
+ --asc-provider "${{ secrets.ASC_PROVIDER_SHORTNAME }}" \
+ --file "./release/${{ env.MACOS_FILENAME }}.zip")
+
+ rm ./release/${{ env.MACOS_FILENAME }}.zip
+
+ REQUEST_UUID=$(echo $UPLOAD_RESULT | awk -F ' = ' '/RequestUUID/ {print $2}')
+
+ # Pieces of code borrowed from rednoah/notarized-app
+ while sleep 30 && date; do
+ CHECK_RESULT=$(xcrun altool \
+ --notarization-info "$REQUEST_UUID" \
+ --username "${{ secrets.MACOS_NOTARIZATION_USERNAME }}" \
+ --password "${{ secrets.MACOS_NOTARIZATION_PASSWORD }}" \
+ --asc-provider "${{ secrets.ASC_PROVIDER_SHORTNAME }}")
+
+ if ! grep -q "Status: in progress" <<< "$CHECK_RESULT"; then
+ xcrun stapler staple ./release/${{ env.MACOS_FILENAME }}
+ break
+ fi
+ done
+ - name: 'Publish Packages'
+ if: success()
+ uses: actions/upload-artifact@v2-preview
+ with:
+ name: 'obs-websocket-${{ env.PACKAGE_VERSION }}-macOS'
+ path: '${{ github.workspace }}/obs-websocket/release/*.pkg'
diff --git a/.gitignore b/.gitignore
index 11f19da9..b234aa97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
/docs/node_modules/
/src/plugin-macros.generated.h
/installer/installer-windows.generated.iss
+/cmake-build-debug/
diff --git a/CI/macos/Brewfile b/CI/macos/Brewfile
deleted file mode 100644
index 923af906..00000000
--- a/CI/macos/Brewfile
+++ /dev/null
@@ -1,5 +0,0 @@
-brew "jack"
-brew "speexdsp"
-brew "cmake"
-brew "freetype"
-brew "fdk-aac"
diff --git a/CI/macos/build-plugin-macos.sh b/CI/macos/build-plugin-macos.sh
deleted file mode 100755
index 13c15806..00000000
--- a/CI/macos/build-plugin-macos.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-OSTYPE=$(uname)
-
-if [ "${OSTYPE}" != "Darwin" ]; then
- echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
- exit 1
-fi
-
-HAS_CMAKE=$(type cmake 2>/dev/null)
-
-if [ "${HAS_CMAKE}" = "" ]; then
- echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
- exit 1
-fi
-
-echo "[obs-websocket] Building 'obs-websocket' for macOS."
-mkdir -p build && cd build
-cmake .. \
- -DQTDIR=/tmp/obsdeps \
- -DLIBOBS_INCLUDE_DIR=../../obs-studio/libobs \
- -DLIBOBS_LIB=../../obs-studio/libobs \
- -DOBS_FRONTEND_LIB="$(pwd)/../../obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_INSTALL_PREFIX=/usr \
-&& make -j4
diff --git a/CI/macos/install-build-obs-macos.sh b/CI/macos/install-build-obs-macos.sh
deleted file mode 100755
index 580c1dfd..00000000
--- a/CI/macos/install-build-obs-macos.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-OSTYPE=$(uname)
-
-if [ "${OSTYPE}" != "Darwin" ]; then
- echo "[obs-websocket - Error] macOS obs-studio build script can be run on Darwin-type OS only."
- exit 1
-fi
-
-HAS_CMAKE=$(type cmake 2>/dev/null)
-HAS_GIT=$(type git 2>/dev/null)
-
-if [ "${HAS_CMAKE}" = "" ]; then
- echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
- exit 1
-fi
-
-if [ "${HAS_GIT}" = "" ]; then
- echo "[obs-websocket - Error] Git not installed - please install Xcode developer tools or via Homebrew."
- exit 1
-fi
-
-# Build obs-studio
-cd ..
-echo "[obs-websocket] Cloning obs-studio from GitHub.."
-git clone https://github.com/obsproject/obs-studio
-cd obs-studio
-OBSLatestTag=$(git describe --tags --abbrev=0)
-git checkout $OBSLatestTag
-mkdir build && cd build
-echo "[obs-websocket] Building obs-studio.."
-cmake .. \
- -DQTDIR=/tmp/obsdeps \
- -DDepsPath=/tmp/obsdeps \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
- -DDISABLE_PLUGINS=true \
- -DENABLE_SCRIPTING=0 \
- -DCMAKE_PREFIX_PATH=/tmp/obsdeps/lib/cmake \
-&& make -j4
diff --git a/CI/macos/install-dependencies-macos.sh b/CI/macos/install-dependencies-macos.sh
deleted file mode 100755
index 8c734b8a..00000000
--- a/CI/macos/install-dependencies-macos.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-OSTYPE=$(uname)
-
-if [ "${OSTYPE}" != "Darwin" ]; then
- echo "[obs-websocket - Error] macOS install dependencies script can be run on Darwin-type OS only."
- exit 1
-fi
-
-HAS_BREW=$(type brew 2>/dev/null)
-
-if [ "${HAS_BREW}" = "" ]; then
- echo "[obs-websocket - Error] Please install Homebrew (https://www.brew.sh/) to build obs-websocket on macOS."
- exit 1
-fi
-
-# OBS Studio Brew Deps
-echo "[obs-websocket] Updating Homebrew.."
-brew update >/dev/null
-echo "[obs-websocket] Checking installed Homebrew formulas.."
-
-if [ -d /usr/local/opt/openssl@1.0.2t ]; then
- brew uninstall openssl@1.0.2t
- brew untap local/openssl
-fi
-
-if [ -d /usr/local/opt/python@2.7.17 ]; then
- brew uninstall python@2.7.17
- brew untap local/python2
-fi
-
-brew bundle --file ./CI/macos/Brewfile
-
-# Fetch and install Packages app
-# =!= NOTICE =!=
-# Installs a LaunchDaemon under /Library/LaunchDaemons/fr.whitebox.packages.build.dispatcher.plist
-# =!= NOTICE =!=
-
-HAS_PACKAGES=$(type packagesbuild 2>/dev/null)
-
-if [ "${HAS_PACKAGES}" = "" ]; then
- echo "[obs-websocket] Installing Packaging app (might require password due to 'sudo').."
- curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg
- sudo hdiutil attach ./Packages.dmg
- sudo installer -pkg /Volumes/Packages\ 1.2.9/Install\ Packages.pkg -target /
-fi
-
-# OBS Deps
-echo "[obs-websocket] Installing obs-websocket dependency 'OBS Deps ${OBS_DEPS_VERSION}'.."
-wget --quiet --retry-connrefused --waitretry=1 https://github.com/obsproject/obs-deps/releases/download/${OBS_DEPS_VERSION}/macos-deps-${OBS_DEPS_VERSION}.tar.gz
-tar -xf ./macos-deps-${OBS_DEPS_VERSION}.tar.gz -C /tmp
-
-# Qt deps
-echo "[obs-websocket] Installing obs-websocket dependency 'Qt ${QT_VERSION}'.."
-curl -L -O https://github.com/obsproject/obs-deps/releases/download/${OBS_DEPS_VERSION}/macos-qt-${QT_VERSION}-${OBS_DEPS_VERSION}.tar.gz
-tar -xf ./macos-qt-${QT_VERSION}-${OBS_DEPS_VERSION}.tar.gz -C "/tmp"
-xattr -r -d com.apple.quarantine /tmp/obsdeps
\ No newline at end of file
diff --git a/CI/macos/obs-websocket.pkgproj b/CI/macos/obs-websocket.pkgproj
index 328b60ff..d38b3a2e 100644
--- a/CI/macos/obs-websocket.pkgproj
+++ b/CI/macos/obs-websocket.pkgproj
@@ -514,7 +514,7 @@
CONCLUSION_ACTION
0
IDENTIFIER
- fr.palakis.obs-websocket
+ com.obsproject.obs-websocket
OVERWRITE_PERMISSIONS
VERSION
diff --git a/CI/macos/package-plugin-macos.sh b/CI/macos/package-plugin-macos.sh
deleted file mode 100755
index 917585d1..00000000
--- a/CI/macos/package-plugin-macos.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-set -e
-
-OSTYPE=$(uname)
-
-if [ "${OSTYPE}" != "Darwin" ]; then
- echo "[obs-websocket - Error] macOS package script can be run on Darwin-type OS only."
- exit 1
-fi
-
-echo "[obs-websocket] Preparing package build"
-
-GIT_HASH=$(git rev-parse --short HEAD)
-GIT_BRANCH_OR_TAG=$(git name-rev --name-only HEAD | awk -F/ '{print $NF}')
-
-VERSION="$GIT_HASH-$GIT_BRANCH_OR_TAG"
-
-FILENAME_UNSIGNED="obs-websocket-$VERSION-Unsigned.pkg"
-FILENAME="obs-websocket-$VERSION.pkg"
-
-echo "[obs-websocket] Modifying obs-websocket.so linking"
-install_name_tool \
- -change /tmp/obsdeps/lib/QtWidgets.framework/Versions/5/QtWidgets \
- @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets \
- -change /tmp/obsdeps/lib/QtGui.framework/Versions/5/QtGui \
- @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui \
- -change /tmp/obsdeps/lib/QtCore.framework/Versions/5/QtCore \
- @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore \
- -change /tmp/obsdeps/lib/QtNetwork.framework/Versions/5/QtNetwork \
- @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork \
- -change /tmp/obsdeps/lib/QtSvg.framework/Versions/5/QtSvg \
- @executable_path/../Frameworks/QtSvg.framework/Versions/5/QtSvg \
- ./build/obs-websocket.so
-
-# Check if replacement worked
-echo "[obs-websocket] Dependencies for obs-websocket"
-otool -L ./build/obs-websocket.so
-
-if [[ "$RELEASE_MODE" == "True" ]]; then
- echo "[obs-websocket] Signing plugin binary: obs-websocket.so"
- codesign --sign "$CODE_SIGNING_IDENTITY" ./build/obs-websocket.so
-else
- echo "[obs-websocket] Skipped plugin codesigning"
-fi
-
-echo "[obs-websocket] Actual package build"
-packagesbuild ./CI/macos/obs-websocket.pkgproj
-
-echo "[obs-websocket] Renaming obs-websocket.pkg to $FILENAME"
-mv ./release/obs-websocket.pkg ./release/$FILENAME_UNSIGNED
-
-if [[ "$RELEASE_MODE" == "True" ]]; then
- echo "[obs-websocket] Signing installer: $FILENAME"
- productsign \
- --sign "$INSTALLER_SIGNING_IDENTITY" \
- ./release/$FILENAME_UNSIGNED \
- ./release/$FILENAME
- rm ./release/$FILENAME_UNSIGNED
-
- echo "[obs-websocket] Submitting installer $FILENAME for notarization"
- zip -r ./release/$FILENAME.zip ./release/$FILENAME
- UPLOAD_RESULT=$(xcrun altool \
- --notarize-app \
- --primary-bundle-id "fr.palakis.obs-websocket" \
- --username "$AC_USERNAME" \
- --password "$AC_PASSWORD" \
- --asc-provider "$AC_PROVIDER_SHORTNAME" \
- --file "./release/$FILENAME.zip")
- rm ./release/$FILENAME.zip
-
- REQUEST_UUID=$(echo $UPLOAD_RESULT | awk -F ' = ' '/RequestUUID/ {print $2}')
- echo "Request UUID: $REQUEST_UUID"
-
- echo "[obs-websocket] Wait for notarization result"
- # Pieces of code borrowed from rednoah/notarized-app
- while sleep 30 && date; do
- CHECK_RESULT=$(xcrun altool \
- --notarization-info "$REQUEST_UUID" \
- --username "$AC_USERNAME" \
- --password "$AC_PASSWORD" \
- --asc-provider "$AC_PROVIDER_SHORTNAME")
- echo $CHECK_RESULT
-
- if ! grep -q "Status: in progress" <<< "$CHECK_RESULT"; then
- echo "[obs-websocket] Staple ticket to installer: $FILENAME"
- xcrun stapler staple ./release/$FILENAME
- break
- fi
- done
-else
- echo "[obs-websocket] Skipped installer codesigning and notarization"
-fi
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f65f0ea0..83b00ea6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,6 +103,7 @@ set(obs-websocket_SOURCES
src/eventhandler/EventHandler_Outputs.cpp
src/eventhandler/EventHandler_SceneItems.cpp
src/eventhandler/EventHandler_MediaInputs.cpp
+ src/eventhandler/EventHandler_Ui.cpp
src/requesthandler/RequestHandler.cpp
src/requesthandler/RequestBatchHandler.cpp
src/requesthandler/RequestHandler_General.cpp
@@ -110,10 +111,14 @@ set(obs-websocket_SOURCES
src/requesthandler/RequestHandler_Sources.cpp
src/requesthandler/RequestHandler_Scenes.cpp
src/requesthandler/RequestHandler_Inputs.cpp
+ src/requesthandler/RequestHandler_Transitions.cpp
+ src/requesthandler/RequestHandler_Filters.cpp
src/requesthandler/RequestHandler_SceneItems.cpp
+ src/requesthandler/RequestHandler_Outputs.cpp
src/requesthandler/RequestHandler_Stream.cpp
src/requesthandler/RequestHandler_Record.cpp
src/requesthandler/RequestHandler_MediaInputs.cpp
+ src/requesthandler/RequestHandler_Ui.cpp
src/requesthandler/rpc/Request.cpp
src/requesthandler/rpc/RequestBatchRequest.cpp
src/requesthandler/rpc/RequestResult.cpp
@@ -123,7 +128,14 @@ set(obs-websocket_SOURCES
src/utils/Crypto.cpp
src/utils/Json.cpp
src/utils/Obs.cpp
- src/utils/ObsVolumeMeter.cpp
+ src/utils/Obs_StringHelper.cpp
+ src/utils/Obs_EnumHelper.cpp
+ src/utils/Obs_NumberHelper.cpp
+ src/utils/Obs_ArrayHelper.cpp
+ src/utils/Obs_ObjectHelper.cpp
+ src/utils/Obs_SearchHelper.cpp
+ src/utils/Obs_ActionHelper.cpp
+ src/utils/Obs_VolumeMeter.cpp
src/utils/Platform.cpp
src/utils/Compat.cpp
deps/qr/cpp/QrCode.cpp)
@@ -150,8 +162,8 @@ set(obs-websocket_HEADERS
src/utils/Crypto.h
src/utils/Json.h
src/utils/Obs.h
- src/utils/ObsVolumeMeter.h
- src/utils/ObsVolumeMeter_Helpers.h
+ src/utils/Obs_VolumeMeter.h
+ src/utils/Obs_VolumeMeter_Helpers.h
src/utils/Platform.h
src/utils/Compat.h
src/utils/Utils.h
diff --git a/README.md b/README.md
index 85843f8e..86056256 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
WebSocket API for OBS Studio.
-[](https://github.com/obs-websocket/obs-websocket/actions/workflows/main.yml)
+[](https://github.com/obsproject/obs-websocket/actions/workflows/main.yml)
[](https://discord.gg/WBaSQ3A)
[](https://opencollective.com/obs-websocket-dev)
@@ -30,7 +30,7 @@ It is **highly recommended** to protect obs-websocket with a password against un
### Client software
-- (No known clients supporting 5.0.0 at the moment. Send a message in Discord if you have one!)
+- (No known clients supporting 5.0.0 at the moment. Ping us in the Discord if you have one!)
### Client libraries (for developers)
@@ -39,10 +39,10 @@ Here's a list of available language APIs for obs-websocket:
- Python 3.7+ (Asyncio): [simpleobsws](https://github.com/IRLToolkit/simpleobsws/tree/master) by IRLToolkit
- Rust: [obws](https://github.com/dnaka91/obws/tree/v5-api) by dnaka91
-The server is a typical Websockets server running by default on port 4444 (the port number can be changed in the Settings dialog under `Tools`).
+The 5.x server is a typical WebSocket server running by default on port 4455 (the port number can be changed in the Settings dialog under `Tools`).
The protocol we use is documented in [PROTOCOL.md](docs/generated/protocol.md).
-We'd like to know what you're building with or for obs-websocket. If you do something in this fashion, feel free to drop a message in `#project-showoff` in the [discord server!](https://discord.gg/WBaSQ3A)
+We'd like to know what you're building with obs-websocket! If you do something in this fashion, feel free to drop a message in `#project-showoff` in the [discord server!](https://discord.gg/WBaSQ3A)
## Contributors
diff --git a/deps/asio b/deps/asio
index b84e6c16..b73dc1d2 160000
--- a/deps/asio
+++ b/deps/asio
@@ -1 +1 @@
-Subproject commit b84e6c16b2ea907dbad94206b7510d85aafc0b42
+Subproject commit b73dc1d2c0ecb9452a87c26544d7f71e24342df6
diff --git a/docs/docs/generate_md.py b/docs/docs/generate_md.py
index bc25f5fb..b52383e7 100644
--- a/docs/docs/generate_md.py
+++ b/docs/docs/generate_md.py
@@ -25,6 +25,7 @@ categoryOrder = [
'Stream',
'Record',
'Media Inputs',
+ 'Ui',
'High-Volume'
]
diff --git a/docs/docs/process_comments.py b/docs/docs/process_comments.py
index db52914c..3868eb5e 100644
--- a/docs/docs/process_comments.py
+++ b/docs/docs/process_comments.py
@@ -122,7 +122,7 @@ for comment in comments_raw:
enumValue = field_to_string(comment['enumValue'])
enum['enumValue'] = int(enumValue) if enumValue.isdigit() else enumValue
else:
- enum['enumValue'] = None
+ enum['enumValue'] = enum['enumIdentifier']
if enumType not in enums_raw:
enums_raw[enumType] = {'enumIdentifiers': [enum]}
diff --git a/docs/generated/protocol.json b/docs/generated/protocol.json
index bd906beb..16ac5dfa 100644
--- a/docs/generated/protocol.json
+++ b/docs/generated/protocol.json
@@ -91,6 +91,14 @@
"initialVersion": "5.0.0",
"enumValue": "(1 << 9)"
},
+ {
+ "description": "Subscription value to receive events in the `Ui` category.",
+ "enumIdentifier": "Ui",
+ "rpcVersion": "1",
+ "deprecated": false,
+ "initialVersion": "5.0.0",
+ "enumValue": "(1 << 10)"
+ },
{
"description": "Helper to receive all non-high-volume events.",
"enumIdentifier": "All",
@@ -389,6 +397,22 @@
"initialVersion": "5.0.0",
"enumValue": 605
},
+ {
+ "description": "The resource does not support being configured.\n\nThis is particularly relevant to transitions, where they do not always have changeable settings.",
+ "enumIdentifier": "ResourceNotConfigurable",
+ "rpcVersion": "1",
+ "deprecated": false,
+ "initialVersion": "5.0.0",
+ "enumValue": 606
+ },
+ {
+ "description": "The specified filter (obs_source_t-OBS_SOURCE_TYPE_FILTER) had the wrong kind.",
+ "enumIdentifier": "InvalidFilterKind",
+ "rpcVersion": "1",
+ "deprecated": false,
+ "initialVersion": "5.0.0",
+ "enumValue": 607
+ },
{
"description": "Creating the resource failed.",
"enumIdentifier": "ResourceCreationFailed",
@@ -423,6 +447,67 @@
}
]
},
+ {
+ "enumType": "ObsMediaInputAction",
+ "enumIdentifiers": [
+ {
+ "description": "No action.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NONE",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NONE"
+ },
+ {
+ "description": "Play the media input.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PLAY",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PLAY"
+ },
+ {
+ "description": "Pause the media input.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PAUSE",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PAUSE"
+ },
+ {
+ "description": "Stop the media input.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP"
+ },
+ {
+ "description": "Restart the media input.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_RESTART",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_RESTART"
+ },
+ {
+ "description": "Go to the next playlist item.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NEXT",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NEXT"
+ },
+ {
+ "description": "Go to the previous playlist item.",
+ "enumIdentifier": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PREVIOUS",
+ "rpcVersion": 1,
+ "deprecated": true,
+ "initialVersion": "5.0.0",
+ "enumValue": "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PREVIOUS"
+ }
+ ]
+ },
{
"enumType": "WebSocketCloseCode",
"enumIdentifiers": [
@@ -828,7 +913,7 @@
{
"description": "Gets a parameter from the current profile's configuration.",
"requestType": "GetProfileParameter",
- "complexity": 3,
+ "complexity": 4,
"rpcVersion": "1",
"deprecated": false,
"initialVersion": "5.0.0",
@@ -867,7 +952,7 @@
{
"description": "Sets the value of a parameter in the current profile's configuration.",
"requestType": "SetProfileParameter",
- "complexity": 3,
+ "complexity": 4,
"rpcVersion": "1",
"deprecated": false,
"initialVersion": "5.0.0",
@@ -1052,6 +1137,312 @@
],
"responseFields": []
},
+ {
+ "description": "Gets the current directory that the record output is set to.",
+ "requestType": "GetRecordDirectory",
+ "complexity": 1,
+ "rpcVersion": "1",
+ "deprecated": false,
+ "initialVersion": "5.0.0",
+ "category": "rconfig",
+ "requestFields": [],
+ "responseFields": [
+ {
+ "valueName": "recordDirectory",
+ "valueType": "String",
+ "valueDescription": "Output directory"
+ }
+ ]
+ },
+ {
+ "description": "Gets an array of all of a source's filters.",
+ "requestType": "GetSourceFilterList",
+ "complexity": 2,
+ "rpcVersion": "1",
+ "deprecated": false,
+ "initialVersion": "5.0.0",
+ "category": "filters",
+ "requestFields": [
+ {
+ "valueName": "sourceName",
+ "valueType": "String",
+ "valueDescription": "Name of the source",
+ "valueRestrictions": null,
+ "valueOptional": false,
+ "valueOptionalBehavior": null
+ }
+ ],
+ "responseFields": [
+ {
+ "valueName": "filters",
+ "valueType": "Array