mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
4e6d4ac437 | |||
3b197651cc | |||
c675f1c20c | |||
e87955d59a | |||
c718d8d803 | |||
454a68d1b7 | |||
45f6f74cbe | |||
cb7412a457 | |||
a9fc82365c | |||
edc0fed9e2 | |||
1c718963ea | |||
cd40ccdb9d | |||
80e1dc2446 | |||
d03c4cc4b9 | |||
7bd434e755 | |||
640bcb90c6 | |||
08e86a1378 | |||
fefcc3937a | |||
25210dfa52 | |||
56fbb7b9cf | |||
c55d33b956 | |||
0c5bce101e | |||
0a50e2a95c | |||
5ad940924b | |||
6eb49930bf | |||
3a0d5fb190 | |||
8c2eee2e25 | |||
2e19c5f08a | |||
548b53437f | |||
e1ca9a8029 | |||
389ef2aea9 | |||
357691bad5 | |||
beadb56b05 | |||
745fb5ea29 | |||
58434cac3b | |||
c34dff17ff |
@ -35,7 +35,9 @@ matrix:
|
||||
- os: osx
|
||||
env: _macos_build
|
||||
osx_image: xcode8.3
|
||||
before_install: "./CI/install-dependencies-macos.sh"
|
||||
before_install:
|
||||
- "./CI/install-dependencies-macos.sh"
|
||||
- "./CI/install-build-obs-macos.sh"
|
||||
script: "./CI/build-macos.sh"
|
||||
after_success:
|
||||
- ./CI/package-macos.sh
|
||||
|
21
BUILDING.md
21
BUILDING.md
@ -1,6 +1,9 @@
|
||||
# Compiling obs-websocket
|
||||
## Prerequisites
|
||||
You'll need [QT 5.9.0](https://download.qt.io/official_releases/qt/5.7/5.7.0/), CMake, and a working development environment for OBS Studio installed on your computer.
|
||||
You'll need [Qt 5.10.x](https://download.qt.io/official_releases/qt/5.10/),
|
||||
[CMake](https://cmake.org/download/), and a working [development environment for
|
||||
OBS Studio](https://obsproject.com/wiki/install-instructions) installed on your
|
||||
computer.
|
||||
|
||||
## Windows
|
||||
In cmake-gui, you'll have to set the following variables :
|
||||
@ -22,12 +25,24 @@ sudo make install
|
||||
```
|
||||
|
||||
## OS X
|
||||
Use of the Travis macOS CI scripts is recommended. Please note that these scripts install new software and can change several settings on your system. An existing obs-studio development environment is not required, as `install-dependencies-macos.sh` will install it for you.
|
||||
Of course, you're encouraged to dig through the contents of these scripts to look for issues or specificities.
|
||||
As a prerequisite, you will need Xcode for your current OSX version, the command line tools, and [Homebrew](https://brew.sh/).
|
||||
Homebrew's setup will guide you in getting your system set up, you should be good to go once Homebrew is successfully up and running.
|
||||
|
||||
Use of the Travis macOS CI scripts is recommended. Please note that these
|
||||
scripts install new software and can change several settings on your system. An
|
||||
existing obs-studio development environment is not required, as
|
||||
`install-build-obs-macos.sh` will install it for you. If you already have a
|
||||
working obs-studio development environment and have built obs-studio, you can
|
||||
skip that script.
|
||||
|
||||
Of course, you're encouraged to dig through the contents of these scripts to
|
||||
look for issues or specificities.
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
@ -3,11 +3,12 @@ set -ex
|
||||
|
||||
#export QT_PREFIX="$(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)"
|
||||
|
||||
mkdir build && cd build
|
||||
mkdir -p build && cd build
|
||||
cmake .. \
|
||||
-DQTDIR=/usr/local/opt/qt \
|
||||
-DLIBOBS_INCLUDE_DIR=../../obs-studio/libobs \
|
||||
-DLIBOBS_LIB=../../obs-studio/libobs \
|
||||
-DOBS_FRONTEND_LIB="$(pwd)/../../obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
&& make -j4
|
||||
|
@ -4,5 +4,5 @@ set -ex
|
||||
cd /root/obs-websocket
|
||||
|
||||
mkdir build && cd build
|
||||
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
make -j4
|
||||
|
@ -15,7 +15,7 @@ if git diff --quiet; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "master" ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "4.3-maintenance" ]; then
|
||||
echo "-- Skipping documentation deployment because this is either a pull request or a non-master branch."
|
||||
exit 0
|
||||
fi
|
||||
|
14
CI/install-build-obs-macos.sh
Executable file
14
CI/install-build-obs-macos.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# Build obs-studio
|
||||
cd ..
|
||||
git clone https://github.com/obsproject/obs-studio
|
||||
cd obs-studio
|
||||
OBSLatestTag=$(git describe --tags --abbrev=0)
|
||||
git checkout $OBSLatestTag
|
||||
mkdir build && cd build
|
||||
cmake .. \
|
||||
-DDISABLE_PLUGINS=true \
|
||||
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake \
|
||||
&& make -j4
|
@ -60,13 +60,24 @@ REM If obs-studio directory does not exist, clone the git repo, get the latest
|
||||
REM tag number, and set the build flag.
|
||||
if not exist C:\projects\obs-studio (
|
||||
echo obs-studio directory does not exist
|
||||
git clone --recursive https://github.com/jp9000/obs-studio
|
||||
git clone https://github.com/obsproject/obs-studio
|
||||
cd C:\projects\obs-studio\
|
||||
git describe --tags --abbrev=0 > C:\projects\obs-studio-latest-tag.txt
|
||||
set /p OBSLatestTag=<C:\projects\obs-studio-latest-tag.txt
|
||||
set BuildOBS=true
|
||||
)
|
||||
|
||||
REM If the needed obs-studio libs for this build_config do not exist,
|
||||
REM set the build flag.
|
||||
if not exist C:\projects\obs-studio\build32\libobs\%build_config%\obs.lib (
|
||||
echo obs-studio\build32\libobs\%build_config%\obs.lib does not exist
|
||||
set BuildOBS=true
|
||||
)
|
||||
if not exist C:\projects\obs-studio\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib (
|
||||
echo obs-studio\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib does not exist
|
||||
set BuildOBS=true
|
||||
)
|
||||
|
||||
REM Some debug info
|
||||
echo:
|
||||
echo Latest tag pre-pull: %OBSLatestTagPrePull%
|
||||
@ -97,12 +108,12 @@ if defined BuildOBS (
|
||||
mkdir build64
|
||||
echo Running cmake for obs-studio %OBSLatestTag% 32-bit...
|
||||
cd ./build32
|
||||
cmake -G "Visual Studio 12 2013" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
|
||||
cmake -G "Visual Studio 15 2017" -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 12 2013 Win64" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
|
||||
echo:
|
||||
echo:
|
||||
echo Building obs-studio %OBSLatestTag% 32-bit ^(Build Config: %build_config%^)...
|
||||
|
@ -8,25 +8,8 @@ brew install libav
|
||||
|
||||
# qtwebsockets deps
|
||||
# qt latest
|
||||
#brew install qt5
|
||||
|
||||
# qt 5.9.2
|
||||
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2b121c9a96e58a5da14228630cb71d5bead7137e/Formula/qt.rb
|
||||
|
||||
#echo "Qt path: $(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)"
|
||||
|
||||
# Build obs-studio
|
||||
cd ..
|
||||
git clone --recursive https://github.com/jp9000/obs-studio
|
||||
cd obs-studio
|
||||
git checkout 20.1.0
|
||||
mkdir build && cd build
|
||||
cmake .. \
|
||||
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake \
|
||||
&& make -j4
|
||||
brew install qt5
|
||||
|
||||
# Packages app
|
||||
cd ..
|
||||
curl -L -O http://s.sudre.free.fr/Software/files/Packages.dmg -f --retry 5 -C -
|
||||
hdiutil attach ./Packages.dmg
|
||||
sudo installer -pkg /Volumes/Packages\ 1.2.2/packages/Packages.pkg -target /
|
||||
wget --quiet --retry-connrefused --waitretry=1 https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg
|
||||
sudo installer -pkg ./Packages.pkg -target /
|
||||
|
@ -1,57 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# OBS Studio deps
|
||||
add-apt-repository -y ppa:obsproject/obs-studio
|
||||
apt-get -qq update
|
||||
apt-get install -y \
|
||||
libc-dev-bin libc6-dev \
|
||||
git \
|
||||
build-essential
|
||||
|
||||
apt-get install -y \
|
||||
libc-dev-bin \
|
||||
libc6-dev git \
|
||||
build-essential \
|
||||
checkinstall \
|
||||
cmake \
|
||||
libasound2-dev \
|
||||
libavcodec-dev \
|
||||
libavdevice-dev \
|
||||
libavfilter-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfontconfig-dev \
|
||||
libfreetype6-dev \
|
||||
libgl1-mesa-dev \
|
||||
libjack-jackd2-dev \
|
||||
libjansson-dev \
|
||||
libpulse-dev \
|
||||
libqt5x11extras5-dev \
|
||||
libspeexdsp-dev \
|
||||
libswresample-dev \
|
||||
libswscale-dev \
|
||||
libudev-dev \
|
||||
libv4l-dev \
|
||||
libvlc-dev \
|
||||
libx11-dev \
|
||||
libx264-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-xinerama0-dev \
|
||||
libxcomposite-dev \
|
||||
libxinerama-dev \
|
||||
pkg-config \
|
||||
qtbase5-dev
|
||||
obs-studio \
|
||||
libqt5websockets5-dev
|
||||
|
||||
# obs-websocket deps
|
||||
apt-get install -y libqt5websockets5-dev
|
||||
|
||||
# Build obs-studio
|
||||
cd /root
|
||||
git clone https://github.com/jp9000/obs-studio ./obs-studio
|
||||
cd obs-studio
|
||||
git checkout 20.1.0
|
||||
mkdir build && cd build
|
||||
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
|
||||
make -j4
|
||||
make install
|
||||
# Dirty hack
|
||||
wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/master/UI/obs-frontend-api/obs-frontend-api.h
|
||||
|
||||
ldconfig
|
||||
|
@ -1,20 +1,6 @@
|
||||
@echo off
|
||||
|
||||
REM Set default values to use AppVeyor's built-in Qt.
|
||||
set QTDIR32=C:\Qt\5.7\msvc2013
|
||||
set QTDIR64=C:\Qt\5.7\msvc2013_64
|
||||
set QTCompileVersion=5.7.1
|
||||
|
||||
REM If the AppVeyor cache couldn't recover qt570.7z,
|
||||
REM try to fetch Qt 5.7.0 from slepin.fr.
|
||||
if not exist qt570.7z (
|
||||
curl -kLO https://www.slepin.fr/obs-plugins/deps/qt570.7z -f --retry 5 -C -
|
||||
)
|
||||
|
||||
REM If qt570.7z exists now, use that instead of AppVeyor's built-in Qt.
|
||||
if exist qt570.7z (
|
||||
7z x qt570.7z -o"Qt5.7.0"
|
||||
set QTDIR32=%CD%\Qt5.7.0\msvc2013
|
||||
set QTDIR64=%CD%\Qt5.7.0\msvc2013_64
|
||||
set QTCompileVersion=5.7.0
|
||||
)
|
||||
set QTDIR32=C:\Qt\5.10.1\msvc2015
|
||||
set QTDIR64=C:\Qt\5.10.1\msvc2017_64
|
||||
set QTCompileVersion=5.10.1
|
||||
|
@ -635,7 +635,7 @@
|
||||
<key>OVERWRITE_PERMISSIONS</key>
|
||||
<false/>
|
||||
<key>VERSION</key>
|
||||
<string>4.3.0</string>
|
||||
<string>4.4.0</string>
|
||||
</dict>
|
||||
<key>PROJECT_COMMENTS</key>
|
||||
<dict>
|
||||
|
@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
echo "-- Preparing package build"
|
||||
export QT_CELLAR_PREFIX="$(find /usr/local/Cellar/qt -d 1 | tail -n 1)"
|
||||
export QT_CELLAR_PREFIX="$(find /usr/local/Cellar/qt -d 1 | sort -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1)"
|
||||
|
||||
export WS_LIB="/usr/local/opt/qt/lib/QtWebSockets.framework/QtWebSockets"
|
||||
export NET_LIB="/usr/local/opt/qt/lib/QtNetwork.framework/QtNetwork"
|
||||
@ -21,19 +21,21 @@ export FILENAME="obs-websocket-$VERSION.pkg"
|
||||
export LATEST_FILENAME="obs-websocket-latest-$LATEST_VERSION.pkg"
|
||||
|
||||
echo "-- Copying Qt dependencies"
|
||||
cp $WS_LIB ./build
|
||||
cp $NET_LIB ./build
|
||||
if [ ! -f ./build/$(basename $WS_LIB) ]; then cp $WS_LIB ./build; fi
|
||||
if [ ! -f ./build/$(basename $NET_LIB) ]; then cp $NET_LIB ./build; fi
|
||||
|
||||
chmod +rw ./build/QtWebSockets ./build/QtNetwork
|
||||
|
||||
echo "-- Modifying QtNetwork"
|
||||
install_name_tool \
|
||||
-id @rpath/QtNetwork \
|
||||
-change /usr/local/opt/qt/lib/QtNetwork.framework/Versions/5/QtNetwork @rpath/QtNetwork \
|
||||
-change $QT_CELLAR_PREFIX/lib/QtCore.framework/Versions/5/QtCore @rpath/QtCore \
|
||||
./build/QtNetwork
|
||||
|
||||
echo "-- Modifying QtWebSockets"
|
||||
install_name_tool \
|
||||
-id @rpath/QtWebSockets \
|
||||
-change /usr/local/opt/qt/lib/QtWebSockets.framework/Versions/5/QtWebSockets @rpath/QtWebSockets \
|
||||
-change $QT_CELLAR_PREFIX/lib/QtNetwork.framework/Versions/5/QtNetwork @rpath/QtNetwork \
|
||||
-change $QT_CELLAR_PREFIX/lib/QtCore.framework/Versions/5/QtCore @rpath/QtCore \
|
||||
|
@ -6,7 +6,9 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
if (WIN32 OR APPLE)
|
||||
include(external/FindLibObs.cmake)
|
||||
endif()
|
||||
|
||||
find_package(LibObs REQUIRED)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
@ -73,7 +75,7 @@ target_link_libraries(obs-websocket
|
||||
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 !")
|
||||
message(FATAL_ERROR "Could not find OBS Frontend API's library !")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
@ -91,23 +93,12 @@ if(WIN32)
|
||||
target_link_libraries(obs-websocket
|
||||
"${OBS_FRONTEND_LIB}")
|
||||
|
||||
add_custom_command(TARGET obs-websocket POST_BUILD
|
||||
COMMAND if $<CONFIG:Release>==1 ("${CMAKE_COMMAND}" -E copy
|
||||
"${QTDIR}/bin/Qt5WebSockets.dll"
|
||||
"${QTDIR}/bin/Qt5Network.dll"
|
||||
"${CMAKE_BINARY_DIR}/$<CONFIG>")
|
||||
|
||||
COMMAND if $<CONFIG:Debug>==1 ("${CMAKE_COMMAND}" -E copy
|
||||
"${QTDIR}/bin/Qt5WebSocketsd.dll"
|
||||
"${QTDIR}/bin/Qt5Networkd.dll"
|
||||
"${CMAKE_BINARY_DIR}/$<CONFIG>")
|
||||
)
|
||||
|
||||
# --- Release package helper ---
|
||||
# The "release" folder has a structure similar OBS' one on Windows
|
||||
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 (
|
||||
"${CMAKE_COMMAND}" -E make_directory
|
||||
"${RELEASE_DIR}/data/obs-plugins/obs-websocket"
|
||||
@ -123,6 +114,26 @@ if(WIN32)
|
||||
"${QTDIR}/bin/Qt5Network.dll"
|
||||
"${RELEASE_DIR}/obs-plugins/${ARCH_NAME}")
|
||||
|
||||
# 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>"
|
||||
"${QTDIR}/bin/Qt5WebSockets.dll"
|
||||
"${QTDIR}/bin/Qt5Network.dll"
|
||||
"${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}")
|
||||
|
||||
# Copy to obs-studio dev environment for immediate testing
|
||||
COMMAND if $<CONFIG:Debug>==1 (
|
||||
"${CMAKE_COMMAND}" -E copy
|
||||
@ -131,6 +142,11 @@ if(WIN32)
|
||||
"${QTDIR}/bin/Qt5Networkd.dll"
|
||||
"${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}")
|
||||
|
||||
COMMAND if $<CONFIG:Debug>==1 (
|
||||
"${CMAKE_COMMAND}" -E make_directory
|
||||
"${LIBOBS_INCLUDE_DIR}/../${OBS_BUILDDIR_ARCH}/rundir/$<CONFIG>/data/obs-plugins/obs-websocket")
|
||||
@ -167,6 +183,7 @@ endif()
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fvisibility=default")
|
||||
|
||||
set(CMAKE_SKIP_RPATH TRUE)
|
||||
set_target_properties(obs-websocket PROPERTIES PREFIX "")
|
||||
target_link_libraries(obs-websocket "${OBS_FRONTEND_LIB}")
|
||||
endif()
|
||||
|
24
appveyor.yml
24
appveyor.yml
@ -1,23 +1,25 @@
|
||||
image: Visual Studio 2017
|
||||
|
||||
environment:
|
||||
CURL_VERSION: 7.39.0
|
||||
|
||||
install:
|
||||
- git submodule update --init --recursive
|
||||
- cd C:\projects\
|
||||
- if not exist dependencies2013.zip curl -kLO https://obsproject.com/downloads/dependencies2013.zip -f --retry 5 -C -
|
||||
- 7z x dependencies2013.zip -odependencies2013
|
||||
- set DepsPath32=%CD%\dependencies2013\win32
|
||||
- set DepsPath64=%CD%\dependencies2013\win64
|
||||
- if not exist dependencies2015.zip curl -kLO https://obsproject.com/downloads/dependencies2015.zip -f --retry 5 -C -
|
||||
- 7z x dependencies2015.zip -odependencies2015
|
||||
- set DepsPath32=%CD%\dependencies2015\win32
|
||||
- set DepsPath64=%CD%\dependencies2015\win64
|
||||
- call C:\projects\obs-websocket\CI\install-setup-qt.cmd
|
||||
- set build_config=Release
|
||||
- set build_config=RelWithDebInfo
|
||||
- call C:\projects\obs-websocket\CI\install-build-obs.cmd
|
||||
- cd C:\projects\obs-websocket\
|
||||
- mkdir build32
|
||||
- mkdir build64
|
||||
- cd ./build32
|
||||
- cmake -G "Visual Studio 12 2013" -DQTDIR="%QTDIR32%" -DLibObs_DIR="C:\projects\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="C:\projects\obs-studio\libobs" -DLIBOBS_LIB="C:\projects\obs-studio\build32\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="C:\projects\obs-studio\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
|
||||
- cmake -G "Visual Studio 15 2017" -DQTDIR="%QTDIR32%" -DLibObs_DIR="C:\projects\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="C:\projects\obs-studio\libobs" -DLIBOBS_LIB="C:\projects\obs-studio\build32\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="C:\projects\obs-studio\build32\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
|
||||
- cd ../build64
|
||||
- cmake -G "Visual Studio 12 2013 Win64" -DQTDIR="%QTDIR64%" -DLibObs_DIR="C:\projects\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="C:\projects\obs-studio\libobs" -DLIBOBS_LIB="C:\projects\obs-studio\build64\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="C:\projects\obs-studio\build64\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
|
||||
- cmake -G "Visual Studio 15 2017 Win64" -DQTDIR="%QTDIR64%" -DLibObs_DIR="C:\projects\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="C:\projects\obs-studio\libobs" -DLIBOBS_LIB="C:\projects\obs-studio\build64\libobs\%build_config%\obs.lib" -DOBS_FRONTEND_LIB="C:\projects\obs-studio\build64\UI\obs-frontend-api\%build_config%\obs-frontend-api.lib" ..
|
||||
|
||||
build_script:
|
||||
- call msbuild /m /p:Configuration=%build_config% C:\projects\obs-websocket\build32\obs-websocket.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
@ -25,14 +27,16 @@ build_script:
|
||||
|
||||
before_deploy:
|
||||
- 7z a "C:\projects\obs-websocket\build.zip" C:\projects\obs-websocket\release\*
|
||||
- set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
|
||||
- iscc "C:\projects\obs-websocket\installer\installer.iss"
|
||||
|
||||
deploy_script:
|
||||
- ps: Push-AppveyorArtifact "C:\projects\obs-websocket\build.zip" -FileName "obs-websocket-$(git log --pretty=format:'%h' -n 1).zip"
|
||||
- ps: Push-AppveyorArtifact "C:\projects\obs-websocket\build.zip" -FileName "obs-websocket-$(git log --pretty=format:'%h' -n 1)-Windows.zip"
|
||||
- ps: Push-AppveyorArtifact "C:\projects\obs-websocket\installer\Output\obs-websocket-Windows-Installer.exe" -FileName "obs-websocket-$(git log --pretty=format:'%h' -n 1)-Windows-Installer.exe"
|
||||
|
||||
test: off
|
||||
|
||||
cache:
|
||||
- C:\projects\dependencies2013.zip
|
||||
- C:\projects\qt570.7z
|
||||
- C:\projects\dependencies2015.zip
|
||||
- C:\projects\obs-studio-last-tag-built.txt
|
||||
- C:\projects\obs-studio\
|
||||
|
@ -271,7 +271,9 @@
|
||||
"description": "A transition (other than \"cut\") has begun.",
|
||||
"return": [
|
||||
"{String} `name` Transition name.",
|
||||
"{int} `duration` Transition duration (in milliseconds)."
|
||||
"{int} `duration` Transition duration (in milliseconds).",
|
||||
"{String} `from-scene` Source scene of the transition",
|
||||
"{String} `to-scene` Destination scene of the transition"
|
||||
],
|
||||
"api": "events",
|
||||
"name": "TransitionBegin",
|
||||
@ -287,6 +289,16 @@
|
||||
"type": "int",
|
||||
"name": "duration",
|
||||
"description": "Transition duration (in milliseconds)."
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"name": "from-scene",
|
||||
"description": "Source scene of the transition"
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"name": "to-scene",
|
||||
"description": "Destination scene of the transition"
|
||||
}
|
||||
],
|
||||
"names": [
|
||||
@ -834,7 +846,7 @@
|
||||
},
|
||||
{
|
||||
"subheads": [],
|
||||
"description": "A request to start the replay buffer has been issued.",
|
||||
"description": "A request to stop the replay buffer has been issued.",
|
||||
"api": "events",
|
||||
"name": "ReplayStopping",
|
||||
"category": "replay buffer",
|
||||
|
@ -1,11 +1,6 @@
|
||||
<!-- This file was generated based on handlebars templates. Do not edit directly! -->
|
||||
|
||||
# obs-websocket 4.2.1 protocol reference
|
||||
|
||||
**This is the reference for the unreleased obs-websocket 4.2.1. See the list below for older versions.**
|
||||
- [4.2.0 protocol reference](https://github.com/Palakis/obs-websocket/blob/4.2.0/docs/generated/protocol.md)
|
||||
- [4.1.0 protocol reference](https://github.com/Palakis/obs-websocket/blob/4.1.0/PROTOCOL.md)
|
||||
- [4.0.0 protocol reference](https://github.com/Palakis/obs-websocket/blob/4.0.0/PROTOCOL.md)
|
||||
# obs-websocket 4.3.2 protocol reference
|
||||
|
||||
# General Introduction
|
||||
Messages are exchanged between the client and the server as JSON objects.
|
||||
@ -304,6 +299,8 @@ A transition (other than "cut") has begun.
|
||||
| ---- | :---: | ------------|
|
||||
| `name` | _String_ | Transition name. |
|
||||
| `duration` | _int_ | Transition duration (in milliseconds). |
|
||||
| `from-scene` | _String_ | Source scene of the transition |
|
||||
| `to-scene` | _String_ | Destination scene of the transition |
|
||||
|
||||
|
||||
---
|
||||
@ -508,7 +505,7 @@ _No additional response items._
|
||||
|
||||
- Added in v4.2.0
|
||||
|
||||
A request to start the replay buffer has been issued.
|
||||
A request to stop the replay buffer has been issued.
|
||||
|
||||
**Response Items:**
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
# obs-websocket 4.2.1 protocol reference
|
||||
|
||||
**This is the reference for the unreleased obs-websocket 4.2.1. See the list below for older versions.**
|
||||
- [4.2.0 protocol reference](https://github.com/Palakis/obs-websocket/blob/4.2.0/docs/generated/protocol.md)
|
||||
- [4.1.0 protocol reference](https://github.com/Palakis/obs-websocket/blob/4.1.0/PROTOCOL.md)
|
||||
- [4.0.0 protocol reference](https://github.com/Palakis/obs-websocket/blob/4.0.0/PROTOCOL.md)
|
||||
# obs-websocket 4.3.2 protocol reference
|
||||
|
||||
# General Introduction
|
||||
Messages are exchanged between the client and the server as JSON objects.
|
||||
|
@ -2,8 +2,8 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "obs-websocket"
|
||||
#define MyAppVersion "4.3.0"
|
||||
#define MyAppPublisher "St<EFBFBD>phane Lepin"
|
||||
#define MyAppVersion "4.4.0"
|
||||
#define MyAppPublisher "Stephane Lepin"
|
||||
#define MyAppURL "http://github.com/Palakis/obs-websocket"
|
||||
|
||||
[Setup]
|
||||
@ -20,7 +20,7 @@ AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={code:GetDirName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
OutputBaseFilename=obs-websocket-{#MyAppVersion}-Windows-Installer
|
||||
OutputBaseFilename=obs-websocket-Windows-Installer
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
LicenseFile=..\LICENSE
|
||||
|
@ -34,6 +34,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
#include "Config.h"
|
||||
#include "Utils.h"
|
||||
|
||||
#define QT_TO_UTF8(str) str.toUtf8().constData()
|
||||
|
||||
Config* Config::_instance = new Config();
|
||||
|
||||
Config::Config() :
|
||||
@ -62,9 +64,9 @@ Config::Config() :
|
||||
config_set_default_bool(obsConfig,
|
||||
SECTION_NAME, PARAM_AUTHREQUIRED, AuthRequired);
|
||||
config_set_default_string(obsConfig,
|
||||
SECTION_NAME, PARAM_SECRET, qstring_data_copy(Secret));
|
||||
SECTION_NAME, PARAM_SECRET, QT_TO_UTF8(Secret));
|
||||
config_set_default_string(obsConfig,
|
||||
SECTION_NAME, PARAM_SALT, qstring_data_copy(Salt));
|
||||
SECTION_NAME, PARAM_SALT, QT_TO_UTF8(Salt));
|
||||
}
|
||||
|
||||
mbedtls_entropy_init(&entropy);
|
||||
@ -104,9 +106,9 @@ void Config::Save() {
|
||||
|
||||
config_set_bool(obsConfig, SECTION_NAME, PARAM_AUTHREQUIRED, AuthRequired);
|
||||
config_set_string(obsConfig, SECTION_NAME, PARAM_SECRET,
|
||||
qstring_data_copy(Secret));
|
||||
QT_TO_UTF8(Secret));
|
||||
config_set_string(obsConfig, SECTION_NAME, PARAM_SALT,
|
||||
qstring_data_copy(Salt));
|
||||
QT_TO_UTF8(Salt));
|
||||
|
||||
config_save(obsConfig);
|
||||
}
|
||||
|
@ -28,13 +28,6 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
|
||||
Q_DECLARE_METATYPE(OBSScene);
|
||||
|
||||
const char* qstring_data_copy(QString value) {
|
||||
QByteArray stringData = value.toUtf8();
|
||||
const char* constStringData = new const char[stringData.size()]();
|
||||
memcpy((void*)constStringData, stringData.constData(), stringData.size());
|
||||
return constStringData;
|
||||
}
|
||||
|
||||
obs_data_array_t* Utils::StringListToArray(char** strings, char* key) {
|
||||
if (!strings)
|
||||
return obs_data_array_create();
|
||||
@ -315,13 +308,19 @@ QString Utils::OBSVersionString() {
|
||||
|
||||
QSystemTrayIcon* Utils::GetTrayIcon() {
|
||||
QMainWindow* main = (QMainWindow*)obs_frontend_get_main_window();
|
||||
if (!main) return nullptr;
|
||||
|
||||
return main->findChildren<QSystemTrayIcon*>().first();
|
||||
}
|
||||
|
||||
void Utils::SysTrayNotify(QString &text,
|
||||
QSystemTrayIcon::MessageIcon icon, QString title) {
|
||||
if (!Config::Current()->AlertsEnabled || !QSystemTrayIcon::supportsMessages())
|
||||
if (!Config::Current()->AlertsEnabled ||
|
||||
!QSystemTrayIcon::isSystemTrayAvailable() ||
|
||||
!QSystemTrayIcon::supportsMessages())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QSystemTrayIcon* trayIcon = GetTrayIcon();
|
||||
if (trayIcon)
|
||||
|
@ -32,8 +32,6 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
#include <obs-module.h>
|
||||
#include <util/config-file.h>
|
||||
|
||||
const char* qstring_data_copy(QString value);
|
||||
|
||||
class Utils {
|
||||
public:
|
||||
static obs_data_array_t* StringListToArray(char** strings, char* key);
|
||||
@ -49,8 +47,6 @@ class Utils {
|
||||
static obs_data_array_t* GetScenes();
|
||||
static obs_data_t* GetSceneData(obs_source_t* source);
|
||||
|
||||
static obs_data_array_t* GetProfiles();
|
||||
|
||||
static QSpinBox* GetTransitionDurationControl();
|
||||
static int GetTransitionDuration();
|
||||
static void SetTransitionDuration(int ms);
|
||||
|
120
src/WSEvents.cpp
120
src/WSEvents.cpp
@ -80,12 +80,7 @@ WSEvents::WSEvents(WSServer* srv) {
|
||||
this, SLOT(Heartbeat()));
|
||||
statusTimer->start(2000); // equal to frontend's constant BITRATE_UPDATE_SECONDS
|
||||
|
||||
QListWidget* sceneList = Utils::GetSceneListControl();
|
||||
connect(sceneList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
|
||||
this, SLOT(SelectedSceneChanged(QListWidgetItem*, QListWidgetItem*)));
|
||||
|
||||
transitionHandler = nullptr;
|
||||
sceneHandler = nullptr;
|
||||
currentScene = nullptr;
|
||||
|
||||
QTimer::singleShot(1000, this, SLOT(deferredInitOperations()));
|
||||
|
||||
@ -104,7 +99,7 @@ WSEvents::~WSEvents() {
|
||||
|
||||
void WSEvents::deferredInitOperations() {
|
||||
OBSSourceAutoRelease transition = obs_frontend_get_current_transition();
|
||||
connectTransitionSignals(transition);
|
||||
hookTransitionBeginEvent();
|
||||
|
||||
OBSSourceAutoRelease scene = obs_frontend_get_current_scene();
|
||||
connectSceneSignals(scene);
|
||||
@ -132,6 +127,7 @@ void WSEvents::FrontendEventHandler(enum obs_frontend_event event, void* private
|
||||
owner->OnTransitionChange();
|
||||
}
|
||||
else if (event == OBS_FRONTEND_EVENT_TRANSITION_LIST_CHANGED) {
|
||||
owner->hookTransitionBeginEvent();
|
||||
owner->OnTransitionListChange();
|
||||
}
|
||||
else if (event == OBS_FRONTEND_EVENT_PROFILE_CHANGED) {
|
||||
@ -186,7 +182,11 @@ void WSEvents::FrontendEventHandler(enum obs_frontend_event event, void* private
|
||||
else if (event == OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED) {
|
||||
owner->OnStudioModeSwitched(false);
|
||||
}
|
||||
else if (event == OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED) {
|
||||
owner->OnPreviewSceneChanged();
|
||||
}
|
||||
else if (event == OBS_FRONTEND_EVENT_EXIT) {
|
||||
owner->connectSceneSignals(nullptr);
|
||||
owner->OnExit();
|
||||
}
|
||||
}
|
||||
@ -220,44 +220,51 @@ void WSEvents::broadcastUpdate(const char* updateType,
|
||||
blog(LOG_DEBUG, "Update << '%s'", json.toUtf8().constData());
|
||||
}
|
||||
|
||||
void WSEvents::connectTransitionSignals(obs_source_t* transition) {
|
||||
if (transitionHandler) {
|
||||
signal_handler_disconnect(transitionHandler,
|
||||
"transition_start", OnTransitionBegin, this);
|
||||
void WSEvents::hookTransitionBeginEvent() {
|
||||
obs_frontend_source_list transitions = {};
|
||||
obs_frontend_get_transitions(&transitions);
|
||||
|
||||
for (int i = 0; i < transitions.sources.num; i++) {
|
||||
obs_source_t* transition = transitions.sources.array[i];
|
||||
signal_handler_t* sh = obs_source_get_signal_handler(transition);
|
||||
signal_handler_disconnect(sh, "transition_start", OnTransitionBegin, this);
|
||||
signal_handler_connect(sh, "transition_start", OnTransitionBegin, this);
|
||||
}
|
||||
|
||||
if (!transitionIsCut(transition)) {
|
||||
transitionHandler = obs_source_get_signal_handler(transition);
|
||||
signal_handler_connect(transitionHandler,
|
||||
"transition_start", OnTransitionBegin, this);
|
||||
} else {
|
||||
transitionHandler = nullptr;
|
||||
}
|
||||
obs_frontend_source_list_free(&transitions);
|
||||
}
|
||||
|
||||
void WSEvents::connectSceneSignals(obs_source_t* scene) {
|
||||
if (sceneHandler) {
|
||||
signal_handler_disconnect(sceneHandler,
|
||||
signal_handler_t* sh = nullptr;
|
||||
|
||||
if (currentScene) {
|
||||
sh = obs_source_get_signal_handler(currentScene);
|
||||
|
||||
signal_handler_disconnect(sh,
|
||||
"reorder", OnSceneReordered, this);
|
||||
signal_handler_disconnect(sceneHandler,
|
||||
signal_handler_disconnect(sh,
|
||||
"item_add", OnSceneItemAdd, this);
|
||||
signal_handler_disconnect(sceneHandler,
|
||||
signal_handler_disconnect(sh,
|
||||
"item_remove", OnSceneItemDelete, this);
|
||||
signal_handler_disconnect(sceneHandler,
|
||||
signal_handler_disconnect(sh,
|
||||
"item_visible", OnSceneItemVisibilityChanged, this);
|
||||
}
|
||||
|
||||
currentScene = scene;
|
||||
|
||||
if (currentScene) {
|
||||
// TODO : connect to all scenes, not just the current one.
|
||||
sceneHandler = obs_source_get_signal_handler(scene);
|
||||
signal_handler_connect(sceneHandler,
|
||||
sh = obs_source_get_signal_handler(currentScene);
|
||||
signal_handler_connect(sh,
|
||||
"reorder", OnSceneReordered, this);
|
||||
signal_handler_connect(sceneHandler,
|
||||
signal_handler_connect(sh,
|
||||
"item_add", OnSceneItemAdd, this);
|
||||
signal_handler_connect(sceneHandler,
|
||||
signal_handler_connect(sh,
|
||||
"item_remove", OnSceneItemDelete, this);
|
||||
signal_handler_connect(sceneHandler,
|
||||
signal_handler_connect(sh,
|
||||
"item_visible", OnSceneItemVisibilityChanged, this);
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t WSEvents::GetStreamingTime() {
|
||||
if (_streamingActive)
|
||||
@ -302,13 +309,6 @@ void WSEvents::OnSceneChange() {
|
||||
obs_data_set_array(data, "sources", sceneItems);
|
||||
|
||||
broadcastUpdate("SwitchScenes", data);
|
||||
|
||||
// Dirty fix : OBS blocks signals when swapping scenes in Studio Mode
|
||||
// after transition end, so SelectedSceneChanged is never called...
|
||||
if (obs_frontend_preview_program_mode_active()) {
|
||||
QListWidget* list = Utils::GetSceneListControl();
|
||||
SelectedSceneChanged(list->currentItem(), nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -335,8 +335,7 @@ void WSEvents::OnSceneListChange() {
|
||||
void WSEvents::OnSceneCollectionChange() {
|
||||
broadcastUpdate("SceneCollectionChanged");
|
||||
|
||||
sceneHandler = nullptr;
|
||||
transitionHandler = nullptr;
|
||||
currentScene = nullptr;
|
||||
|
||||
OnTransitionListChange();
|
||||
OnTransitionChange();
|
||||
@ -369,7 +368,6 @@ void WSEvents::OnSceneCollectionListChange() {
|
||||
*/
|
||||
void WSEvents::OnTransitionChange() {
|
||||
OBSSourceAutoRelease currentTransition = obs_frontend_get_current_transition();
|
||||
connectTransitionSignals(currentTransition);
|
||||
|
||||
OBSDataAutoRelease data = obs_data_create();
|
||||
obs_data_set_string(data, "transition-name",
|
||||
@ -551,7 +549,7 @@ void WSEvents::OnReplayStarted() {
|
||||
}
|
||||
|
||||
/**
|
||||
* A request to start the replay buffer has been issued.
|
||||
* A request to stop the replay buffer has been issued.
|
||||
*
|
||||
* @api events
|
||||
* @name ReplayStopping
|
||||
@ -735,6 +733,8 @@ void WSEvents::TransitionDurationChanged(int ms) {
|
||||
*
|
||||
* @return {String} `name` Transition name.
|
||||
* @return {int} `duration` Transition duration (in milliseconds).
|
||||
* @return {String} `from-scene` Source scene of the transition
|
||||
* @return {String} `to-scene` Destination scene of the transition
|
||||
*
|
||||
* @api events
|
||||
* @name TransitionBegin
|
||||
@ -742,14 +742,39 @@ void WSEvents::TransitionDurationChanged(int ms) {
|
||||
* @since 4.0.0
|
||||
*/
|
||||
void WSEvents::OnTransitionBegin(void* param, calldata_t* data) {
|
||||
UNUSED_PARAMETER(data);
|
||||
WSEvents* instance = static_cast<WSEvents*>(param);
|
||||
|
||||
OBSSourceAutoRelease currentTransition = obs_frontend_get_current_transition();
|
||||
OBSSource transition = (obs_source_t*)calldata_get_ptr(data, "source");
|
||||
if (!transition) return;
|
||||
|
||||
// Detect if transition is the global transition or a transition override.
|
||||
// Fetching the duration is different depending on the case.
|
||||
OBSSourceAutoRelease sourceScene = obs_transition_get_source(transition, OBS_TRANSITION_SOURCE_A);
|
||||
OBSSourceAutoRelease destinationScene = obs_transition_get_active_source(transition);
|
||||
OBSDataAutoRelease destinationSettings = obs_source_get_private_settings(destinationScene);
|
||||
int duration = -1;
|
||||
if (obs_data_has_default_value(destinationSettings, "transition_duration") ||
|
||||
obs_data_has_user_value(destinationSettings, "transition_duration"))
|
||||
{
|
||||
duration = obs_data_get_int(destinationSettings, "transition_duration");
|
||||
} else {
|
||||
duration = Utils::GetTransitionDuration();
|
||||
}
|
||||
|
||||
OBSDataAutoRelease fields = obs_data_create();
|
||||
obs_data_set_string(fields, "name", obs_source_get_name(currentTransition));
|
||||
obs_data_set_int(fields, "duration", Utils::GetTransitionDuration());
|
||||
obs_data_set_string(fields, "name", obs_source_get_name(transition));
|
||||
if (duration >= 0) {
|
||||
obs_data_set_int(fields, "duration", duration);
|
||||
} else {
|
||||
blog(LOG_WARNING, "OnTransitionBegin: duration is negative !");
|
||||
}
|
||||
|
||||
if (sourceScene) {
|
||||
obs_data_set_string(fields, "from-scene", obs_source_get_name(sourceScene));
|
||||
}
|
||||
if (destinationScene) {
|
||||
obs_data_set_string(fields, "to-scene", obs_source_get_name(destinationScene));
|
||||
}
|
||||
|
||||
instance->broadcastUpdate("TransitionBegin", fields);
|
||||
}
|
||||
@ -889,17 +914,16 @@ void WSEvents::OnSceneItemVisibilityChanged(void* param, calldata_t* data) {
|
||||
* @category studio mode
|
||||
* @since 4.1.0
|
||||
*/
|
||||
void WSEvents::SelectedSceneChanged(QListWidgetItem* current, QListWidgetItem* prev) {
|
||||
void WSEvents::OnPreviewSceneChanged() {
|
||||
if (obs_frontend_preview_program_mode_active()) {
|
||||
OBSScene scene = Utils::SceneListItemToScene(current);
|
||||
OBSSourceAutoRelease scene = obs_frontend_get_current_preview_scene();
|
||||
if (!scene)
|
||||
return;
|
||||
|
||||
OBSSource sceneSource = obs_scene_get_source(scene);
|
||||
OBSDataArrayAutoRelease sceneItems = Utils::GetSceneItems(sceneSource);
|
||||
OBSDataArrayAutoRelease sceneItems = Utils::GetSceneItems(scene);
|
||||
|
||||
OBSDataAutoRelease data = obs_data_create();
|
||||
obs_data_set_string(data, "scene-name", obs_source_get_name(sceneSource));
|
||||
obs_data_set_string(data, "scene-name", obs_source_get_name(scene));
|
||||
obs_data_set_array(data, "sources", sceneItems);
|
||||
|
||||
broadcastUpdate("PreviewSceneChanged", data);
|
||||
|
@ -33,9 +33,10 @@ class WSEvents : public QObject {
|
||||
static void FrontendEventHandler(
|
||||
enum obs_frontend_event event, void* privateData);
|
||||
static WSEvents* Instance;
|
||||
void connectTransitionSignals(obs_source_t* transition);
|
||||
void connectSceneSignals(obs_source_t* scene);
|
||||
|
||||
void hookTransitionBeginEvent();
|
||||
|
||||
uint64_t GetStreamingTime();
|
||||
const char* GetStreamingTimecode();
|
||||
uint64_t GetRecordingTime();
|
||||
@ -48,13 +49,10 @@ class WSEvents : public QObject {
|
||||
void StreamStatus();
|
||||
void Heartbeat();
|
||||
void TransitionDurationChanged(int ms);
|
||||
void SelectedSceneChanged(
|
||||
QListWidgetItem* current, QListWidgetItem* prev);
|
||||
|
||||
private:
|
||||
WSServer* _srv;
|
||||
signal_handler_t* transitionHandler;
|
||||
signal_handler_t* sceneHandler;
|
||||
OBSSource currentScene;
|
||||
|
||||
bool pulse;
|
||||
|
||||
@ -97,6 +95,7 @@ class WSEvents : public QObject {
|
||||
void OnReplayStopped();
|
||||
|
||||
void OnStudioModeSwitched(bool enabled);
|
||||
void OnPreviewSceneChanged();
|
||||
|
||||
void OnExit();
|
||||
|
||||
|
@ -22,7 +22,6 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
#include "../Config.h"
|
||||
#include "../WSServer.h"
|
||||
#include "settings-dialog.h"
|
||||
#include "ui_settings-dialog.h"
|
||||
|
||||
#define CHANGE_ME "changeme"
|
||||
|
||||
|
@ -21,9 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class SettingsDialog;
|
||||
}
|
||||
#include "ui_settings-dialog.h"
|
||||
|
||||
class SettingsDialog : public QDialog
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ using OBSOutputAutoRelease =
|
||||
OBSRef<obs_output_t*, ___output_dummy_addref, obs_output_release>;
|
||||
|
||||
#define PROP_AUTHENTICATED "wsclient_authenticated"
|
||||
#define OBS_WEBSOCKET_VERSION "4.3.0"
|
||||
#define OBS_WEBSOCKET_VERSION "4.4.0"
|
||||
|
||||
#define blog(level, msg, ...) blog(level, "[obs-websocket] " msg, ##__VA_ARGS__)
|
||||
|
||||
|
Reference in New Issue
Block a user