Compare commits

..

90 Commits
4.9.0 ... 4.9.1

Author SHA1 Message Date
d05ff26930 docs(ci): Update protocol.md - 5350832 [skip ci] 2021-06-10 05:56:15 +00:00
535083205a Merge pull request #765 from Palakis/4.9.1-prep
4.9.1 Prep
2021-06-10 07:55:38 +02:00
9a8d283d27 base: Update plugin version to 4.9.1 2021-06-09 21:03:59 -07:00
1eb02e77e0 Docs: Mark unreleased requests with 4.9.1 2021-06-09 19:11:02 -07:00
b271cf9d32 Merge pull request #692 from Palakis/fix/obs-shutdown-crash
Events: Fix multiple shutdown crashes
2021-06-10 02:39:26 +02:00
0a084122d3 Merge pull request #764 from dnaka91/fix-leak-tbar
Requests: Fix leak in ReleaseTBar, SetTBarPosition
2021-06-08 18:31:35 -07:00
a29e0325dd Merge pull request #761 from dnaka91/fix-release-transition
Requests: Fix leak in SetSceneTransitionOverride
2021-06-08 18:30:03 -07:00
4ea010f168 Requests: Fix leak in ReleaseTBar, SetTBarPosition 2021-06-09 10:24:09 +09:00
b03ab12e45 Requests: Fix leak in SetSceneTransitionOveride 2021-06-09 09:41:46 +09:00
9311b38747 Merge pull request #760 from bobvandevijver/patch-1
Fix small pipeline typo
2021-06-07 09:30:36 -07:00
2380ba4612 Fix small pipeline typo 2021-06-07 11:39:41 +02:00
60e2f0183e Merge branch '4.x-current' into fix/obs-shutdown-crash 2021-06-06 16:25:38 -07:00
8009f65ed0 Merge pull request #758 from Palakis/fix/ci-patches
CI: Fix some various stuff getting in the way of doing 4.9.1 dev
2021-06-06 17:53:59 +02:00
393fca6aed CI: Update dirty hack to OBS 27 2021-06-01 18:34:52 -07:00
f8abe91b83 CI: Version our OBS build cache
When new OBS tags are released, we need to wipe the old cache
to get them to work properly.
2021-06-01 18:22:34 -07:00
27ab3e0ea8 CI: Allow usage of RC's for objects 2021-06-01 18:12:15 -07:00
1ca10f3e34 CI: Remove github workflows for now
It's super broken on this branch and getting in the way. Removing
it for now and I'll move everything back to gh workflows after 4.9.1
2021-06-01 18:11:13 -07:00
c1cd1adb08 WSServer: Run asio loop in std::thread and join on stop 2021-06-01 18:00:24 -07:00
1266b3f3fe Events: Various crash fixes 2021-06-01 18:00:14 -07:00
5505e0d7b5 docs(ci): Update protocol.md - a469fc5 [skip ci] 2021-06-02 00:20:15 +00:00
a469fc539a Merge pull request #708 from Meetsch/feature/virtualcam
Requests: support for new virtualcam related obs-frontend-api in upcoming OBS-Studio 27.0
2021-06-01 17:19:32 -07:00
ef36585319 Requests, Events: Mark as unreleased 2021-06-01 17:01:20 -07:00
46214eef44 docs(ci): Update protocol.md - 5f0b152 [skip ci] 2021-06-01 00:14:07 +00:00
5f0b152427 Merge pull request #751 from hanazuki/doc-ReorderSceneItems
docs: Fix type of ReorderSceneItems request parameter
2021-05-31 17:13:33 -07:00
cbc7664b78 Merge pull request #740 from Palakis/fix/createscene-release-source
Requests: Release created scene in CreateScene
2021-06-01 01:52:39 +02:00
39bc97a51c Merge pull request #745 from Palakis/add-dart-library
README: Add Dart client library
2021-06-01 01:47:10 +02:00
017e551a91 docs(ci): Update protocol.md - 19dad77 [skip ci] 2021-05-31 23:46:42 +00:00
19dad7775c Merge pull request #746 from BarRaider/docs-fix-readme-link
docs: fixed url to refer to the correct part of the readme
2021-05-31 16:45:56 -07:00
de15118872 docs: Fix type of ReorderSceneItems request parameter
The parameter `items` accepts a list of SceneItem ids/names but not Scenes.
2021-05-21 13:03:10 +00:00
bb81e1e0ab docs: fixed url to refer to the correct part of the readme 2021-05-17 16:17:07 -07:00
58b49fed85 README: Add Dart client library 2021-05-17 14:28:13 -07:00
6740e5fec7 Requests: Autorelease created scene in CreateScene
Creating the scene increments the referenced scene by one,
but we do not decrement it. This produces a memory leak which
leads to the scene never being deleted after being removed from
the UI.
2021-05-14 01:52:37 -07:00
fe9419fb8a Merge branch 'bugfix/cmake-frontend-lib' into 4.x-current 2021-04-18 23:30:03 +02:00
ba93b05efa cmake: fix frontend api message + nitpicks 2021-04-18 23:29:20 +02:00
d154e77299 Merge branch '4.x-current' into bugfix/cmake-frontend-lib 2021-04-18 23:25:44 +02:00
2f8073d548 Merge pull request #702 from Palakis/fix/imageformats
CMake: Copy other imageformats plugins too.
2021-04-18 23:15:33 +02:00
1f0c1691be cmake: simplify package step 2021-04-18 23:00:26 +02:00
50eedd11e0 cmake: fix target directory path of QImage plugins 2021-04-18 22:56:09 +02:00
6f50628172 Merge pull request #727 from ZyanKLee/feature/ZyanKLee-inline-build
allow inline build with obs-studio
2021-04-18 22:47:08 +02:00
4256f2df8b Merge branch '4.x-current' into feature/ZyanKLee-inline-build 2021-04-18 22:20:13 +02:00
344f7c33e4 Merge branch '4.x-current' into fix/imageformats 2021-04-18 21:54:05 +02:00
39454bc13e docs(ci): Update protocol.md - fcffa55 [skip ci] 2021-04-18 19:53:39 +00:00
fcffa55af1 Merge pull request #705 from Palakis/fix/addsceneitem-docs
Docs: Properly mark `setVisible` as optional
2021-04-18 21:53:01 +02:00
b74afd1033 Merge pull request #701 from Palakis/ci-qt-upgrade
CI: Various CI improvements
2021-04-18 21:50:52 +02:00
ff548589bc docs(ci): Update protocol.md - f2f80c4 [skip ci] 2021-04-13 14:04:38 +00:00
f2f80c4e7e Merge pull request #706 from dnaka91/from-scene-optional
docs: Mark from-scene as optional
2021-04-13 07:03:54 -07:00
381745dbf6 CI: Various improvements 2021-04-13 06:58:28 -07:00
1b61bd9551 Remove unnecessary files and changes 2021-04-13 22:24:20 +09:00
415fb73245 CI: Update and improve Ubuntu build 2021-04-13 05:48:50 -07:00
458d59b401 CI: Refactor much of the MacOS CI 2021-04-13 05:04:08 -07:00
ffb24da135 CI: Update MacOS Qt version to 5.15.2 2021-04-13 04:19:41 -07:00
436cec69c2 Merge https://github.com/Palakis/obs-websocket into feature/virtualcam 2021-04-13 02:27:57 -07:00
30e2a5428f CI: Update Qt windows installer download 2021-04-11 20:21:18 -07:00
1154ba5b14 docs(ci): Update protocol.md - ffd89db [skip ci] 2021-04-09 17:59:19 +00:00
ffd89dbdeb Merge pull request #718 from flut1/bugfix/docs-output-settings
Docs: fix typo in output properties
2021-04-09 10:58:21 -07:00
b61211b4cb Docs: fix typo in output properties 2021-04-08 17:42:01 +02:00
30af0cbd9a allow inline build with obs-studio
when replacing CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR in the CMakeLists.txt this should allow for building the plugin directly inside of obs-studio as well as separately
2021-03-29 10:06:08 +02:00
349ef5be97 [fix] getVirtualCamTime 2021-03-22 11:45:00 +01:00
7e0bc1fd10 docs: Mark from-scene as optional 2021-03-21 14:53:45 +09:00
b7bd95dcc4 CI: Use new source for Packages.pkg 2021-03-20 11:50:34 -07:00
fde1ada699 Docs: Properly mark setVisible as optional 2021-03-20 07:44:26 -07:00
7556c5f855 CMake: Copy other imageformats plugins too. 2021-03-19 01:45:52 -07:00
4505612f75 CI: Update Qt and OBS deps on Windows
- Update Qt to 5.15
- Update OBS dependencies to 2019
2021-03-19 01:21:23 -07:00
035767bbbb docs(ci): Update protocol.md - 8e43958 [skip ci] 2021-03-19 05:05:52 +00:00
8e43958f3d Merge pull request #694 from ruggi99/feature/get-source-active
Requests: Add GetSourceActive
2021-03-18 22:05:06 -07:00
2be20a9179 docs(ci): Update protocol.md - 77f6335 [skip ci] 2021-03-19 05:03:26 +00:00
77f63359f6 Merge pull request #697 from ruggi99/feature/add-volumedb
Requests: Add volumeDb field to SourceVolumeChanged Event
2021-03-18 22:03:11 -07:00
b13822db8d Requests: Add SetAudioTracks and GetAudioTracks (#690)
* Requests: Add SetAudioTracks and GetAudioTracks

* Renamed mixer to track.

* Fix: Prevent pushing track out of range

* Fix: Changed result values back to track.

* Fix: Changed source parameter to sourceName.

* Fix: Updated @param.

* Revert "Fix: Updated @param."

This reverts commit 24a5eb6fab.
2021-03-18 22:02:30 -07:00
35c524c604 [fix] obs-frontend-api calls 2021-03-18 18:15:13 +01:00
8c4374825d [fix] Missing events for virtualcam 2021-03-18 17:43:17 +01:00
687d08afa2 [fix] Missing headers for new virtualcam methods 2021-03-18 17:02:40 +01:00
8616d36204 Merge branch 'feature/virtualcam' of https://github.com/Meetsch/obs-websocket into feature/virtualcam 2021-03-18 16:51:46 +01:00
c22199b8eb [feature] support for VirtualCam 2021-03-18 16:51:27 +01:00
1deaedb7da [feature] support for VirtualCam 2021-03-18 16:06:54 +01:00
452a307b33 Requests: Add volumedb field to SourceVolumeChanged Event 2021-03-10 12:01:09 +01:00
0db1abcd2e Requests: Add GetSourceActive 2021-03-05 21:38:22 +01:00
01c898b104 docs(ci): Update protocol.md - 2344842 [skip ci] 2021-03-04 00:19:45 +00:00
2344842163 Requests: Edit PlayPauseMedia (#685)
* Request: Edit PlayPauseMedia

Removed requirement for boolean paramater from PlayPauseMedia. Changed
PlayPauseMedia to toggle play state if there is no boolean paramater.

* Docs: Edit PlayPauseMedia 

This commit also fixes some syntax

* will reset

* Add missing star to L48

Co-authored-by: tt2468 <tt2468@gmail.com>
2021-03-03 16:18:57 -08:00
b8e693c97d docs(ci): Update protocol.md - 99e66cc [skip ci] 2021-03-03 14:50:01 +00:00
99e66cc317 Merge pull request #691 from VodBox/feature/set-scale-filtering
Requests: Add scale.filter to Scene Item Properties
2021-03-03 06:48:59 -08:00
18468c17f2 Requests: Add scale.filter to Scene Item Properties 2021-03-03 20:02:01 +13:00
6f0d056059 docs(ci): Update protocol.md - 6b05d03 [skip ci] 2021-02-28 02:17:20 +00:00
6b05d0381e Merge pull request #687 from Palakis/feature/batch-delay
Requests: Add Sleep
2021-02-28 03:16:37 +01:00
e8c4d2b550 Merge pull request #674 from Palakis/fix/ubuntu-tag-releases
CI: Fix tag detection
2021-02-28 03:06:09 +01:00
7e14032d2b requests(Sleep): update parameter name 2021-02-28 03:05:42 +01:00
bb0a0acbda Requests: Add Sleep
New request to induce delay in the processing of `ExecuteBatch`
2021-02-27 09:35:37 -08:00
9bbfb73622 chore: safety-checks before accessing the result of GetConfig() 2021-02-24 19:06:08 +01:00
d45d98d536 CI: Fix tag detection 2021-02-10 16:34:37 -08:00
824cfd4871 Merge branch '4.x-current' into bugfix/cmake-frontend-lib 2020-03-28 19:17:19 +01:00
a5bc979c24 cmake: fix set of OBS_FRONTEND_LIB 2019-06-23 22:58:45 +02:00
50 changed files with 1495 additions and 1401 deletions

View File

@ -1,412 +0,0 @@
name: 'CI Multiplatform Build'
on:
push:
paths-ignore:
- 'docs/**'
branches:
- 4.x-current
pull_request:
paths-ignore:
- '**.md'
branches:
- 4.x-current
jobs:
windows:
name: 'Windows 32+64bit'
runs-on: [windows-latest]
if: contains(github.event.head_commit.message, '[skip ci]') != true
env:
QT_VERSION: '5.10.1'
WINDOWS_DEPS_VERSION: '2017'
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_SYSTEM_VERSION: "10.0"
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.0
- name: 'Checkout'
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- name: 'Checkout OBS'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- name: 'Get OBS-Studio git info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
- 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
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
- name: 'Install prerequisite: QT'
run: |
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C -
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
- name: 'Install prerequisite: Pre-built OBS dependencies'
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 32-bit build v${{ env.OBS_GIT_TAG }} from cache'
id: build-cache-obs-32
uses: actions/cache@v1
env:
CACHE_NAME: 'build-cache-obs-32'
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 32-bit'
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
mkdir .\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 }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
- 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 64-bit build v${{ env.OBS_GIT_TAG }} from cache'
id: build-cache-obs-64
uses: actions/cache@v1
env:
CACHE_NAME: 'build-cache-obs-64'
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 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
mkdir .\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 }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
- name: 'Build OBS-Studio 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj
- name: 'Configure obs-websocket 64-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
mkdir .\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 }}\msvc2017_64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
- name: 'Configure obs-websocket 32-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
mkdir .\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 }}\msvc2017" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
- name: 'Build obs-websocket 64-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-websocket.sln
- name: 'Build obs-websocket 32-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-websocket.sln
- name: 'Set PR artifact filename'
shell: bash
run: |
FILENAME="obs-websocket-${{ env.GIT_HASH }}-Windows"
echo "::set-env name=FILENAME::$FILENAME"
- name: 'Package obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
mkdir package
cd package
7z a "${{ env.WIN_FILENAME }}.zip" "..\release\*"
iscc ..\installer\installer.iss /O. /F"${{ env.WIN_FILENAME }}-Installer"
- name: 'Publish ${{ env.WIN_FILENAME }}.zip'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_HASH }}-Windows'
path: ${{ github.workspace }}/obs-websocket/package/*.zip
- name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_HASH }}-Windows-Installer'
path: ${{ github.workspace }}/obs-websocket/package/*.exe
ubuntu64:
name: "Linux/Ubuntu 64-bit"
runs-on: [ubuntu-latest]
if: contains(github.event.head_commit.message, '[skip ci]') != true
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- name: 'Checkout OBS'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- name: 'Get OBS-Studio git info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
- 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'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
git fetch --prune --unshallow
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
- name: 'Install prerequisites (Apt)'
shell: bash
run: |
sudo dpkg --add-architecture amd64
sudo apt-get -qq update
sudo apt-get install -y \
build-essential \
checkinstall \
cmake \
libasound2-dev \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libcurl4-openssl-dev \
libfdk-aac-dev \
libfontconfig-dev \
libfreetype6-dev \
libgl1-mesa-dev \
libjack-jackd2-dev \
libjansson-dev \
libluajit-5.1-dev \
libpulse-dev \
libqt5x11extras5-dev \
libspeexdsp-dev \
libswresample-dev \
libswscale-dev \
libudev-dev \
libv4l-dev \
libva-dev \
libvlc-dev \
libx11-dev \
libx264-dev \
libxcb-randr0-dev \
libxcb-shm0-dev \
libxcb-xinerama0-dev \
libxcomposite-dev \
libxinerama-dev \
libmbedtls-dev \
pkg-config \
python3-dev \
qtbase5-dev \
libqt5svg5-dev \
swig
- 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'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
set -e
cd ./build
make -j4 libobs obs-frontend-api
- name: 'Install OBS-Studio'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
cd ./build
sudo cp ./libobs/libobs.so /usr/lib
sudo cp ./UI/obs-frontend-api/libobs-frontend-api.so /usr/lib
sudo mkdir -p /usr/include/obs
sudo cp ../UI/obs-frontend-api/obs-frontend-api.h /usr/include/obs/obs-frontend-api.h
- name: 'Configure obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
mkdir ./build
cd ./build
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..
- name: 'Build obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
set -e
cd ./build
make -j4
- name: 'Set PR artifact filename'
shell: bash
run: |
FILENAME="obs-websocket-1-${{ env.GIT_HASH }}-1_amd64.deb"
echo "::set-env name=FILENAME::$FILENAME"
- name: 'Package ${{ env.FILENAME }}'
if: success()
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
VERSION="1-${{ env.GIT_HASH }}-git"
cd ./build
sudo checkinstall -y --type=debian --fstrans=no -nodoc \
--backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=$VERSION \
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
--pkgsource="${{ github.event.repository.html_url }}" \
--requires="obs-studio,libqt5core5a,libqt5widgets5,qt5-image-formats-plugins" \
--pakdir="../package"
sudo chmod ao+r ../package/*
cd -
- name: 'Publish ${{ env.FILENAME }}'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_HASH }}-linux'
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
macos64:
name: "macOS 64-bit"
runs-on: [macos-latest]
if: contains(github.event.head_commit.message, '[skip ci]') != true
env:
MACOS_DEPS_VERSION: '2020-04-18'
QT_VERSION: '5.14.1'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- name: 'Checkout OBS'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- name: 'Get OBS-Studio git info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
- 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'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
git fetch --prune --unshallow
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
- name: 'Install prerequisites (Homebrew)'
shell: bash
run: |
brew bundle --file ${{ github.workspace }}/obs-websocket/CI/macos/Brewfile
- name: 'Install prerequisite: Pre-built OBS dependencies'
shell: bash
run: |
curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz
tar -xf ${{ github.workspace }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz -C "/tmp"
- name: 'Configure OBS Studio'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
mkdir build
cd build
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DENABLE_SCRIPTING=NO -DDepsPath=/tmp/obsdeps -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/${{ env.QT_VERSION }}/lib/cmake ..
- name: 'Build OBS Studio libraries'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
set -e
cd ./build
make -j4 libobs obs-frontend-api
- name: 'Configure obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
mkdir build
cd build
cmake -DQTDIR=/usr/local/Cellar/qt/${{ env.QT_VERSION }} -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
shell: bash
run: |
set -e
cd ./build
make -j4
- name: 'Install prerequisite: Packages app'
if: success()
shell: bash
run: |
curl -L -O https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
sudo installer -pkg ${{ github.workspace }}/Packages.pkg -target /
- name: 'Set PR artifact filename'
shell: bash
run: |
FILENAME_UNSIGNED="obs-websocket-${{ env.GIT_HASH }}-macOS-Unsigned.pkg"
echo "::set-env name=FILENAME_UNSIGNED::$FILENAME_UNSIGNED"
- name: 'Fix linked dynamic library paths'
if: success()
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./build/obs-websocket.so
install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./build/obs-websocket.so
install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./build/obs-websocket.so
echo "Dependencies for obs-websocket"
otool -L ./build/obs-websocket.so
- name: 'Package ${{ env.FILENAME }}'
if: success()
working-directory: ./obs-websocket
shell: bash
run: |
packagesbuild ./CI/macos/obs-websocket.pkgproj
mv ./release/obs-websocket.pkg ./release/${{ env.FILENAME_UNSIGNED }}
- name: 'Publish ${{ env.FILENAME_UNSIGNED }} artifact'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_HASH }}-macOS'
path: ${{ github.workspace }}/obs-websocket/release/*.pkg

View File

@ -1,484 +0,0 @@
name: 'CI Multiplatform Release'
on:
push:
paths-ignore:
- 'docs/**'
tags:
- '[45].[0-9]+.[0-9]+'
jobs:
windows:
name: 'Windows 32+64bit'
runs-on: [windows-latest]
env:
QT_VERSION: '5.10.1'
WINDOWS_DEPS_VERSION: '2017'
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_SYSTEM_VERSION: "10.0"
steps:
- name: 'Add msbuild to PATH'
uses: microsoft/setup-msbuild@v1.0.0
- name: 'Checkout'
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- name: 'Checkout OBS'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- name: 'Get OBS-Studio git info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
- 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
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
- name: 'Install prerequisite: QT'
run: |
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C -
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
- name: 'Install prerequisite: Pre-built OBS dependencies'
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 32-bit build v${{ env.OBS_GIT_TAG }} from cache'
id: build-cache-obs-32
uses: actions/cache@v1
env:
CACHE_NAME: 'build-cache-obs-32'
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 32-bit'
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
mkdir .\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 }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
- 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 64-bit build v${{ env.OBS_GIT_TAG }} from cache'
id: build-cache-obs-64
uses: actions/cache@v1
env:
CACHE_NAME: 'build-cache-obs-64'
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 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
mkdir .\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 }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
- name: 'Build OBS-Studio 64-bit'
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/obs-studio
run: |
msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj
msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj
- name: 'Configure obs-websocket 64-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
mkdir .\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 }}\msvc2017_64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
- name: 'Configure obs-websocket 32-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
mkdir .\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 }}\msvc2017" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" ..
- name: 'Build obs-websocket 64-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-websocket.sln
- name: 'Build obs-websocket 32-bit'
working-directory: ${{ github.workspace }}/obs-websocket
run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-websocket.sln
- name: 'Set release filename'
shell: bash
run: |
FILENAME="obs-websocket-${{ env.GIT_TAG }}-Windows"
echo "::set-env name=WIN_FILENAME::$FILENAME"
- name: 'Package obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
mkdir package
cd package
7z a "${{ env.WIN_FILENAME }}.zip" "..\release\*"
iscc ..\installer\installer.iss /O. /F"${{ env.WIN_FILENAME }}-Installer"
- name: 'Publish ${{ env.WIN_FILENAME }}.zip'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_TAG }}-Windows'
path: ${{ github.workspace }}/obs-websocket/package/*.zip
- name: 'Publish ${{ env.WIN_FILENAME }}-Installer.exe'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_TAG }}-Windows-Installer'
path: ${{ github.workspace }}/obs-websocket/package/*.exe
ubuntu64:
name: "Linux/Ubuntu 64-bit"
runs-on: [ubuntu-latest]
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- name: 'Checkout OBS'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- name: 'Get OBS-Studio git info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
- 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'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
git fetch --prune --unshallow
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
- name: 'Install prerequisites (Apt)'
shell: bash
run: |
sudo dpkg --add-architecture amd64
sudo apt-get -qq update
sudo apt-get install -y \
build-essential \
checkinstall \
cmake \
libasound2-dev \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libcurl4-openssl-dev \
libfdk-aac-dev \
libfontconfig-dev \
libfreetype6-dev \
libgl1-mesa-dev \
libjack-jackd2-dev \
libjansson-dev \
libluajit-5.1-dev \
libpulse-dev \
libqt5x11extras5-dev \
libspeexdsp-dev \
libswresample-dev \
libswscale-dev \
libudev-dev \
libv4l-dev \
libva-dev \
libvlc-dev \
libx11-dev \
libx264-dev \
libxcb-randr0-dev \
libxcb-shm0-dev \
libxcb-xinerama0-dev \
libxcomposite-dev \
libxinerama-dev \
libmbedtls-dev \
pkg-config \
python3-dev \
qtbase5-dev \
libqt5svg5-dev \
swig
- 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'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
set -e
cd ./build
make -j4 libobs obs-frontend-api
- name: 'Install OBS-Studio'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
cd ./build
sudo cp ./libobs/libobs.so /usr/lib
sudo cp ./UI/obs-frontend-api/libobs-frontend-api.so /usr/lib
sudo mkdir -p /usr/include/obs
sudo cp ../UI/obs-frontend-api/obs-frontend-api.h /usr/include/obs/obs-frontend-api.h
- name: 'Configure obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
mkdir ./build
cd ./build
cmake -DLIBOBS_INCLUDE_DIR=${{ github.workspace }}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..
- name: 'Build obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
set -e
cd ./build
make -j4
- name: 'Set release filename'
shell: bash
run: |
FILENAME="obs-websocket-${{ env.GIT_TAG }}-1_amd64.deb"
echo "::set-env name=LINUX_FILENAME::$FILENAME"
- name: 'Package ${{ env.LINUX_FILENAME }}'
if: success()
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
VERSION="${{ env.GIT_TAG }}"
cd ./build
sudo checkinstall -y --type=debian --fstrans=no -nodoc \
--backup=no --deldoc=yes --install=no --pkgname=obs-websocket --pkgversion=$VERSION \
--pkglicense="GPLv2.0" --maintainer="${{ github.event.pusher.email }}" --pkggroup="video" \
--pkgsource="${{ github.event.repository.html_url }}" \
--requires="obs-studio,libqt5core5a,libqt5widgets5,qt5-image-formats-plugins" \
--pakdir="../package"
sudo chmod ao+r ../package/*
cd -
- name: 'Publish ${{ env.LINUX_FILENAME }}'
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_TAG }}-linux'
path: '${{ github.workspace }}/obs-websocket/package/*.deb'
macos64:
name: "macOS 64-bit"
runs-on: [macos-latest]
env:
MACOS_DEPS_VERSION: '2020-04-18'
QT_VERSION: '5.14.1'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/obs-websocket
submodules: 'recursive'
- name: 'Checkout OBS'
uses: actions/checkout@v2
with:
repository: obsproject/obs-studio
path: ${{ github.workspace }}/obs-studio
submodules: 'recursive'
- name: 'Get OBS-Studio git info'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
git fetch --prune --unshallow
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
- 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'
working-directory: ${{ github.workspace }}/obs-websocket
run: |
git fetch --prune --unshallow
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
- name: 'Install prerequisites (Homebrew)'
shell: bash
run: |
brew bundle --file ${{ github.workspace }}/obs-websocket/CI/macos/Brewfile
- name: 'Install prerequisite: Pre-built OBS dependencies'
shell: bash
run: |
curl -L -O https://github.com/obsproject/obs-deps/releases/download/${{ env.MACOS_DEPS_VERSION }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz
tar -xf ${{ github.workspace }}/osx-deps-${{ env.MACOS_DEPS_VERSION }}.tar.gz -C "/tmp"
- name: 'Configure OBS Studio'
shell: bash
working-directory: ${{ github.workspace }}/obs-studio
run: |
mkdir build
cd build
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DENABLE_SCRIPTING=NO -DDepsPath=/tmp/obsdeps -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/${{ env.QT_VERSION }}/lib/cmake ..
- name: 'Build OBS Studio libraries'
working-directory: ${{ github.workspace }}/obs-studio
shell: bash
run: |
set -e
cd ./build
make -j4 libobs obs-frontend-api
- name: 'Configure obs-websocket'
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
mkdir build
cd build
cmake -DQTDIR=/usr/local/Cellar/qt/${{ env.QT_VERSION }} -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
shell: bash
run: |
set -e
cd ./build
make -j4
- name: 'Install prerequisite: Packages app'
if: success()
shell: bash
run: |
curl -L -O https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
sudo installer -pkg ${{ github.workspace }}/Packages.pkg -target /
- name: 'Set release filename'
if: success() && startsWith(github.ref, 'refs/tags')
shell: bash
run: |
FILENAME_UNSIGNED="obs-websocket-${{ env.GIT_TAG }}-macOS-Unsigned.pkg"
FILENAME="obs-websocket-${{ env.GIT_TAG }}-macOS.pkg"
echo "::set-env name=MAC_FILENAME_UNSIGNED::$FILENAME_UNSIGNED"
echo "::set-env name=MAC_FILENAME::$FILENAME"
- name: 'Fix linked dynamic library paths'
if: success()
working-directory: ${{ github.workspace }}/obs-websocket
shell: bash
run: |
install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets ./build/obs-websocket.so
install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui ./build/obs-websocket.so
install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore ./build/obs-websocket.so
echo "Dependencies for obs-websocket"
otool -L ./build/obs-websocket.so
- name: 'Install Apple Developer Certificate'
if: success()
uses: apple-actions/import-codesign-certs@253ddeeac23f2bdad1646faac5c8c2832e800071
with:
p12-file-base64: ${{ secrets.MACOS_CERT_CODESIGN }}
p12-password: ${{ secrets.MACOS_CERT_PASS }}
- name: 'Code signing'
if: success()
working-directory: ./obs-websocket
shell: bash
run: |
set -e
codesign --sign "${{ secrets.MACOS_IDENT_CODESIGN }}" ./build/obs-websocket.so
packagesbuild ./CI/macos/obs-websocket.pkgproj
mv ./release/obs-websocket.pkg ./release/${{ env.MAC_FILENAME_UNSIGNED }}
productsign --sign "${{ secrets.MACOS_IDENT_INSTALLER }}" ./release/${{ env.MAC_FILENAME_UNSIGNED }} ./release/${{ env.MAC_FILENAME }}
rm ./release/${{ env.MAC_FILENAME_UNSIGNED }}
- name: 'Notarization'
if: success()
working-directory: ./obs-websocket
shell: bash
run: |
set -e
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.MACOS_IDENT_USER }}" -p "${{ secrets.MACOS_IDENT_PASS }}"
xcnotary precheck ./release/${{ env.MAC_FILENAME }}
if [ "$?" -eq 0 ]; then xcnotary notarize ./release/${{ env.MAC_FILENAME }} --developer-account "${{ secrets.MACOS_IDENT_USER }}" --developer-password-keychain-item "AC_PASSWORD" --provider "${{ secrets.MACOS_IDENT_PROVIDER }}"; fi
- name: 'Publish ${{ env.MAC_FILENAME }} artifact'
if: success() && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v2-preview
with:
name: '${{ env.GIT_TAG }}-macOS'
path: ${{ github.workspace }}/obs-websocket/release/*.pkg
make-release:
name: 'Create and upload release'
runs-on: [ubuntu-latest]
needs: [windows, ubuntu64, macos64]
steps:
- name: 'Get the version'
shell: bash
id: get_version
run: |
echo ::set-env name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
- name: 'Create Release'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_VERSION }}
release_name: obs-websocket ${{ env.TAG_VERSION }}
draft: false
prerelease: false
- name: 'Download release artifacts'
uses: actions/download-artifact@v2-preview
- name: 'Upload Windows .zip artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-Windows/obs-websocket-${{ env.TAG_VERSION }}-Windows.zip
asset_name: obs-websocket-${{ env.TAG_VERSION }}-Windows.zip
asset_content_type: application/zip
- name: 'Upload Windows .exe artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-Windows-Installer/obs-websocket-${{ env.TAG_VERSION }}-Windows-Installer.exe
asset_name: obs-websocket-${{ env.TAG_VERSION }}-Windows-Installer.exe
asset_content_type: application/zip
- name: 'Upload Linux artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-linux/obs-websocket_${{ env.TAG_VERSION }}-1_amd64.deb
asset_name: obs-websocket-${{ env.TAG_VERSION }}-1_amd64.deb
asset_content_type: application/octet-stream
- name: 'Upload macOS artifact to release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ env.TAG_VERSION }}-macOS/obs-websocket-${{ env.TAG_VERSION }}-macOS.pkg
asset_name: obs-websocket-${{ env.TAG_VERSION }}-macOS.pkg
asset_content_type: application/octet-stream

View File

@ -2,7 +2,7 @@
## Prerequisites
You'll need [Qt 5.10.x](https://download.qt.io/official_releases/qt/5.10/),
You'll need [Qt 5.15.2](https://download.qt.io/official_releases/qt/5.15/5.15.2/),
[CMake](https://cmake.org/download/) and a working [OBS Studio development environment](https://obsproject.com/wiki/install-instructions) installed on your
computer.
@ -53,10 +53,10 @@ look for issues or specificities.
```shell
git clone --recursive https://github.com/Palakis/obs-websocket.git
cd obs-websocket
./CI/install-dependencies-macos.sh
./CI/install-build-obs-macos.sh
./CI/build-macos.sh
./CI/package-macos.sh
./CI/macos/install-dependencies-macos.sh
./CI/macos/install-build-obs-macos.sh
./CI/macos/build-plugin-macos.sh
./CI/macos/package-plugin-macos.sh
```
This will result in a ready-to-use `obs-websocket.pkg` installer in the `release` subfolder.

View File

@ -1,6 +0,0 @@
if not exist %DepsBasePath% (
curl -o %DepsBasePath%.zip -kLO https://obsproject.com/downloads/dependencies2017.zip -f --retry 5 -C -
7z x %DepsBasePath%.zip -o%DepsBasePath%
) else (
echo "OBS dependencies are already there. Download skipped."
)

View File

@ -1,42 +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
echo "[obs-websocket] Downloading and unpacking OBS dependencies"
wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3.amazonaws.com/osx-deps-2018-08-09.tar.gz
tar -xf ./osx-deps-2018-08-09.tar.gz -C /tmp
# 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 .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
-DDISABLE_PLUGINS=true \
-DENABLE_SCRIPTING=0 \
-DDepsPath=/tmp/obsdeps \
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake \
&& make -j4

View File

@ -1,56 +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 deps
echo "[obs-websocket] Updating Homebrew.."
brew update >/dev/null
echo "[obs-websocket] Checking installed Homebrew formulas.."
BREW_PACKAGES=$(brew list)
BREW_DEPENDENCIES="jack speexdsp ccache swig mbedtls"
for DEPENDENCY in ${BREW_DEPENDENCIES}; do
if echo "${BREW_PACKAGES}" | grep -q "^${DEPENDENCY}\$"; then
echo "[obs-websocket] Upgrading OBS-Studio dependency '${DEPENDENCY}'.."
brew upgrade ${DEPENDENCY} 2>/dev/null
else
echo "[obs-websocket] Installing OBS-Studio dependency '${DEPENDENCY}'.."
brew install ${DEPENDENCY} 2>/dev/null
fi
done
# qtwebsockets deps
echo "[obs-websocket] Installing obs-websocket dependency 'QT 5.10.1'.."
brew install ./CI/macos/qt.rb
# Pin this version of QT5 to avoid `brew upgrade`
# upgrading it to incompatible version
brew pin qt
# 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 -o './Packages.pkg' --retry-connrefused -s --retry-delay 1 'https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg'
sudo installer -pkg ./Packages.pkg -target /
fi

View File

@ -1,8 +0,0 @@
if not exist %QtBaseDir% (
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_5.10.1.7z -f --retry 5 -z Qt_5.10.1.7z
7z x Qt_5.10.1.7z -o%QtBaseDir%
) else (
echo "Qt is already installed. Download skipped."
)
dir %QtBaseDir%

View File

@ -1,6 +1,9 @@
#!/bin/sh
set -ex
echo "[obs-websocket] Running CMake.."
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=true ..
echo "[obs-websocket] Building plugin.."
make -j4

View File

@ -1,9 +1,11 @@
#!/bin/sh
set -ex
echo "[obs-websocket] Installing obs-studio PPA and updates.."
sudo add-apt-repository -y ppa:obsproject/obs-studio
sudo apt-get -qq update
echo "[obs-websocket] Installing obs-studio and dependencies.."
sudo apt-get install -y \
libc-dev-bin \
libc6-dev git \
@ -13,7 +15,12 @@ sudo apt-get install -y \
obs-studio \
qtbase5-dev
echo "[obs-websocket] Installed OBS Version: $(obs --version)"
ls /usr/include/
ls /usr/include/obs/
# Dirty hack
sudo wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/26.0.0/UI/obs-frontend-api/obs-frontend-api.h
sudo wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/27.0.0/UI/obs-frontend-api/obs-frontend-api.h
sudo ldconfig

View File

@ -7,7 +7,7 @@ export PKG_VERSION="1-$GIT_HASH-$BRANCH_SHORT_NAME-git"
if [[ $BRANCH_FULL_NAME =~ ^refs/tags/ ]]; then
export PKG_VERSION="$BRANCH_SHORT_NAME"
echo "[obs-websocket] Branch is a tag. Setting version to `$PKG_VERSION`."
echo "[obs-websocket] Branch is a tag. Setting version to $PKG_VERSION."
fi
cd ./build
@ -18,7 +18,7 @@ PAGER="cat" sudo checkinstall -y --type=debian --fstrans=no --nodoc \
--pkglicense="GPLv2.0" --maintainer="stephane.lepin@gmail.com" \
--pkggroup="video" \
--pkgsource="https://github.com/Palakis/obs-websocket" \
--requires="obs-studio \(\>= 25.0.7\), libqt5core5a, libqt5widgets5, qt5-image-formats-plugins" \
--requires="obs-studio \(\>= 26.1.0\), libqt5core5a, libqt5widgets5, qt5-image-formats-plugins" \
--pakdir="../package"
sudo chmod ao+r ../package/*

View File

@ -1,10 +1,5 @@
tap "akeru-inc/tap"
brew "jack"
brew "speexdsp"
brew "cmake"
brew "freetype"
brew "fdk-aac"
brew "https://gist.githubusercontent.com/DDRBoxman/9c7a2b08933166f4b61ed9a44b242609/raw/ef4de6c587c6bd7f50210eccd5bd51ff08e6de13/qt.rb"
brew "swig", link: false
brew "https://gist.githubusercontent.com/DDRBoxman/4cada55c51803a2f963fa40ce55c9d3e/raw/572c67e908bfbc1bcb8c476ea77ea3935133f5b5/swig.rb"
brew "akeru-inc/tap/xcnotary"

View File

@ -3,23 +3,21 @@
OSTYPE=$(uname)
if [ "${OSTYPE}" != "Darwin" ]; then
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
exit 1
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
echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
exit 1
fi
#export QT_PREFIX="$(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)"
echo "[obs-websocket] Building 'obs-websocket' for macOS."
mkdir -p build && cd build
cmake .. \
-DQTDIR=/usr/local/opt/qt \
-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" \

View File

@ -0,0 +1,39 @@
#!/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

View File

@ -0,0 +1,57 @@
#!/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

View File

@ -518,7 +518,7 @@
<key>OVERWRITE_PERMISSIONS</key>
<false/>
<key>VERSION</key>
<string>4.9.0</string>
<string>4.9.1</string>
</dict>
<key>PROJECT_COMMENTS</key>
<dict>

View File

@ -5,12 +5,11 @@ 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
echo "[obs-websocket - Error] macOS package script can be run on Darwin-type OS only."
exit 1
fi
echo "[obs-websocket] Preparing package build"
export QT_CELLAR_PREFIX="$(/usr/bin/find /usr/local/Cellar/qt -d 1 | sort -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1)"
GIT_HASH=$(git rev-parse --short HEAD)
GIT_BRANCH_OR_TAG=$(git name-rev --name-only HEAD | awk -F/ '{print $NF}')
@ -20,13 +19,13 @@ 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"
echo "[obs-websocket] Modifying obs-websocket.so linking"
install_name_tool \
-change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets \
-change /tmp/obsdeps/lib/QtWidgets.framework/Versions/5/QtWidgets \
@executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets \
-change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui \
-change /tmp/obsdeps/lib/QtGui.framework/Versions/5/QtGui \
@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui \
-change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore \
-change /tmp/obsdeps/lib/QtCore.framework/Versions/5/QtCore \
@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore \
./build/obs-websocket.so

View File

@ -1,145 +0,0 @@
# Patches for Qt must be at the very least submitted to Qt's Gerrit codereview
# rather than their bug-report Jira. The latter is rarely reviewed by Qt.
class Qt < Formula
desc "Cross-platform application and UI framework"
homepage "https://www.qt.io/"
url "https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
mirror "https://www.mirrorservice.org/sites/download.qt-project.org/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
sha256 "05ffba7b811b854ed558abf2be2ddbd3bb6ddd0b60ea4b5da75d277ac15e740a"
head "https://code.qt.io/qt/qt5.git", :branch => "5.10", :shallow => false
bottle do
sha256 "8b4bad005596a5f8790150fe455db998ac2406f4e0f04140d6656205d844d266" => :high_sierra
sha256 "9c488554935fb573554a4e36d36d3c81e47245b7fefc4b61edef894e67ba1740" => :sierra
sha256 "c0407afba5951df6cc4c6f6c1c315972bd41c99cecb4e029919c4c15ab6f7bdc" => :el_capitan
end
keg_only "Qt 5 has CMake issues when linked"
option "with-docs", "Build documentation"
option "with-examples", "Build examples"
option "without-proprietary-codecs", "Don't build with proprietary codecs (e.g. mp3)"
# OS X 10.7 Lion is still supported in Qt 5.5, but is no longer a reference
# configuration and thus untested in practice. Builds on OS X 10.7 have been
# reported to fail: <https://github.com/Homebrew/homebrew/issues/45284>.
# depends_on :macos => :mountain_lion
depends_on "pkg-config" => :build
depends_on :xcode => :build
depends_on "mysql" => :optional
depends_on "postgresql" => :optional
# Restore `.pc` files for framework-based build of Qt 5 on OS X. This
# partially reverts <https://codereview.qt-project.org/#/c/140954/> merged
# between the 5.5.1 and 5.6.0 releases. (Remove this as soon as feasible!)
#
# Core formulae known to fail without this patch (as of 2016-10-15):
# * gnuplot (with `--with-qt` option)
# * mkvtoolnix (with `--with-qt` option, silent build failure)
# * poppler (with `--with-qt` option)
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/e8fe6567/qt5/restore-pc-files.patch"
sha256 "48ff18be2f4050de7288bddbae7f47e949512ac4bcd126c2f504be2ac701158b"
end
def install
args = %W[
-verbose
-prefix #{prefix}
-release
-opensource -confirm-license
-system-zlib
-qt-libpng
-qt-libjpeg
-qt-freetype
-qt-pcre
-nomake tests
-no-rpath
-pkg-config
-dbus-runtime
]
args << "-nomake" << "examples" if build.without? "examples"
if build.with? "mysql"
args << "-plugin-sql-mysql"
(buildpath/"brew_shim/mysql_config").write <<~EOS
#!/bin/sh
if [ x"$1" = x"--libs" ]; then
mysql_config --libs | sed "s/-lssl -lcrypto//"
else
exec mysql_config "$@"
fi
EOS
chmod 0755, "brew_shim/mysql_config"
args << "-mysql_config" << buildpath/"brew_shim/mysql_config"
end
args << "-plugin-sql-psql" if build.with? "postgresql"
args << "-proprietary-codecs" if build.with? "proprietary-codecs"
system "./configure", *args
system "make"
ENV.deparallelize
system "make", "install"
if build.with? "docs"
system "make", "docs"
system "make", "install_docs"
end
# Some config scripts will only find Qt in a "Frameworks" folder
frameworks.install_symlink Dir["#{lib}/*.framework"]
# The pkg-config files installed suggest that headers can be found in the
# `include` directory. Make this so by creating symlinks from `include` to
# the Frameworks' Headers folders.
Pathname.glob("#{lib}/*.framework/Headers") do |path|
include.install_symlink path => path.parent.basename(".framework")
end
# Move `*.app` bundles into `libexec` to expose them to `brew linkapps` and
# because we don't like having them in `bin`.
# (Note: This move breaks invocation of Assistant via the Help menu
# of both Designer and Linguist as that relies on Assistant being in `bin`.)
libexec.mkpath
Pathname.glob("#{bin}/*.app") { |app| mv app, libexec }
end
def caveats; <<~EOS
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
EOS
end
test do
(testpath/"hello.pro").write <<~EOS
QT += core
QT -= gui
TARGET = hello
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
EOS
(testpath/"main.cpp").write <<~EOS
#include <QCoreApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "Hello World!";
return 0;
}
EOS
system bin/"qmake", testpath/"hello.pro"
system "make"
assert_predicate testpath/"hello", :exist?
assert_predicate testpath/"main.o", :exist?
system "./hello"
end
end

View File

@ -1,37 +0,0 @@
@echo off
SETLOCAL EnableDelayedExpansion
REM If obs-studio directory does not exist, clone the git repo
if not exist %OBSPath% (
echo obs-studio directory does not exist
git clone https://github.com/obsproject/obs-studio %OBSPath%
cd /D %OBSPath%\
git describe --tags --abbrev=0 --exclude="*-rc*" > "%OBSPath%\obs-studio-latest-tag.txt"
set /p OBSLatestTag=<"%OBSPath%\obs-studio-latest-tag.txt"
)
REM Prepare OBS Studio builds
echo Running CMake...
cd /D %OBSPath%
echo git checkout %OBSLatestTag%
git checkout %OBSLatestTag%
echo:
if not exist build32 mkdir build32
if not exist build64 mkdir build64
echo Running cmake for obs-studio %OBSLatestTag% 32-bit...
cd build32
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DDepsPath="%DepsPath32%" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
echo:
echo:
echo Running cmake for obs-studio %OBSLatestTag% 64-bit...
cd ..\build64
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DDepsPath="%DepsPath64%" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
echo:
echo:
dir "%OBSPath%\libobs"

View File

@ -1,7 +0,0 @@
mkdir build32
mkdir build64
cd build32
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DLibObs_DIR="%OBSPath%\build32\libobs" -DLIBOBS_INCLUDE_DIR="%OBSPath%\libobs" -DLIBOBS_LIB="%OBSPath%\build32\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="%OBSPath%\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
cd ..\build64
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DLibObs_DIR="%OBSPath%\build64\libobs" -DLIBOBS_INCLUDE_DIR="%OBSPath%\libobs" -DLIBOBS_LIB="%OBSPath%\build64\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="%OBSPath%\build64\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..

View File

@ -0,0 +1,7 @@
if exist %DEPS_BASE_PATH% (
echo "OBS dependencies found. Download skipped."
) else (
echo "OBS dependencies not found. Downloading..."
curl -o %DEPS_BASE_PATH%.zip -kLO https://cdn-fastly.obsproject.com/downloads/dependencies2019.zip -f --retry 5 -C -
7z x %DEPS_BASE_PATH%.zip -o%DEPS_BASE_PATH%
)

View File

@ -0,0 +1,8 @@
if exist %QT_BASE_DIR% (
echo "Qt directory found. Download skipped."
) else (
echo "Qt directory not found. Downloading..."
curl -kLO https://tt2468.net/dl/Qt_5.15.2.7z -f --retry 5 -C -
7z x Qt_5.15.2.7z -o%QT_BASE_DIR%
)
dir %QT_BASE_DIR%

View File

@ -0,0 +1,37 @@
@echo off
SETLOCAL EnableDelayedExpansion
REM If obs-studio directory does not exist, clone the git repo
if not exist %OBS_PATH% (
echo obs-studio directory does not exist
git clone https://github.com/obsproject/obs-studio %OBS_PATH%
cd /D %OBS_PATH%\
git describe --tags --abbrev=0 > "%OBS_PATH%\obs-studio-latest-tag.txt"
set /p OBS_LATEST_TAG=<"%OBS_PATH%\obs-studio-latest-tag.txt"
)
REM Prepare OBS Studio builds
echo Running CMake...
cd /D %OBS_PATH%
echo git checkout %OBS_LATEST_TAG%
git checkout %OBS_LATEST_TAG%
echo:
if not exist build32 mkdir build32
if not exist build64 mkdir build64
echo Running cmake for obs-studio %OBS_LATEST_TAG% 32-bit...
cd build32
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DDepsPath="%DEPS_PATH_32%" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
echo:
echo:
echo Running cmake for obs-studio %OBS_LATEST_TAG% 64-bit...
cd ..\build64
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DDepsPath="%DEPS_PATH_64%" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
echo:
echo:
dir "%OBS_PATH%\libobs"

View File

@ -0,0 +1,7 @@
mkdir build32
mkdir build64
cd build32
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR32%" -DLibObs_DIR="%OBS_PATH%\build32\libobs" -DLIBOBS_INCLUDE_DIR="%OBS_PATH%\libobs" -DLIBOBS_LIB="%OBS_PATH%\build32\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="%OBS_PATH%\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
cd ..\build64
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0 -DQTDIR="%QTDIR64%" -DLibObs_DIR="%OBS_PATH%\build64\libobs" -DLIBOBS_INCLUDE_DIR="%OBS_PATH%\libobs" -DLIBOBS_LIB="%OBS_PATH%\build64\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="%OBS_PATH%\build64\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(obs-websocket VERSION 4.9.0)
project(obs-websocket VERSION 4.9.1)
set(CMAKE_PREFIX_PATH "${QTDIR}")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -36,6 +36,7 @@ set(obs-websocket_SOURCES
src/WSRequestHandler_SceneItems.cpp
src/WSRequestHandler_Sources.cpp
src/WSRequestHandler_Streaming.cpp
src/WSRequestHandler_VirtualCam.cpp
src/WSRequestHandler_StudioMode.cpp
src/WSRequestHandler_Transitions.cpp
src/WSRequestHandler_Outputs.cpp
@ -72,8 +73,8 @@ include_directories(
"${LIBOBS_INCLUDE_DIR}/../UI/obs-frontend-api"
${Qt5Core_INCLUDES}
${Qt5Widgets_INCLUDES}
"${CMAKE_SOURCE_DIR}/deps/asio/asio/include"
"${CMAKE_SOURCE_DIR}/deps/websocketpp")
"${CMAKE_CURRENT_SOURCE_DIR}/deps/asio/asio/include"
"${CMAKE_CURRENT_SOURCE_DIR}/deps/websocketpp")
target_link_libraries(obs-websocket
libobs
@ -84,9 +85,9 @@ target_link_libraries(obs-websocket
# --- Windows-specific build settings and tasks ---
if(WIN32)
if(NOT DEFINED OBS_FRONTEND_LIB)
set(OBS_FRONTEND_LIB "OBS_FRONTEND_LIB-NOTFOUND" CACHE FILEPATH "OBS frontend library")
message(FATAL_ERROR "Could not find OBS Frontend API's library !")
set(OBS_FRONTEND_LIB "NOTFOUND" CACHE FILEPATH "OBS frontend library")
if(OBS_FRONTEND_LIB STREQUAL "NOTFOUND")
message(FATAL_ERROR "OBS Frontend API library not found!")
endif()
if(MSVC)
@ -116,67 +117,70 @@ if(WIN32)
set(RELEASE_DIR "${PROJECT_SOURCE_DIR}/release")
add_custom_command(TARGET obs-websocket POST_BUILD
# If config is Release, package release files
COMMAND if $<CONFIG:Release>==1 (
# If config is Release or RelWithDebInfo, package release files
COMMAND if $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>==1 (
"${CMAKE_COMMAND}" -E make_directory
"${RELEASE_DIR}/data/obs-plugins/obs-websocket"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}"
)
COMMAND if $<CONFIG:Release>==1 ("${CMAKE_COMMAND}" -E copy_directory
COMMAND if $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>==1 (
"${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/data"
"${RELEASE_DIR}/data/obs-plugins/obs-websocket")
"${RELEASE_DIR}/data/obs-plugins/obs-websocket"
)
COMMAND if $<CONFIG:Release>==1 ("${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:obs-websocket>"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
# In Release mode, copy Qt image format plugins
COMMAND if $<CONFIG:Release>==1 (
COMMAND if $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>==1 (
"${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:obs-websocket>"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}"
)
# In Release or RelWithDebInfo mode, copy Qt image format plugins
COMMAND if $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>==1 (
"${CMAKE_COMMAND}" -E make_directory
"${RELEASE_DIR}/bin/${ARCH_NAME}/imageformats"
)
COMMAND if $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>==1 (
"${CMAKE_COMMAND}" -E copy
"${QTDIR}/plugins/imageformats/qicns.dll"
"${QTDIR}/plugins/imageformats/qico.dll"
"${QTDIR}/plugins/imageformats/qjpeg.dll"
"${RELEASE_DIR}/bin/${ARCH_NAME}/imageformats/qjpeg.dll")
"${QTDIR}/plugins/imageformats/qtiff.dll"
"${QTDIR}/plugins/imageformats/qwbmp.dll"
"${QTDIR}/plugins/imageformats/qwebp.dll"
"${RELEASE_DIR}/bin/${ARCH_NAME}/imageformats"
)
# If config is RelWithDebInfo, package PDB file for target
COMMAND if $<CONFIG:RelWithDebInfo>==1 (
"${CMAKE_COMMAND}" -E copy
"${QTDIR}/plugins/imageformats/qjpeg.dll"
"${RELEASE_DIR}/bin/${ARCH_NAME}/imageformats/qjpeg.dll")
# If config is RelWithDebInfo, package release files
COMMAND if $<CONFIG:RelWithDebInfo>==1 (
"${CMAKE_COMMAND}" -E make_directory
"${RELEASE_DIR}/data/obs-plugins/obs-websocket"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
COMMAND if $<CONFIG:RelWithDebInfo>==1 ("${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/data"
"${RELEASE_DIR}/data/obs-plugins/obs-websocket")
COMMAND if $<CONFIG:RelWithDebInfo>==1 ("${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:obs-websocket>"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
COMMAND if $<CONFIG:RelWithDebInfo>==1 ("${CMAKE_COMMAND}" -E copy
"$<TARGET_PDB_FILE:obs-websocket>"
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}"
)
# Copy to obs-studio dev environment for immediate testing
# In the Debug configuration, copy to obs-studio dev environment for immediate testing
COMMAND if $<CONFIG:Debug>==1 (
"${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:obs-websocket>"
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/obs-plugins/${ARCH_NAME}")
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/obs-plugins/${ARCH_NAME}"
)
COMMAND if $<CONFIG:Debug>==1 (
"${CMAKE_COMMAND}" -E copy
"$<TARGET_PDB_FILE:obs-websocket>"
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/obs-plugins/${ARCH_NAME}")
"$<TARGET_PDB_FILE:obs-websocket>"
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/obs-plugins/${ARCH_NAME}"
)
COMMAND if $<CONFIG:Debug>==1 (
"${CMAKE_COMMAND}" -E make_directory
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket")
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket"
)
COMMAND if $<CONFIG:Debug>==1 (
"${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/data"
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket")
"${PROJECT_SOURCE_DIR}/data"
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket"
)
)
# --- End of sub-section ---
@ -192,8 +196,11 @@ if(UNIX AND NOT APPLE)
file(GLOB locale_files data/locale/*.ini)
set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_WRITE GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
if(${USE_UBUNTU_FIX})
install(TARGETS obs-websocket LIBRARY

View File

@ -54,6 +54,7 @@ Here's a list of available language APIs for obs-websocket :
- Java 11+: [obs-java-client](https://github.com/harm27/obs-java-client) by harm27
- Golang: [go-obs-websocket](https://github.com/christopher-dG/go-obs-websocket) by Chris de Graaf
- Rust: [obws](https://github.com/dnaka91/obws) by dnaka91
- Dart: [obs_websocket](https://pub.dev/packages/obs_websocket) by faithoflifedev
- HTTP API: [obs-websocket-http](https://github.com/IRLToolkit/obs-websocket-http) by tt2468
- CLI: [obs-cli](https://github.com/leafac/obs-cli) by leafac

View File

@ -33,70 +33,81 @@ jobs:
vmImage: 'windows-2019'
variables:
build_config: RelWithDebInfo
DepsBasePath: 'D:\obsdependencies'
DepsPath32: '$(DepsBasePath)\win32'
DepsPath64: '$(DepsBasePath)\win64'
QtBaseDir: 'D:\QtDep'
QTDIR32: '$(QtBaseDir)\5.10.1\msvc2017'
QTDIR64: '$(QtBaseDir)\5.10.1\msvc2017_64'
OBSPath: 'D:\obs-studio'
DEPS_CACHE_VERSION: '1' # Change whenever updating OBS dependencies URL, in order to force a cache reset
DEPS_BASE_PATH: 'D:\obsdependencies'
DEPS_PATH_32: '$(DEPS_BASE_PATH)\win32'
DEPS_PATH_64: '$(DEPS_BASE_PATH)\win64'
QT_CACHE_VERSION: '1' # Change whenever updating Qt dependency URL, in order to force a cache reset
QT_BASE_DIR: 'D:\QtDep'
QTDIR32: '$(QT_BASE_DIR)\5.15.2\msvc2019'
QTDIR64: '$(QT_BASE_DIR)\5.15.2\msvc2019_64'
OBS_CACHE_VERSION: '1'
OBS_PATH: 'D:\obs-studio'
steps:
- checkout: self
submodules: true
- script: ./CI/install-qt-win.cmd
- task: Cache@2
displayName: Restore cached Qt archive file
inputs:
key: 'qtdep-"$(QT_CACHE_VERSION)" | "$(Agent.OS)"'
restoreKeys: |
qtdep-"$(QT_CACHE_VERSION)" | "$(Agent.OS)"
path: $(QT_BASE_DIR)
- script: ./CI/windows/install-qt-win.cmd
displayName: 'Install Qt'
env:
QtBaseDir: $(QtBaseDir)
QT_BASE_DIR: $(QT_BASE_DIR)
- task: Cache@2
displayName: Restore cached OBS Studio dependencies
inputs:
key: 'obsdeps | "$(Agent.OS)"'
key: 'obsdeps-"$(DEPS_CACHE_VERSION)" | "$(Agent.OS)"'
restoreKeys: |
obsdeps | "$(Agent.OS)"
path: $(DepsBasePath)
obsdeps-"$(DEPS_CACHE_VERSION)" | "$(Agent.OS)"
path: $(DEPS_BASE_PATH)
- script: ./CI/download-obs-deps.cmd
- script: ./CI/windows/download-obs-deps.cmd
displayName: 'Download OBS Studio dependencies'
- task: Cache@2
displayName: Restore cached OBS Studio builds
inputs:
key: 'obs | "$(Agent.OS)"'
key: 'obs-"$(OBS_CACHE_VERSION)" | "$(Agent.OS)"'
restoreKeys: |
obs | "$(Agent.OS)"
path: $(OBSPath)
obs-"$(OBS_CACHE_VERSION)" | "$(Agent.OS)"
path: $(OBS_PATH)
- script: ./CI/prepare-obs-windows.cmd
- script: ./CI/windows/prepare-obs-windows.cmd
displayName: 'Checkout & CMake OBS Studio'
env:
build_config: $(build_config)
DepsPath32: $(DepsPath32)
DepsPath64: $(DepsPath64)
DEPS_PATH_32: $(DEPS_PATH_32)
DEPS_PATH_64: $(DEPS_PATH_64)
QTDIR32: $(QTDIR32)
QTDIR64: $(QTDIR64)
OBSPath: $(OBSPath)
OBS_PATH: $(OBS_PATH)
- task: MSBuild@1
displayName: 'Build OBS Studio 32-bit'
inputs:
msbuildArguments: '/m /p:Configuration=$(build_config)'
solution: '$(OBSPath)\build32\obs-studio.sln'
solution: '$(OBS_PATH)\build32\obs-studio.sln'
- task: MSBuild@1
displayName: 'Build OBS Studio 64-bit'
inputs:
msbuildArguments: '/m /p:Configuration=$(build_config)'
solution: '$(OBSPath)\build64\obs-studio.sln'
solution: '$(OBS_PATH)\build64\obs-studio.sln'
- script: ./CI/prepare-windows.cmd
- script: ./CI/windows/prepare-plugin-windows.cmd
displayName: 'CMake obs-websocket'
env:
build_config: $(build_config)
QTDIR32: $(QTDIR32)
QTDIR64: $(QTDIR64)
OBSPath: $(OBSPath)
OBS_PATH: $(OBS_PATH)
- task: MSBuild@1
displayName: 'Build obs-websocket 32-bit'
@ -110,7 +121,7 @@ jobs:
msbuildArguments: '/m /p:Configuration=$(build_config)'
solution: '.\build64\obs-websocket.sln'
- script: ./CI/package-windows.cmd
- script: ./CI/windows/package-plugin-windows.cmd
displayName: 'Package obs-websocket'
- task: PublishBuildArtifacts@1
@ -121,22 +132,21 @@ jobs:
- job: 'Build_Linux'
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
variables:
BUILD_REASON: $(Build.Reason)
BRANCH_SHORT_NAME: $(Build.SourceBranchName)
BRANCH_FULL_NAME: $(Build.SourceBranch)
steps:
- checkout: self
submodules: true
- script: ./CI/install-dependencies-ubuntu.sh
- script: ./CI/linux/install-dependencies-ubuntu.sh
displayName: 'Install dependencies'
- script: ./CI/build-ubuntu.sh
- script: ./CI/linux/build-plugin-ubuntu.sh
displayName: 'Build obs-websocket'
- script: ./CI/package-ubuntu.sh
- script: ./CI/linux/package-plugin-ubuntu.sh
displayName: 'Package obs-websocket'
- task: PublishBuildArtifacts@1
@ -146,18 +156,24 @@ jobs:
- job: 'Build_macOS'
pool:
vmImage: 'macos-10.14'
vmImage: 'macOS-10.15'
variables:
OBS_DEPS_VERSION: '2020-12-22'
QT_VERSION: '5.15.2'
steps:
- checkout: self
submodules: true
- script: ./CI/install-dependencies-macos.sh
- script: ./CI/macos/install-dependencies-macos.sh
displayName: 'Install dependencies'
env:
OBS_DEPS_VERSION: $(OBS_DEPS_VERSION)
QT_VERSION: $(QT_VERSION)
- script: ./CI/install-build-obs-macos.sh
- script: ./CI/macos/install-build-obs-macos.sh
displayName: 'Build OBS'
- script: ./CI/build-macos.sh
- script: ./CI/macos/build-plugin-macos.sh
displayName: 'Build obs-websocket'
- task: InstallAppleCertificate@2
@ -167,7 +183,7 @@ jobs:
certSecureFile: 'Certificates.p12'
certPwd: $(secrets.macOS.certificatesImportPassword)
- script: ./CI/package-macos.sh
- script: ./CI/macos/package-plugin-macos.sh
displayName: 'Package obs-websocket'
env:
RELEASE_MODE: $(isReleaseMode)

View File

@ -127,6 +127,7 @@
"{double} `rotation` The clockwise rotation of the scene item in degrees around the point of alignment.",
"{double} `scale.x` The x-scale factor of the scene item.",
"{double} `scale.y` The y-scale factor of the scene item.",
"{String} `scale.filter` The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\".",
"{int} `crop.top` The number of pixels cropped off the top of the scene item before scaling.",
"{int} `crop.right` The number of pixels cropped off the right of the scene item before scaling.",
"{int} `crop.bottom` The number of pixels cropped off the bottom of the scene item before scaling.",
@ -175,6 +176,11 @@
"name": "scale.y",
"description": "The y-scale factor of the scene item."
},
{
"type": "String",
"name": "scale.filter",
"description": "The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\"."
},
{
"type": "int",
"name": "crop.top",
@ -360,7 +366,7 @@
"{boolean} `flags.encoded` Output is encoded",
"{boolean} `flags.multiTrack` Output uses several audio tracks",
"{boolean} `flags.service` Output uses a service",
"{Object} `settings` Output name",
"{Object} `settings` Output settings",
"{boolean} `active` Output status (active or not)",
"{boolean} `reconnecting` Output reconnection status (reconnecting or not)",
"{double} `congestion` Output congestion",
@ -427,7 +433,7 @@
{
"type": "Object",
"name": "settings",
"description": "Output name"
"description": "Output settings"
},
{
"type": "boolean",
@ -855,7 +861,7 @@
"{String} `name` Transition name.",
"{String} `type` Transition type.",
"{int} `duration` Transition duration (in milliseconds). Will be -1 for any transition with a fixed duration, such as a Stinger, due to limitations of the OBS API.",
"{String} `from-scene` Source scene of the transition",
"{String (optional)} `from-scene` Source scene of the transition",
"{String} `to-scene` Destination scene of the transition"
],
"api": "events",
@ -879,7 +885,7 @@
"description": "Transition duration (in milliseconds). Will be -1 for any transition with a fixed duration, such as a Stinger, due to limitations of the OBS API."
},
{
"type": "String",
"type": "String (optional)",
"name": "from-scene",
"description": "Source scene of the transition"
},
@ -983,7 +989,7 @@
"{String} `name` Transition name.",
"{String} `type` Transition type.",
"{int} `duration` Transition duration (in milliseconds).",
"{String} `from-scene` Source scene of the transition",
"{String (optional)} `from-scene` Source scene of the transition",
"{String} `to-scene` Destination scene of the transition"
],
"api": "events",
@ -1007,7 +1013,7 @@
"description": "Transition duration (in milliseconds)."
},
{
"type": "String",
"type": "String (optional)",
"name": "from-scene",
"description": "Source scene of the transition"
},
@ -1661,6 +1667,74 @@
"examples": []
}
],
"virtual cam": [
{
"subheads": [],
"description": "Virtual cam started successfully.",
"api": "events",
"name": "VirtualCamStarted",
"category": "virtual cam",
"since": "4.9.1",
"names": [
{
"name": "",
"description": "VirtualCamStarted"
}
],
"categories": [
{
"name": "",
"description": "virtual cam"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "VirtualCamStarted"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Virtual cam stopped successfully.",
"api": "events",
"name": "VirtualCamStopped",
"category": "virtual cam",
"since": "4.9.1",
"names": [
{
"name": "",
"description": "VirtualCamStopped"
}
],
"categories": [
{
"name": "",
"description": "virtual cam"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "VirtualCamStopped"
},
"lead": "",
"type": "class",
"examples": []
}
],
"replay buffer": [
{
"subheads": [],
@ -2112,7 +2186,8 @@
"description": "The volume of a source has changed.",
"return": [
"{String} `sourceName` Source name",
"{float} `volume` Source volume"
"{float} `volume` Source volume",
"{float} `volumeDb` Source volume in Decibel"
],
"api": "events",
"name": "SourceVolumeChanged",
@ -2128,6 +2203,11 @@
"type": "float",
"name": "volume",
"description": "Source volume"
},
{
"type": "float",
"name": "volumeDb",
"description": "Source volume in Decibel"
}
],
"names": [
@ -4389,15 +4469,56 @@
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Waits for the specified duration. Designed to be used in `ExecuteBatch` operations.",
"param": "{int} `sleepMillis` Delay in milliseconds to wait before continuing.",
"api": "requests",
"name": "Sleep",
"category": "general",
"since": "4.9.1",
"params": [
{
"type": "int",
"name": "sleepMillis",
"description": "Delay in milliseconds to wait before continuing."
}
],
"names": [
{
"name": "",
"description": "Sleep"
}
],
"categories": [
{
"name": "",
"description": "general"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "Sleep"
},
"lead": "",
"type": "class",
"examples": []
}
],
"media control": [
{
"subheads": [],
"description": "Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)",
"description": "Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)\nNote :Leaving out `playPause` toggles the current pause state",
"param": [
"{String} `sourceName` Source name.",
"{boolean} `playPause` Whether to pause or play the source. `false` for play, `true` for pause."
"{boolean} `playPause` (optional) Whether to pause or play the source. `false` for play, `true` for pause."
],
"api": "requests",
"name": "PlayPauseMedia",
@ -4412,7 +4533,7 @@
{
"type": "boolean",
"name": "playPause",
"description": "Whether to pause or play the source. `false` for play, `true` for pause."
"description": "(optional) Whether to pause or play the source. `false` for play, `true` for pause."
}
],
"names": [
@ -5290,6 +5411,142 @@
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Changes whether an audio track is active for a source.",
"param": [
"{String} `sourceName` Source name.",
"{int} `track` Audio tracks 1-6.",
"{boolean} `active` Whether audio track is active or not."
],
"api": "requests",
"name": "SetTracks",
"category": "sources",
"since": "4.9.1",
"params": [
{
"type": "String",
"name": "sourceName",
"description": "Source name."
},
{
"type": "int",
"name": "track",
"description": "Audio tracks 1-6."
},
{
"type": "boolean",
"name": "active",
"description": "Whether audio track is active or not."
}
],
"names": [
{
"name": "",
"description": "SetTracks"
}
],
"categories": [
{
"name": "",
"description": "sources"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "SetTracks"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Gets whether an audio track is active for a source.",
"param": "{String} `sourceName` Source name.",
"return": [
"{boolean} `track1`",
"{boolean} `track2`",
"{boolean} `track3`",
"{boolean} `track4`",
"{boolean} `track5`",
"{boolean} `track6`"
],
"api": "requests",
"name": "GetTracks",
"category": "sources",
"since": "4.9.1",
"returns": [
{
"type": "boolean",
"name": "track1",
"description": ""
},
{
"type": "boolean",
"name": "track2",
"description": ""
},
{
"type": "boolean",
"name": "track3",
"description": ""
},
{
"type": "boolean",
"name": "track4",
"description": ""
},
{
"type": "boolean",
"name": "track5",
"description": ""
},
{
"type": "boolean",
"name": "track6",
"description": ""
}
],
"params": [
{
"type": "String",
"name": "sourceName",
"description": "Source name."
}
],
"names": [
{
"name": "",
"description": "GetTracks"
}
],
"categories": [
{
"name": "",
"description": "sources"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "GetTracks"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Get the mute status of a specified source.",
@ -5437,6 +5694,55 @@
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Get the source's active status of a specified source (if it is showing in the final mix).",
"param": "{String} `sourceName` Source name.",
"return": "{boolean} `sourceActive` Source active status of the source.",
"api": "requests",
"name": "GetSourceActive",
"category": "sources",
"since": "4.9.1",
"returns": [
{
"type": "boolean",
"name": "sourceActive",
"description": "Source active status of the source."
}
],
"params": [
{
"type": "String",
"name": "sourceName",
"description": "Source name."
}
],
"names": [
{
"name": "",
"description": "GetSourceActive"
}
],
"categories": [
{
"name": "",
"description": "sources"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "GetSourceActive"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Get the audio's active status of a specified source.",
@ -8569,6 +8875,7 @@
"{double} `rotation` The clockwise rotation of the item in degrees around the point of alignment.",
"{double} `scale.x` The x-scale factor of the source.",
"{double} `scale.y` The y-scale factor of the source.",
"{String} `scale.filter` The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\".",
"{int} `crop.top` The number of pixels cropped off the top of the source before scaling.",
"{int} `crop.right` The number of pixels cropped off the right of the source before scaling.",
"{int} `crop.bottom` The number of pixels cropped off the bottom of the source before scaling.",
@ -8632,6 +8939,11 @@
"name": "scale.y",
"description": "The y-scale factor of the source."
},
{
"type": "String",
"name": "scale.filter",
"description": "The scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\"."
},
{
"type": "int",
"name": "crop.top",
@ -8780,6 +9092,7 @@
"{double (optional)} `rotation` The new clockwise rotation of the item in degrees.",
"{double (optional)} `scale.x` The new x scale of the item.",
"{double (optional)} `scale.y` The new y scale of the item.",
"{String (optional)} `scale.filter` The new scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\".",
"{int (optional)} `crop.top` The new amount of pixels cropped off the top of the source before scaling.",
"{int (optional)} `crop.bottom` The new amount of pixels cropped off the bottom of the source before scaling.",
"{int (optional)} `crop.left` The new amount of pixels cropped off the left of the source before scaling.",
@ -8846,6 +9159,11 @@
"name": "scale.y",
"description": "The new y scale of the item."
},
{
"type": "String (optional)",
"name": "scale.filter",
"description": "The new scale filter of the source. Can be \"OBS_SCALE_DISABLE\", \"OBS_SCALE_POINT\", \"OBS_SCALE_BICUBIC\", \"OBS_SCALE_BILINEAR\", \"OBS_SCALE_LANCZOS\" or \"OBS_SCALE_AREA\"."
},
{
"type": "int (optional)",
"name": "crop.top",
@ -9334,7 +9652,7 @@
"param": [
"{String} `sceneName` Name of the scene to create the scene item in",
"{String} `sourceName` Name of the source to be added",
"{boolean} `setVisible` Whether to make the sceneitem visible on creation or not. Default `true`"
"{boolean (optional)} `setVisible` Whether to make the sceneitem visible on creation or not. Default `true`"
],
"return": "{int} `itemId` Numerical ID of the created scene item",
"api": "requests",
@ -9360,7 +9678,7 @@
"description": "Name of the source to be added"
},
{
"type": "boolean",
"type": "boolean (optional)",
"name": "setVisible",
"description": "Whether to make the sceneitem visible on creation or not. Default `true`"
}
@ -9673,7 +9991,7 @@
"description": "Changes the order of scene items in the requested scene.",
"param": [
"{String (optional)} `scene` Name of the scene to reorder (defaults to current).",
"{Array<Scene>} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene",
"{Array<Object>} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene",
"{int (optional)} `items.*.id` Id of a specific scene item. Unique on a scene by scene basis.",
"{String (optional)} `items.*.name` Name of a scene item. Sufficiently unique if no scene items share sources within the scene."
],
@ -9688,7 +10006,7 @@
"description": "Name of the scene to reorder (defaults to current)."
},
{
"type": "Array<Scene>",
"type": "Array<Object>",
"name": "items",
"description": "Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene"
},
@ -9891,9 +10209,11 @@
"{boolean} `streaming` Current streaming status.",
"{boolean} `recording` Current recording status.",
"{boolean} `recording-paused` If recording is paused.",
"{boolean} `virtualcam` Current virtual cam status.",
"{boolean} `preview-only` Always false. Retrocompatibility with OBSRemote.",
"{String (optional)} `stream-timecode` Time elapsed since streaming started (only present if currently streaming).",
"{String (optional)} `rec-timecode` Time elapsed since recording started (only present if currently recording)."
"{String (optional)} `rec-timecode` Time elapsed since recording started (only present if currently recording).",
"{String (optional)} `virtualcam-timecode` Time elapsed since virtual cam started (only present if virtual cam currently active)."
],
"api": "requests",
"name": "GetStreamingStatus",
@ -9915,6 +10235,11 @@
"name": "recording-paused",
"description": "If recording is paused."
},
{
"type": "boolean",
"name": "virtualcam",
"description": "Current virtual cam status."
},
{
"type": "boolean",
"name": "preview-only",
@ -9929,6 +10254,11 @@
"type": "String (optional)",
"name": "rec-timecode",
"description": "Time elapsed since recording started (only present if currently recording)."
},
{
"type": "String (optional)",
"name": "virtualcam-timecode",
"description": "Time elapsed since virtual cam started (only present if virtual cam currently active)."
}
],
"names": [
@ -11097,6 +11427,156 @@
"type": "class",
"examples": []
}
],
"virtual cam": [
{
"subheads": [],
"description": "Get current virtual cam status.",
"return": [
"{boolean} `isVirtualCam` Current virtual camera status.",
"{String (optional)} `virtualCamTimecode` Time elapsed since virtual cam started (only present if virtual cam currently active)."
],
"api": "requests",
"name": "GetVirtualCamStatus",
"category": "virtual cam",
"since": "4.9.1",
"returns": [
{
"type": "boolean",
"name": "isVirtualCam",
"description": "Current virtual camera status."
},
{
"type": "String (optional)",
"name": "virtualCamTimecode",
"description": "Time elapsed since virtual cam started (only present if virtual cam currently active)."
}
],
"names": [
{
"name": "",
"description": "GetVirtualCamStatus"
}
],
"categories": [
{
"name": "",
"description": "virtual cam"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "GetVirtualCamStatus"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Toggle virtual cam on or off (depending on the current virtual cam state).",
"api": "requests",
"name": "StartStopVirtualCam",
"category": "virtual cam",
"since": "4.9.1",
"names": [
{
"name": "",
"description": "StartStopVirtualCam"
}
],
"categories": [
{
"name": "",
"description": "virtual cam"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "StartStopVirtualCam"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Start virtual cam.\nWill return an `error` if virtual cam is already active.",
"api": "requests",
"name": "StartVirtualCam",
"category": "virtual cam",
"since": "4.9.1",
"names": [
{
"name": "",
"description": "StartVirtualCam"
}
],
"categories": [
{
"name": "",
"description": "virtual cam"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "StartVirtualCam"
},
"lead": "",
"type": "class",
"examples": []
},
{
"subheads": [],
"description": "Stop virtual cam.\nWill return an `error` if virtual cam is not active.",
"api": "requests",
"name": "StopVirtualCam",
"category": "virtual cam",
"since": "4.9.1",
"names": [
{
"name": "",
"description": "StopVirtualCam"
}
],
"categories": [
{
"name": "",
"description": "virtual cam"
}
],
"sinces": [
{
"name": "",
"description": "4.9.1"
}
],
"heading": {
"level": 2,
"text": "StopVirtualCam"
},
"lead": "",
"type": "class",
"examples": []
}
]
}
}

View File

@ -1,6 +1,6 @@
<!-- This file was generated based on handlebars templates. Do not edit directly! -->
# obs-websocket 4.9.0 protocol reference
# obs-websocket 4.9.1 protocol reference
# General Introduction
Messages are exchanged between the client and the server as JSON objects.
@ -37,7 +37,7 @@ auth_response_hash = binary_sha256(auth_response_string)
auth_response = base64_encode(auth_response_hash)
```
You can also refer to any of the client libraries listed on the [README](README.md) for examples of how to authenticate.
You can also refer to any of the [client libraries](https://github.com/Palakis/obs-websocket#for-developers) listed on the README for examples of how to authenticate.
@ -82,6 +82,9 @@ You can also refer to any of the client libraries listed on the [README](README.
+ [RecordingStopped](#recordingstopped)
+ [RecordingPaused](#recordingpaused)
+ [RecordingResumed](#recordingresumed)
* [Virtual Cam](#virtual-cam)
+ [VirtualCamStarted](#virtualcamstarted)
+ [VirtualCamStopped](#virtualcamstopped)
* [Replay Buffer](#replay-buffer)
+ [ReplayStarting](#replaystarting)
+ [ReplayStarted](#replaystarted)
@ -142,6 +145,7 @@ You can also refer to any of the client libraries listed on the [README](README.
+ [TriggerHotkeyByName](#triggerhotkeybyname)
+ [TriggerHotkeyBySequence](#triggerhotkeybysequence)
+ [ExecuteBatch](#executebatch)
+ [Sleep](#sleep)
* [Media Control](#media-control)
+ [PlayPauseMedia](#playpausemedia)
+ [RestartMedia](#restartmedia)
@ -160,9 +164,12 @@ You can also refer to any of the client libraries listed on the [README](README.
+ [GetSourceTypesList](#getsourcetypeslist)
+ [GetVolume](#getvolume)
+ [SetVolume](#setvolume)
+ [SetTracks](#settracks)
+ [GetTracks](#gettracks)
+ [GetMute](#getmute)
+ [SetMute](#setmute)
+ [ToggleMute](#togglemute)
+ [GetSourceActive](#getsourceactive)
+ [GetAudioActive](#getaudioactive)
+ [SetSourceName](#setsourcename)
+ [SetSyncOffset](#setsyncoffset)
@ -266,6 +273,11 @@ You can also refer to any of the client libraries listed on the [README](README.
+ [SetTransitionSettings](#settransitionsettings)
+ [ReleaseTBar](#releasetbar)
+ [SetTBarPosition](#settbarposition)
* [Virtual Cam](#virtual-cam-1)
+ [GetVirtualCamStatus](#getvirtualcamstatus)
+ [StartStopVirtualCam](#startstopvirtualcam)
+ [StartVirtualCam](#startvirtualcam)
+ [StopVirtualCam](#stopvirtualcam)
<!-- tocstop -->
@ -301,6 +313,7 @@ These are complex types, such as `Source` and `Scene`, which are used as argumen
| `rotation` | _double_ | The clockwise rotation of the scene item in degrees around the point of alignment. |
| `scale.x` | _double_ | The x-scale factor of the scene item. |
| `scale.y` | _double_ | The y-scale factor of the scene item. |
| `scale.filter` | _String_ | The scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA". |
| `crop.top` | _int_ | The number of pixels cropped off the top of the scene item before scaling. |
| `crop.right` | _int_ | The number of pixels cropped off the right of the scene item before scaling. |
| `crop.bottom` | _int_ | The number of pixels cropped off the bottom of the scene item before scaling. |
@ -343,7 +356,7 @@ These are complex types, such as `Source` and `Scene`, which are used as argumen
| `flags.encoded` | _boolean_ | Output is encoded |
| `flags.multiTrack` | _boolean_ | Output uses several audio tracks |
| `flags.service` | _boolean_ | Output uses a service |
| `settings` | _Object_ | Output name |
| `settings` | _Object_ | Output settings |
| `active` | _boolean_ | Output status (active or not) |
| `reconnecting` | _boolean_ | Output reconnection status (reconnecting or not) |
| `congestion` | _double_ | Output congestion |
@ -511,7 +524,7 @@ A transition (other than "cut") has begun.
| `name` | _String_ | Transition name. |
| `type` | _String_ | Transition type. |
| `duration` | _int_ | Transition duration (in milliseconds). Will be -1 for any transition with a fixed duration, such as a Stinger, due to limitations of the OBS API. |
| `from-scene` | _String_ | Source scene of the transition |
| `from-scene` | _String (optional)_ | Source scene of the transition |
| `to-scene` | _String_ | Destination scene of the transition |
@ -551,7 +564,7 @@ A stinger transition has finished playing its video.
| `name` | _String_ | Transition name. |
| `type` | _String_ | Transition type. |
| `duration` | _int_ | Transition duration (in milliseconds). |
| `from-scene` | _String_ | Source scene of the transition |
| `from-scene` | _String (optional)_ | Source scene of the transition |
| `to-scene` | _String_ | Destination scene of the transition |
@ -778,6 +791,34 @@ _No additional response items._
---
## Virtual Cam
### VirtualCamStarted
- Added in v4.9.1
Virtual cam started successfully.
**Response Items:**
_No additional response items._
---
### VirtualCamStopped
- Added in v4.9.1
Virtual cam stopped successfully.
**Response Items:**
_No additional response items._
---
## Replay Buffer
### ReplayStarting
@ -945,6 +986,7 @@ The volume of a source has changed.
| ---- | :---: | ------------|
| `sourceName` | _String_ | Source name |
| `volume` | _float_ | Source volume |
| `volumeDb` | _float_ | Source volume in Decibel |
---
@ -1777,6 +1819,26 @@ Executes a list of requests sequentially (one-by-one on the same thread).
| `results.*.error` | _String (Optional)_ | Error message accompanying an `error` status. |
---
### Sleep
- Added in v4.9.1
Waits for the specified duration. Designed to be used in `ExecuteBatch` operations.
**Request Fields:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `sleepMillis` | _int_ | Delay in milliseconds to wait before continuing. |
**Response Items:**
_No additional response items._
---
## Media Control
@ -1787,13 +1849,14 @@ Executes a list of requests sequentially (one-by-one on the same thread).
- Added in v4.9.0
Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
Note :Leaving out `playPause` toggles the current pause state
**Request Fields:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `sourceName` | _String_ | Source name. |
| `playPause` | _boolean_ | Whether to pause or play the source. `false` for play, `true` for pause. |
| `playPause` | _boolean_ | (optional) Whether to pause or play the source. `false` for play, `true` for pause. |
**Response Items:**
@ -2148,6 +2211,56 @@ Set the volume of the specified source. Default request format uses mul, NOT SLI
_No additional response items._
---
### SetTracks
- Added in v4.9.1
Changes whether an audio track is active for a source.
**Request Fields:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `sourceName` | _String_ | Source name. |
| `track` | _int_ | Audio tracks 1-6. |
| `active` | _boolean_ | Whether audio track is active or not. |
**Response Items:**
_No additional response items._
---
### GetTracks
- Added in v4.9.1
Gets whether an audio track is active for a source.
**Request Fields:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `sourceName` | _String_ | Source name. |
**Response Items:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `track1` | _boolean_ | |
| `track2` | _boolean_ | |
| `track3` | _boolean_ | |
| `track4` | _boolean_ | |
| `track5` | _boolean_ | |
| `track6` | _boolean_ | |
---
### GetMute
@ -2213,6 +2326,29 @@ Inverts the mute status of a specified source.
_No additional response items._
---
### GetSourceActive
- Added in v4.9.1
Get the source's active status of a specified source (if it is showing in the final mix).
**Request Fields:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `sourceName` | _String_ | Source name. |
**Response Items:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `sourceActive` | _boolean_ | Source active status of the source. |
---
### GetAudioActive
@ -3456,6 +3592,7 @@ Coordinates are relative to the item's parent (the scene or group it belongs to)
| `rotation` | _double_ | The clockwise rotation of the item in degrees around the point of alignment. |
| `scale.x` | _double_ | The x-scale factor of the source. |
| `scale.y` | _double_ | The y-scale factor of the source. |
| `scale.filter` | _String_ | The scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA". |
| `crop.top` | _int_ | The number of pixels cropped off the top of the source before scaling. |
| `crop.right` | _int_ | The number of pixels cropped off the right of the source before scaling. |
| `crop.bottom` | _int_ | The number of pixels cropped off the bottom of the source before scaling. |
@ -3499,6 +3636,7 @@ Coordinates are relative to the item's parent (the scene or group it belongs to)
| `rotation` | _double (optional)_ | The new clockwise rotation of the item in degrees. |
| `scale.x` | _double (optional)_ | The new x scale of the item. |
| `scale.y` | _double (optional)_ | The new y scale of the item. |
| `scale.filter` | _String (optional)_ | The new scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA". |
| `crop.top` | _int (optional)_ | The new amount of pixels cropped off the top of the source before scaling. |
| `crop.bottom` | _int (optional)_ | The new amount of pixels cropped off the bottom of the source before scaling. |
| `crop.left` | _int (optional)_ | The new amount of pixels cropped off the left of the source before scaling. |
@ -3674,7 +3812,7 @@ Creates a scene item in a scene. In other words, this is how you add a source in
| ---- | :---: | ------------|
| `sceneName` | _String_ | Name of the scene to create the scene item in |
| `sourceName` | _String_ | Name of the source to be added |
| `setVisible` | _boolean_ | Whether to make the sceneitem visible on creation or not. Default `true` |
| `setVisible` | _boolean (optional)_ | Whether to make the sceneitem visible on creation or not. Default `true` |
**Response Items:**
@ -3812,7 +3950,7 @@ Changes the order of scene items in the requested scene.
| Name | Type | Description |
| ---- | :---: | ------------|
| `scene` | _String (optional)_ | Name of the scene to reorder (defaults to current). |
| `items` | _Array&lt;Scene&gt;_ | Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene |
| `items` | _Array&lt;Object&gt;_ | Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene |
| `items.*.id` | _int (optional)_ | Id of a specific scene item. Unique on a scene by scene basis. |
| `items.*.name` | _String (optional)_ | Name of a scene item. Sufficiently unique if no scene items share sources within the scene. |
@ -3909,9 +4047,11 @@ _No specified parameters._
| `streaming` | _boolean_ | Current streaming status. |
| `recording` | _boolean_ | Current recording status. |
| `recording-paused` | _boolean_ | If recording is paused. |
| `virtualcam` | _boolean_ | Current virtual cam status. |
| `preview-only` | _boolean_ | Always false. Retrocompatibility with OBSRemote. |
| `stream-timecode` | _String (optional)_ | Time elapsed since streaming started (only present if currently streaming). |
| `rec-timecode` | _String (optional)_ | Time elapsed since recording started (only present if currently recording). |
| `virtualcam-timecode` | _String (optional)_ | Time elapsed since virtual cam started (only present if virtual cam currently active). |
---
@ -4422,3 +4562,79 @@ _No additional response items._
---
## Virtual Cam
### GetVirtualCamStatus
- Added in v4.9.1
Get current virtual cam status.
**Request Fields:**
_No specified parameters._
**Response Items:**
| Name | Type | Description |
| ---- | :---: | ------------|
| `isVirtualCam` | _boolean_ | Current virtual camera status. |
| `virtualCamTimecode` | _String (optional)_ | Time elapsed since virtual cam started (only present if virtual cam currently active). |
---
### StartStopVirtualCam
- Added in v4.9.1
Toggle virtual cam on or off (depending on the current virtual cam state).
**Request Fields:**
_No specified parameters._
**Response Items:**
_No additional response items._
---
### StartVirtualCam
- Added in v4.9.1
Start virtual cam.
Will return an `error` if virtual cam is already active.
**Request Fields:**
_No specified parameters._
**Response Items:**
_No additional response items._
---
### StopVirtualCam
- Added in v4.9.1
Stop virtual cam.
Will return an `error` if virtual cam is not active.
**Request Fields:**
_No specified parameters._
**Response Items:**
_No additional response items._
---

View File

@ -1,4 +1,4 @@
# obs-websocket 4.9.0 protocol reference
# obs-websocket 4.9.1 protocol reference
# General Introduction
Messages are exchanged between the client and the server as JSON objects.
@ -35,4 +35,4 @@ auth_response_hash = binary_sha256(auth_response_string)
auth_response = base64_encode(auth_response_hash)
```
You can also refer to any of the client libraries listed on the [README](README.md) for examples of how to authenticate.
You can also refer to any of the [client libraries](https://github.com/Palakis/obs-websocket#for-developers) listed on the README for examples of how to authenticate.

View File

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "obs-websocket"
#define MyAppVersion "4.9.0"
#define MyAppVersion "4.9.1"
#define MyAppPublisher "Stephane Lepin"
#define MyAppURL "http://github.com/Palakis/obs-websocket"

View File

@ -323,6 +323,10 @@ void Config::FirstRunPasswordSetup()
// check if the password is already set
auto config = GetConfig();
if (!config) {
return;
}
if (!(config->Secret.isEmpty()) && !(config->Salt.isEmpty())) {
return;
}

View File

@ -52,6 +52,24 @@ obs_bounds_type getBoundsTypeFromName(QString name) {
return boundTypeNames.key(name);
}
const QHash<obs_scale_type, QString> scaleTypeNames = {
{ OBS_SCALE_DISABLE, "OBS_SCALE_DISABLE" },
{ OBS_SCALE_POINT, "OBS_SCALE_POINT" },
{ OBS_SCALE_BICUBIC, "OBS_SCALE_BICUBIC" },
{ OBS_SCALE_BILINEAR, "OBS_SCALE_BILINEAR" },
{ OBS_SCALE_LANCZOS, "OBS_SCALE_LANCZOS" },
{ OBS_SCALE_AREA, "OBS_SCALE_AREA" },
};
QString getScaleNameFromType(obs_scale_type type) {
QString fallback = scaleTypeNames.value(OBS_SCALE_DISABLE);
return scaleTypeNames.value(type, fallback);
}
obs_scale_type getFilterTypeFromName(QString name) {
return scaleTypeNames.key(name);
}
bool Utils::StringInStringList(char** strings, const char* string) {
if (!strings) {
return false;
@ -509,9 +527,9 @@ QSystemTrayIcon* Utils::GetTrayIcon() {
return reinterpret_cast<QSystemTrayIcon*>(systemTray);
}
void Utils::SysTrayNotify(QString text,
QSystemTrayIcon::MessageIcon icon, QString title) {
if (!GetConfig()->AlertsEnabled ||
void Utils::SysTrayNotify(QString text, QSystemTrayIcon::MessageIcon icon, QString title) {
auto config = GetConfig();
if ((config && !config->AlertsEnabled) ||
!QSystemTrayIcon::isSystemTrayAvailable() ||
!QSystemTrayIcon::supportsMessages())
{
@ -730,6 +748,7 @@ const char* Utils::GetCurrentRecordingFilename()
* @property {double} `rotation` The clockwise rotation of the scene item in degrees around the point of alignment.
* @property {double} `scale.x` The x-scale factor of the scene item.
* @property {double} `scale.y` The y-scale factor of the scene item.
* @property {String} `scale.filter` The scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA".
* @property {int} `crop.top` The number of pixels cropped off the top of the scene item before scaling.
* @property {int} `crop.right` The number of pixels cropped off the right of the scene item before scaling.
* @property {int} `crop.bottom` The number of pixels cropped off the bottom of the scene item before scaling.
@ -773,12 +792,16 @@ obs_data_t* Utils::GetSceneItemPropertiesData(obs_sceneitem_t* sceneItem) {
uint32_t boundsAlignment = obs_sceneitem_get_bounds_alignment(sceneItem);
QString boundsTypeName = getBoundsNameFromType(boundsType);
obs_scale_type scaleFilter = obs_sceneitem_get_scale_filter(sceneItem);
QString scaleFilterName = getScaleNameFromType(scaleFilter);
OBSDataAutoRelease posData = obs_data_create();
obs_data_set_double(posData, "x", pos.x);
obs_data_set_double(posData, "y", pos.y);
obs_data_set_int(posData, "alignment", alignment);
OBSDataAutoRelease scaleData = obs_data_create();
obs_data_set_string(scaleData, "filter", scaleFilterName.toUtf8());
obs_data_set_double(scaleData, "x", scale.x);
obs_data_set_double(scaleData, "y", scale.y);

View File

@ -202,6 +202,14 @@ void WSEvents::FrontendEventHandler(enum obs_frontend_event event, void* private
owner->OnRecordingResumed();
break;
case OBS_FRONTEND_EVENT_VIRTUALCAM_STARTED:
owner->OnVirtualCamStarted();
break;
case OBS_FRONTEND_EVENT_VIRTUALCAM_STOPPED:
owner->OnVirtualCamStopped();
break;
case OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTING:
owner->OnReplayStarting();
break;
@ -241,6 +249,9 @@ void WSEvents::FrontendEventHandler(enum obs_frontend_event event, void* private
void WSEvents::broadcastUpdate(const char* updateType,
obs_data_t* additionalFields = nullptr)
{
if (!_srv->isListening()) {
return;
}
std::optional<uint64_t> streamTime;
if (obs_frontend_streaming_active()) {
streamTime = std::make_optional(getStreamingTime());
@ -422,6 +433,11 @@ uint64_t WSEvents::getRecordingTime() {
return getOutputRunningTime(recordingOutput);
}
uint64_t WSEvents::getVirtualCamTime() {
OBSOutputAutoRelease virtualCamOutput = obs_frontend_get_virtualcam_output();
return getOutputRunningTime(virtualCamOutput);
}
QString WSEvents::getStreamingTimecode() {
return Utils::nsToTimestamp(getStreamingTime());
}
@ -430,6 +446,10 @@ QString WSEvents::getRecordingTimecode() {
return Utils::nsToTimestamp(getRecordingTime());
}
QString WSEvents::getVirtualCamTimecode() {
return Utils::nsToTimestamp(getVirtualCamTime());
}
OBSDataAutoRelease getMediaSourceData(calldata_t* data) {
OBSDataAutoRelease fields = obs_data_create();
OBSSource source = calldata_get_pointer<obs_source_t>(data, "source");
@ -764,6 +784,30 @@ void WSEvents::OnRecordingResumed() {
broadcastUpdate("RecordingResumed");
}
/**
* Virtual cam started successfully.
*
* @api events
* @name VirtualCamStarted
* @category virtual cam
* @since 4.9.1
*/
void WSEvents::OnVirtualCamStarted() {
broadcastUpdate("VirtualCamStarted");
}
/**
* Virtual cam stopped successfully.
*
* @api events
* @name VirtualCamStopped
* @category virtual cam
* @since 4.9.1
*/
void WSEvents::OnVirtualCamStopped() {
broadcastUpdate("VirtualCamStopped");
}
/**
* A request to start the replay buffer has been issued.
*
@ -1002,7 +1046,7 @@ void WSEvents::TransitionDurationChanged(int ms) {
* @return {int} `duration` Transition duration (in milliseconds).
* Will be -1 for any transition with a fixed duration,
* such as a Stinger, due to limitations of the OBS API.
* @return {String} `from-scene` Source scene of the transition
* @return {String (optional)} `from-scene` Source scene of the transition
* @return {String} `to-scene` Destination scene of the transition
*
* @api events
@ -1054,7 +1098,7 @@ void WSEvents::OnTransitionEnd(void* param, calldata_t* data) {
* @return {String} `name` Transition name.
* @return {String} `type` Transition type.
* @return {int} `duration` Transition duration (in milliseconds).
* @return {String} `from-scene` Source scene of the transition
* @return {String (optional)} `from-scene` Source scene of the transition
* @return {String} `to-scene` Destination scene of the transition
*
* @api events
@ -1145,6 +1189,7 @@ void WSEvents::OnSourceDestroy(void* param, calldata_t* data) {
*
* @return {String} `sourceName` Source name
* @return {float} `volume` Source volume
* @return {float} `volumeDb` Source volume in Decibel
*
* @api events
* @name SourceVolumeChanged
@ -1164,9 +1209,15 @@ void WSEvents::OnSourceVolumeChange(void* param, calldata_t* data) {
return;
}
double volumeDb = obs_mul_to_db(volume);
if (volumeDb == -INFINITY) {
volumeDb = -100.0;
}
OBSDataAutoRelease fields = obs_data_create();
obs_data_set_string(fields, "sourceName", obs_source_get_name(source));
obs_data_set_double(fields, "volume", volume);
obs_data_set_double(fields, "volumeDb", volumeDb);
self->broadcastUpdate("SourceVolumeChanged", fields);
}

View File

@ -48,9 +48,11 @@ public:
uint64_t getStreamingTime();
uint64_t getRecordingTime();
uint64_t getVirtualCamTime();
QString getStreamingTimecode();
QString getRecordingTimecode();
QString getVirtualCamTimecode();
obs_data_t* GetStats();
@ -102,6 +104,9 @@ private:
void OnRecordingPaused();
void OnRecordingResumed();
void OnVirtualCamStarted();
void OnVirtualCamStopped();
void OnReplayStarting();
void OnReplayStarted();
void OnReplayStopping();

View File

@ -43,6 +43,7 @@ const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap{
{ "TriggerHotkeyByName", &WSRequestHandler::TriggerHotkeyByName },
{ "TriggerHotkeyBySequence", &WSRequestHandler::TriggerHotkeyBySequence },
{ "ExecuteBatch", &WSRequestHandler::ExecuteBatch },
{ "Sleep", &WSRequestHandler::Sleep },
// Category: Media Control
{ "PlayPauseMedia", &WSRequestHandler::PlayPauseMedia },
@ -120,9 +121,12 @@ const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap{
{ "GetSourceTypesList", &WSRequestHandler::GetSourceTypesList },
{ "GetVolume", &WSRequestHandler::GetVolume },
{ "SetVolume", &WSRequestHandler::SetVolume },
{ "SetAudioTracks", &WSRequestHandler::SetAudioTracks },
{ "GetAudioTracks", &WSRequestHandler::GetAudioTracks },
{ "GetMute", &WSRequestHandler::GetMute },
{ "SetMute", &WSRequestHandler::SetMute },
{ "ToggleMute", &WSRequestHandler::ToggleMute },
{ "GetSourceActive", &WSRequestHandler::GetSourceActive },
{ "GetAudioActive", &WSRequestHandler::GetAudioActive },
{ "SetSourceName", &WSRequestHandler::SetSourceName },
{ "SetSyncOffset", &WSRequestHandler::SetSyncOffset },
@ -160,6 +164,12 @@ const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap{
{ "SaveStreamSettings", &WSRequestHandler::SaveStreamSettings },
{ "SendCaptions", &WSRequestHandler::SendCaptions },
// Category: VirtualCam
{ "GetVirtualCamStatus", &WSRequestHandler::GetVirtualCamStatus },
{ "StartStopVirtualCam", &WSRequestHandler::StartStopVirtualCam },
{ "StartVirtualCam", &WSRequestHandler::StartVirtualCam },
{ "StopVirtualCam", &WSRequestHandler::StopVirtualCam },
// Category: Studio Mode
{ "GetStudioModeStatus", &WSRequestHandler::GetStudioModeStatus },
{ "GetPreviewScene", &WSRequestHandler::GetPreviewScene },
@ -194,7 +204,8 @@ WSRequestHandler::WSRequestHandler(ConnectionProperties& connProperties) :
}
RpcResponse WSRequestHandler::processRequest(const RpcRequest& request) {
if (GetConfig()->AuthRequired
auto config = GetConfig();
if ((config && config->AuthRequired)
&& (!authNotRequired.contains(request.methodName()))
&& (!_connProperties.isAuthenticated()))
{

View File

@ -61,6 +61,7 @@ class WSRequestHandler {
RpcResponse TriggerHotkeyByName(const RpcRequest&);
RpcResponse TriggerHotkeyBySequence(const RpcRequest&);
RpcResponse ExecuteBatch(const RpcRequest&);
RpcResponse Sleep(const RpcRequest&);
// Category: Media Control
RpcResponse PlayPauseMedia(const RpcRequest&);
@ -137,9 +138,12 @@ class WSRequestHandler {
RpcResponse GetSourceTypesList(const RpcRequest&);
RpcResponse GetVolume(const RpcRequest&);
RpcResponse SetVolume(const RpcRequest&);
RpcResponse SetAudioTracks(const RpcRequest&);
RpcResponse GetAudioTracks(const RpcRequest&);
RpcResponse GetMute(const RpcRequest&);
RpcResponse SetMute(const RpcRequest&);
RpcResponse ToggleMute(const RpcRequest&);
RpcResponse GetSourceActive(const RpcRequest&);
RpcResponse GetAudioActive(const RpcRequest&);
RpcResponse SetSourceName(const RpcRequest&);
RpcResponse SetSyncOffset(const RpcRequest&);
@ -177,6 +181,12 @@ class WSRequestHandler {
RpcResponse SaveStreamSettings(const RpcRequest&);
RpcResponse SendCaptions(const RpcRequest&);
// Category: Virtual Cam
RpcResponse GetVirtualCamStatus(const RpcRequest&);
RpcResponse StartStopVirtualCam(const RpcRequest&);
RpcResponse StartVirtualCam(const RpcRequest&);
RpcResponse StopVirtualCam(const RpcRequest&);
// Category: Studio Mode
RpcResponse GetStudioModeStatus(const RpcRequest&);
RpcResponse GetPreviewScene(const RpcRequest&);

View File

@ -115,13 +115,13 @@ RpcResponse WSRequestHandler::GetVersion(const RpcRequest& request) {
* @since 0.3
*/
RpcResponse WSRequestHandler::GetAuthRequired(const RpcRequest& request) {
bool authRequired = GetConfig()->AuthRequired;
auto config = GetConfig();
bool authRequired = (config && config->AuthRequired);
OBSDataAutoRelease data = obs_data_create();
obs_data_set_bool(data, "authRequired", authRequired);
if (authRequired) {
auto config = GetConfig();
obs_data_set_string(data, "challenge",
config->SessionChallenge.toUtf8());
obs_data_set_string(data, "salt",
@ -155,7 +155,8 @@ RpcResponse WSRequestHandler::Authenticate(const RpcRequest& request) {
return request.failed("auth not specified!");
}
if (GetConfig()->CheckAuth(auth) == false) {
auto config = GetConfig();
if (!config || (config->CheckAuth(auth) == false)) {
return request.failed("Authentication Failed.");
}
@ -473,3 +474,24 @@ RpcResponse WSRequestHandler::ExecuteBatch(const RpcRequest& request) {
obs_data_set_array(response, "results", results);
return request.success(response);
}
/**
* Waits for the specified duration. Designed to be used in `ExecuteBatch` operations.
*
* @param {int} `sleepMillis` Delay in milliseconds to wait before continuing.
*
* @api requests
* @name Sleep
* @category general
* @since 4.9.1
*/
RpcResponse WSRequestHandler::Sleep(const RpcRequest& request) {
if (!request.hasField("sleepMillis")) {
return request.failed("missing request parameters");
}
long long sleepMillis = obs_data_get_int(request.parameters(), "sleepMillis");
std::this_thread::sleep_for(std::chrono::milliseconds(sleepMillis));
return request.success();
}

View File

@ -44,9 +44,10 @@ QString getSourceMediaState(obs_source_t *source)
/**
* Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8)
* Note :Leaving out `playPause` toggles the current pause state
*
* @param {String} `sourceName` Source name.
* @param {boolean} `playPause` Whether to pause or play the source. `false` for play, `true` for pause.
* @param {boolean} `playPause` (optional) Whether to pause or play the source. `false` for play, `true` for pause.
*
* @api requests
* @name PlayPauseMedia
@ -54,7 +55,7 @@ QString getSourceMediaState(obs_source_t *source)
* @since 4.9.0
*/
RpcResponse WSRequestHandler::PlayPauseMedia(const RpcRequest& request) {
if ((!request.hasField("sourceName")) || (!request.hasField("playPause"))) {
if (!request.hasField("sourceName")) {
return request.failed("missing request parameters");
}
@ -68,8 +69,16 @@ RpcResponse WSRequestHandler::PlayPauseMedia(const RpcRequest& request) {
if (!source) {
return request.failed("specified source doesn't exist");
}
obs_source_media_play_pause(source, playPause);
if (!request.hasField("playPause")) {
if (obs_source_media_get_state(source) == obs_media_state::OBS_MEDIA_STATE_PLAYING) {
obs_source_media_play_pause(source, true);
} else {
obs_source_media_play_pause(source, false);
}
} else {
bool playPause = obs_data_get_bool(request.parameters(), "playPause");
obs_source_media_play_pause(source, playPause);
}
return request.success();
}

View File

@ -15,7 +15,7 @@
* @property {boolean} `flags.encoded` Output is encoded
* @property {boolean} `flags.multiTrack` Output uses several audio tracks
* @property {boolean} `flags.service` Output uses a service
* @property {Object} `settings` Output name
* @property {Object} `settings` Output settings
* @property {boolean} `active` Output status (active or not)
* @property {boolean} `reconnecting` Output reconnection status (reconnecting or not)
* @property {double} `congestion` Output congestion

View File

@ -91,6 +91,7 @@ RpcResponse WSRequestHandler::GetSceneItemList(const RpcRequest& request) {
* @return {double} `rotation` The clockwise rotation of the item in degrees around the point of alignment.
* @return {double} `scale.x` The x-scale factor of the source.
* @return {double} `scale.y` The y-scale factor of the source.
* @return {String} `scale.filter` The scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA".
* @return {int} `crop.top` The number of pixels cropped off the top of the source before scaling.
* @return {int} `crop.right` The number of pixels cropped off the right of the source before scaling.
* @return {int} `crop.bottom` The number of pixels cropped off the bottom of the source before scaling.
@ -156,6 +157,7 @@ RpcResponse WSRequestHandler::GetSceneItemProperties(const RpcRequest& request)
* @param {double (optional)} `rotation` The new clockwise rotation of the item in degrees.
* @param {double (optional)} `scale.x` The new x scale of the item.
* @param {double (optional)} `scale.y` The new y scale of the item.
* @param {String (optional)} `scale.filter` The new scale filter of the source. Can be "OBS_SCALE_DISABLE", "OBS_SCALE_POINT", "OBS_SCALE_BICUBIC", "OBS_SCALE_BILINEAR", "OBS_SCALE_LANCZOS" or "OBS_SCALE_AREA".
* @param {int (optional)} `crop.top` The new amount of pixels cropped off the top of the source before scaling.
* @param {int (optional)} `crop.bottom` The new amount of pixels cropped off the bottom of the source before scaling.
* @param {int (optional)} `crop.left` The new amount of pixels cropped off the left of the source before scaling.
@ -230,12 +232,34 @@ RpcResponse WSRequestHandler::SetSceneItemProperties(const RpcRequest& request)
}
if (request.hasField("scale")) {
OBSDataAutoRelease reqScale = obs_data_get_obj(params, "scale");
if (obs_data_has_user_value(reqScale, "filter")) {
QString newScaleFilter = obs_data_get_string(reqScale, "filter");
if (newScaleFilter == "OBS_SCALE_DISABLE") {
obs_sceneitem_set_scale_filter(sceneItem, OBS_SCALE_DISABLE);
}
else if (newScaleFilter == "OBS_SCALE_POINT") {
obs_sceneitem_set_scale_filter(sceneItem, OBS_SCALE_POINT);
}
else if (newScaleFilter == "OBS_SCALE_BICUBIC") {
obs_sceneitem_set_scale_filter(sceneItem, OBS_SCALE_BICUBIC);
}
else if (newScaleFilter == "OBS_SCALE_BILINEAR") {
obs_sceneitem_set_scale_filter(sceneItem, OBS_SCALE_BICUBIC);
}
else if (newScaleFilter == "OBS_SCALE_LANCZOS") {
obs_sceneitem_set_scale_filter(sceneItem, OBS_SCALE_LANCZOS);
}
else if (newScaleFilter == "OBS_SCALE_AREA") {
obs_sceneitem_set_scale_filter(sceneItem, OBS_SCALE_AREA);
}
}
vec2 oldScale;
obs_sceneitem_get_scale(sceneItem, &oldScale);
vec2 newScale = oldScale;
OBSDataAutoRelease reqScale = obs_data_get_obj(params, "scale");
if (obs_data_has_user_value(reqScale, "x")) {
newScale.x = obs_data_get_double(reqScale, "x");
}
@ -628,7 +652,7 @@ RpcResponse WSRequestHandler::DeleteSceneItem(const RpcRequest& request) {
*
* @param {String} `sceneName` Name of the scene to create the scene item in
* @param {String} `sourceName` Name of the source to be added
* @param {boolean} `setVisible` Whether to make the sceneitem visible on creation or not. Default `true`
* @param {boolean (optional)} `setVisible` Whether to make the sceneitem visible on creation or not. Default `true`
*
* @return {int} `itemId` Numerical ID of the created scene item
*

View File

@ -100,7 +100,8 @@ RpcResponse WSRequestHandler::CreateScene(const RpcRequest& request) {
if (source) {
return request.failed("scene with this name already exists");
}
obs_scene_create(sceneName);
obs_scene_t *createdScene = obs_scene_create(sceneName);
obs_scene_release(createdScene);
return request.success();
}
@ -108,7 +109,7 @@ RpcResponse WSRequestHandler::CreateScene(const RpcRequest& request) {
* Changes the order of scene items in the requested scene.
*
* @param {String (optional)} `scene` Name of the scene to reorder (defaults to current).
* @param {Array<Scene>} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene
* @param {Array<Object>} `items` Ordered list of objects with name and/or id specified. Id preferred due to uniqueness per scene
* @param {int (optional)} `items.*.id` Id of a specific scene item. Unique on a scene by scene basis.
* @param {String (optional)} `items.*.name` Name of a scene item. Sufficiently unique if no scene items share sources within the scene.
*
@ -203,7 +204,8 @@ RpcResponse WSRequestHandler::SetSceneTransitionOverride(const RpcRequest& reque
}
QString transitionName = obs_data_get_string(request.parameters(), "transitionName");
if (!Utils::GetTransitionFromName(transitionName)) {
OBSSourceAutoRelease transition = Utils::GetTransitionFromName(transitionName);
if (!transition) {
return request.failed("requested transition does not exist");
}

View File

@ -315,6 +315,96 @@ RpcResponse WSRequestHandler::SetVolume(const RpcRequest& request)
return request.success();
}
/**
* Changes whether an audio track is active for a source.
*
* @param {String} `sourceName` Source name.
* @param {int} `track` Audio tracks 1-6.
* @param {boolean} `active` Whether audio track is active or not.
*
* @api requests
* @name SetTracks
* @category sources
* @since 4.9.1
*/
RpcResponse WSRequestHandler::SetAudioTracks(const RpcRequest& request)
{
if (!request.hasField("sourceName") || !request.hasField("track") || !request.hasField("active")) {
return request.failed("missing request parameters");
}
QString sourceName = obs_data_get_string(request.parameters(), "sourceName");
bool active = obs_data_get_bool(request.parameters(), "active");
int track = obs_data_get_int(request.parameters(), "track")-1;
if (sourceName.isEmpty() || track > 5 || track < 0) {
return request.failed("invalid request parameters");
}
OBSSourceAutoRelease source = obs_get_source_by_name(sourceName.toUtf8());
if (!source) {
return request.failed("specified source doesn't exist");
}
uint32_t mixers = obs_source_get_audio_mixers(source);
if (active && !(mixers & (1 << track)))
mixers |= (1 << track);
else if (mixers & (1 << track))
mixers &= ~(1 << track);
obs_source_set_audio_mixers(source, mixers);
return request.success();
}
/**
* Gets whether an audio track is active for a source.
*
* @param {String} `sourceName` Source name.
*
* @return {boolean} `track1`
* @return {boolean} `track2`
* @return {boolean} `track3`
* @return {boolean} `track4`
* @return {boolean} `track5`
* @return {boolean} `track6`
*
* @api requests
* @name GetTracks
* @category sources
* @since 4.9.1
*/
RpcResponse WSRequestHandler::GetAudioTracks(const RpcRequest& request)
{
if (!request.hasField("sourceName")) {
return request.failed("missing request parameters");
}
QString sourceName = obs_data_get_string(request.parameters(), "sourceName");
if (sourceName.isEmpty()) {
return request.failed("invalid request parameters");
}
OBSSourceAutoRelease source = obs_get_source_by_name(sourceName.toUtf8());
if (!source) {
return request.failed("specified source doesn't exist");
}
uint32_t mixers = obs_source_get_audio_mixers(source);
OBSDataAutoRelease response = obs_data_create();
obs_data_set_string(response, "name", obs_source_get_name(source));
obs_data_set_bool(response, "track1", mixers & (1 << 0));
obs_data_set_bool(response, "track2", mixers & (1 << 1));
obs_data_set_bool(response, "track3", mixers & (1 << 2));
obs_data_set_bool(response, "track4", mixers & (1 << 3));
obs_data_set_bool(response, "track5", mixers & (1 << 4));
obs_data_set_bool(response, "track6", mixers & (1 << 5));
return request.success(response);
}
/**
* Get the mute status of a specified source.
*
@ -414,6 +504,40 @@ RpcResponse WSRequestHandler::ToggleMute(const RpcRequest& request)
return request.success();
}
/**
* Get the source's active status of a specified source (if it is showing in the final mix).
*
* @param {String} `sourceName` Source name.
*
* @return {boolean} `sourceActive` Source active status of the source.
*
* @api requests
* @name GetSourceActive
* @category sources
* @since 4.9.1
*/
RpcResponse WSRequestHandler::GetSourceActive(const RpcRequest& request)
{
if (!request.hasField("sourceName")) {
return request.failed("missing request parameters");
}
QString sourceName = obs_data_get_string(request.parameters(), "sourceName");
if (sourceName.isEmpty()) {
return request.failed("invalid request parameters");
}
OBSSourceAutoRelease source = obs_get_source_by_name(sourceName.toUtf8());
if (!source) {
return request.failed("specified source doesn't exist");
}
OBSDataAutoRelease response = obs_data_create();
obs_data_set_bool(response, "sourceActive", obs_source_active(source));
return request.success(response);
}
/**
* Get the audio's active status of a specified source.
*

View File

@ -12,9 +12,11 @@
* @return {boolean} `streaming` Current streaming status.
* @return {boolean} `recording` Current recording status.
* @return {boolean} `recording-paused` If recording is paused.
* @return {boolean} `virtualcam` Current virtual cam status.
* @return {boolean} `preview-only` Always false. Retrocompatibility with OBSRemote.
* @return {String (optional)} `stream-timecode` Time elapsed since streaming started (only present if currently streaming).
* @return {String (optional)} `rec-timecode` Time elapsed since recording started (only present if currently recording).
* @return {String (optional)} `virtualcam-timecode` Time elapsed since virtual cam started (only present if virtual cam currently active).
*
* @api requests
* @name GetStreamingStatus
@ -28,6 +30,7 @@ RpcResponse WSRequestHandler::GetStreamingStatus(const RpcRequest& request) {
obs_data_set_bool(data, "streaming", obs_frontend_streaming_active());
obs_data_set_bool(data, "recording", obs_frontend_recording_active());
obs_data_set_bool(data, "recording-paused", obs_frontend_recording_paused());
obs_data_set_bool(data, "virtualcam", obs_frontend_virtualcam_active());
obs_data_set_bool(data, "preview-only", false);
if (obs_frontend_streaming_active()) {
@ -40,6 +43,11 @@ RpcResponse WSRequestHandler::GetStreamingStatus(const RpcRequest& request) {
obs_data_set_string(data, "rec-timecode", recordingTimecode.toUtf8().constData());
}
if (obs_frontend_virtualcam_active()) {
QString virtualCamTimecode = events->getVirtualCamTimecode();
obs_data_set_string(data, "virtualcam-timecode", virtualCamTimecode.toUtf8().constData());
}
return request.success(data);
}

View File

@ -219,7 +219,8 @@ RpcResponse WSRequestHandler::ReleaseTBar(const RpcRequest& request) {
return request.failed("studio mode not enabled");
}
if (obs_transition_fixed(obs_frontend_get_current_transition())) {
OBSSourceAutoRelease transition = obs_frontend_get_current_transition();
if (obs_transition_fixed(transition)) {
return request.failed("current transition doesn't support t-bar control");
}
@ -247,7 +248,8 @@ RpcResponse WSRequestHandler::SetTBarPosition(const RpcRequest& request) {
return request.failed("studio mode not enabled");
}
if (obs_transition_fixed(obs_frontend_get_current_transition())) {
OBSSourceAutoRelease transition = obs_frontend_get_current_transition();
if (obs_transition_fixed(transition)) {
return request.failed("current transition doesn't support t-bar control");
}

View File

@ -0,0 +1,79 @@
#include "obs-websocket.h"
#include "Utils.h"
#include "WSEvents.h"
#include "WSRequestHandler.h"
/**
* Get current virtual cam status.
*
* @return {boolean} `isVirtualCam` Current virtual camera status.
* @return {String (optional)} `virtualCamTimecode` Time elapsed since virtual cam started (only present if virtual cam currently active).
*
* @api requests
* @name GetVirtualCamStatus
* @category virtual cam
* @since 4.9.1
*/
RpcResponse WSRequestHandler::GetVirtualCamStatus(const RpcRequest& request) {
auto events = GetEventsSystem();
OBSDataAutoRelease data = obs_data_create();
obs_data_set_bool(data, "isVirtualCam", obs_frontend_virtualcam_active());
if (obs_frontend_virtualcam_active()) {
QString virtualCamTimecode = events->getVirtualCamTimecode();
obs_data_set_string(data, "virtualCamTimecode", virtualCamTimecode.toUtf8().constData());
}
return request.success(data);
}
/**
* Toggle virtual cam on or off (depending on the current virtual cam state).
*
* @api requests
* @name StartStopVirtualCam
* @category virtual cam
* @since 4.9.1
*/
RpcResponse WSRequestHandler::StartStopVirtualCam(const RpcRequest& request) {
(obs_frontend_virtualcam_active() ? obs_frontend_stop_virtualcam() : obs_frontend_start_virtualcam());
return request.success();
}
/**
* Start virtual cam.
* Will return an `error` if virtual cam is already active.
*
* @api requests
* @name StartVirtualCam
* @category virtual cam
* @since 4.9.1
*/
RpcResponse WSRequestHandler::StartVirtualCam(const RpcRequest& request) {
if (obs_frontend_virtualcam_active()) {
return request.failed("virtual cam already active");
}
obs_frontend_start_virtualcam();
return request.success();
}
/**
* Stop virtual cam.
* Will return an `error` if virtual cam is not active.
*
* @api requests
* @name StopVirtualCam
* @category virtual cam
* @since 4.9.1
*/
RpcResponse WSRequestHandler::StopVirtualCam(const RpcRequest& request) {
if (!obs_frontend_virtualcam_active()) {
return request.failed("virtual cam not active");
}
obs_frontend_stop_virtualcam();
return request.success();
}

View File

@ -60,6 +60,21 @@ WSServer::~WSServer()
stop();
}
void WSServer::serverRunner()
{
blog(LOG_INFO, "IO thread started.");
try {
_server.run();
} catch (websocketpp::exception const & e) {
blog(LOG_ERROR, "websocketpp instance returned an error: %s", e.what());
} catch (const std::exception & e) {
blog(LOG_ERROR, "websocketpp instance returned an error: %s", e.what());
} catch (...) {
blog(LOG_ERROR, "websocketpp instance returned an error");
}
blog(LOG_INFO, "IO thread exited.");
}
void WSServer::start(quint16 port, bool lockToIPv4)
{
if (_server.is_listening() && (port == _serverPort && _lockToIPv4 == lockToIPv4)) {
@ -102,11 +117,7 @@ void WSServer::start(quint16 port, bool lockToIPv4)
_server.start_accept();
QtConcurrent::run([=]() {
blog(LOG_INFO, "io thread started");
_server.run();
blog(LOG_INFO, "io thread exited");
});
_serverThread = std::thread(&WSServer::serverRunner, this);
blog(LOG_INFO, "server started successfully on port %d", _serverPort);
}
@ -119,7 +130,18 @@ void WSServer::stop()
_server.stop_listening();
for (connection_hdl hdl : _connections) {
_server.close(hdl, websocketpp::close::status::going_away, "Server stopping");
websocketpp::lib::error_code errorCode;
_server.pause_reading(hdl, errorCode);
if (errorCode) {
blog(LOG_ERROR, "Error: %s", errorCode.message().c_str());
continue;
}
_server.close(hdl, websocketpp::close::status::going_away, "Server stopping", errorCode);
if (errorCode) {
blog(LOG_ERROR, "Error: %s", errorCode.message().c_str());
continue;
}
}
_threadPool.waitForDone();
@ -128,6 +150,8 @@ void WSServer::stop()
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
_serverThread.join();
blog(LOG_INFO, "server stopped successfully");
}
@ -135,13 +159,14 @@ void WSServer::broadcast(const RpcEvent& event)
{
std::string message = OBSRemoteProtocol::encodeEvent(event);
if (GetConfig()->DebugEnabled) {
auto config = GetConfig();
if (config && config->DebugEnabled) {
blog(LOG_INFO, "Update << '%s'", message.c_str());
}
QMutexLocker locker(&_clMutex);
for (connection_hdl hdl : _connections) {
if (GetConfig()->AuthRequired) {
if (config && config->AuthRequired) {
bool authenticated = _connectionProperties[hdl].isAuthenticated();
if (!authenticated) {
continue;
@ -159,6 +184,11 @@ void WSServer::broadcast(const RpcEvent& event)
}
}
bool WSServer::isListening()
{
return _server.is_listening();
}
void WSServer::onOpen(connection_hdl hdl)
{
QMutexLocker locker(&_clMutex);
@ -184,14 +214,15 @@ void WSServer::onMessage(connection_hdl hdl, server::message_ptr message)
ConnectionProperties& connProperties = _connectionProperties[hdl];
locker.unlock();
if (GetConfig()->DebugEnabled) {
auto config = GetConfig();
if (config && config->DebugEnabled) {
blog(LOG_INFO, "Request >> '%s'", payload.c_str());
}
WSRequestHandler requestHandler(connProperties);
std::string response = OBSRemoteProtocol::processMessage(requestHandler, payload);
if (GetConfig()->DebugEnabled) {
if (config && config->DebugEnabled) {
blog(LOG_INFO, "Response << '%s'", response.c_str());
}
@ -215,11 +246,12 @@ void WSServer::onClose(connection_hdl hdl)
auto conn = _server.get_con_from_hdl(hdl);
auto localCloseCode = conn->get_local_close_code();
auto localCloseReason = conn->get_local_close_reason();
QString clientIp = getRemoteEndpoint(hdl);
if (localCloseCode != websocketpp::close::status::going_away) {
QString clientIp = getRemoteEndpoint(hdl);
blog(LOG_INFO, "Websocket connection with client '%s' closed (disconnected). Code is %d, reason is: '%s'", clientIp.toUtf8().constData(), localCloseCode, localCloseReason.c_str());
if (localCloseCode != websocketpp::close::status::going_away && _server.is_listening()) {
notifyDisconnection(clientIp);
blog(LOG_INFO, "client %s disconnected", clientIp.toUtf8().constData());
}
}

View File

@ -47,11 +47,14 @@ public:
void start(quint16 port, bool lockToIPv4);
void stop();
void broadcast(const RpcEvent& event);
bool isListening();
QThreadPool* threadPool() {
return &_threadPool;
}
private:
void serverRunner();
void onOpen(connection_hdl hdl);
void onMessage(connection_hdl hdl, server::message_ptr message);
void onClose(connection_hdl hdl);
@ -60,6 +63,7 @@ private:
void notifyConnection(QString clientIp);
void notifyDisconnection(QString clientIp);
std::thread _serverThread;
server _server;
quint16 _serverPort;
bool _lockToIPv4;

View File

@ -43,17 +43,18 @@ SettingsDialog::SettingsDialog(QWidget* parent) :
void SettingsDialog::showEvent(QShowEvent* event) {
auto conf = GetConfig();
if (conf) {
ui->serverEnabled->setChecked(conf->ServerEnabled);
ui->serverPort->setValue(conf->ServerPort);
ui->lockToIPv4->setChecked(conf->LockToIPv4);
ui->serverEnabled->setChecked(conf->ServerEnabled);
ui->serverPort->setValue(conf->ServerPort);
ui->lockToIPv4->setChecked(conf->LockToIPv4);
ui->debugEnabled->setChecked(conf->DebugEnabled);
ui->alertsEnabled->setChecked(conf->AlertsEnabled);
ui->debugEnabled->setChecked(conf->DebugEnabled);
ui->alertsEnabled->setChecked(conf->AlertsEnabled);
ui->authRequired->blockSignals(true);
ui->authRequired->setChecked(conf->AuthRequired);
ui->authRequired->blockSignals(false);
ui->authRequired->blockSignals(true);
ui->authRequired->setChecked(conf->AuthRequired);
ui->authRequired->blockSignals(false);
}
ui->password->setText(CHANGE_ME);
ui->password->setEnabled(ui->authRequired->isChecked());
@ -94,6 +95,9 @@ void SettingsDialog::AuthCheckboxChanged() {
void SettingsDialog::FormAccepted() {
auto conf = GetConfig();
if (!conf) {
return;
}
conf->ServerEnabled = ui->serverEnabled->isChecked();
conf->ServerPort = ui->serverPort->value();
@ -107,7 +111,7 @@ void SettingsDialog::FormAccepted() {
conf->SetPassword(ui->password->text());
}
if (!GetConfig()->Secret.isEmpty())
if (!conf->Secret.isEmpty())
conf->AuthRequired = true;
else
conf->AuthRequired = false;

View File

@ -57,6 +57,6 @@ WSServerPtr GetServer();
WSEventsPtr GetEventsSystem();
void ShowPasswordSetting();
#define OBS_WEBSOCKET_VERSION "4.9.0"
#define OBS_WEBSOCKET_VERSION "4.9.1"
#define blog(level, msg, ...) blog(level, "[obs-websocket] " msg, ##__VA_ARGS__)