mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Merge branch '4.x-current' into request-setsourcemonitortype
This commit is contained in:
commit
0852f32b05
@ -24,7 +24,7 @@ sudo apt-get install libboost-all-dev
|
|||||||
git clone --recursive https://github.com/Palakis/obs-websocket.git
|
git clone --recursive https://github.com/Palakis/obs-websocket.git
|
||||||
cd obs-websocket
|
cd obs-websocket
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DLIBOBS_INCLUDE_DIR="<path to the libobs sub-folder in obs-studio's source code>" -DCMAKE_INSTALL_PREFIX=/usr ..
|
cmake -DLIBOBS_INCLUDE_DIR="<path to the libobs sub-folder in obs-studio's source code>" -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=true ..
|
||||||
make -j4
|
make -j4
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
|
cmake -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=true ..
|
||||||
make -j4
|
make -j4
|
||||||
|
@ -1,137 +0,0 @@
|
|||||||
@echo off
|
|
||||||
SETLOCAL EnableDelayedExpansion
|
|
||||||
|
|
||||||
REM Check if obs-studio build exists.
|
|
||||||
REM If the obs-studio directory does exist, check if the last OBS tag built
|
|
||||||
REM matches the latest OBS tag.
|
|
||||||
REM If the tags match, do not build obs-studio.
|
|
||||||
REM If the tags do not match, build obs-studio.
|
|
||||||
REM If the obs-studio directory doesn't exist, build obs-studio.
|
|
||||||
echo Checking for obs-studio build...
|
|
||||||
|
|
||||||
set OBSLatestTagPrePull=0
|
|
||||||
set OBSLatestTagPostPull=0
|
|
||||||
echo Latest tag pre-pull: %OBSLatestTagPrePull%
|
|
||||||
echo Latest tag post-pull: %OBSLatestTagPostPull%
|
|
||||||
|
|
||||||
REM Set up the build flag as undefined.
|
|
||||||
set "BuildOBS="
|
|
||||||
|
|
||||||
REM Check the last tag successfully built by CI.
|
|
||||||
if exist "%OBSPath%\obs-studio-last-tag-built.txt" (
|
|
||||||
set /p OBSLastTagBuilt=<"%OBSPath%\obs-studio-last-tag-built.txt"
|
|
||||||
) else (
|
|
||||||
set OBSLastTagBuilt=0
|
|
||||||
)
|
|
||||||
|
|
||||||
REM If obs-studio directory exists, run git pull and get the latest tag number.
|
|
||||||
if exist %OBSPath% (
|
|
||||||
echo obs-studio directory exists
|
|
||||||
echo Updating tag info
|
|
||||||
cd /D %OBSPath%
|
|
||||||
git describe --tags --abbrev=0 --exclude="*-rc*" > "%OBSPath%\latest-obs-studio-tag-pre-pull.txt"
|
|
||||||
set /p OBSLatestTagPrePull=<"%OBSPath%\latest-obs-studio-tag-pre-pull.txt"
|
|
||||||
git checkout master
|
|
||||||
git pull
|
|
||||||
git describe --tags --abbrev=0 --exclude="*-rc*" > "%OBSPath%\latest-obs-studio-tag-post-pull.txt"
|
|
||||||
set /p OBSLatestTagPostPull=<"%OBSPath%\latest-obs-studio-tag-post-pull.txt"
|
|
||||||
set /p OBSLatestTag=<"%OBSPath%\latest-obs-studio-tag-post-pull.txt"
|
|
||||||
echo %OBSLatestTagPostPull%> "%OBSPath%\latest-obs-studio-tag.txt"
|
|
||||||
)
|
|
||||||
|
|
||||||
REM Check the obs-studio tags for mismatches.
|
|
||||||
REM If a new tag was pulled, set the build flag.
|
|
||||||
if not %OBSLatestTagPrePull%==%OBSLatestTagPostPull% (
|
|
||||||
echo Latest tag pre-pull: %OBSLatestTagPrePull%
|
|
||||||
echo Latest tag post-pull: %OBSLatestTagPostPull%
|
|
||||||
echo Tags do not match. Need to rebuild OBS.
|
|
||||||
set BuildOBS=true
|
|
||||||
)
|
|
||||||
|
|
||||||
REM If the latest git tag doesn't match the last built tag, set the build flag.
|
|
||||||
if not %OBSLatestTagPostPull%==%OBSLastTagBuilt% (
|
|
||||||
echo Last built OBS tag: %OBSLastTagBuilt%
|
|
||||||
echo Latest tag post-pull: %OBSLatestTagPostPull%
|
|
||||||
echo Tags do not match. Need to rebuild OBS.
|
|
||||||
set BuildOBS=true
|
|
||||||
)
|
|
||||||
|
|
||||||
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 %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"
|
|
||||||
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 %OBSPath%\build32\libobs\%build_config%\obs.lib (
|
|
||||||
echo obs-studio\build32\libobs\%build_config%\obs.lib does not exist
|
|
||||||
set BuildOBS=true
|
|
||||||
)
|
|
||||||
if not exist %OBSPath%\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%
|
|
||||||
echo Latest tag post-pull: %OBSLatestTagPostPull%
|
|
||||||
echo Latest tag: %OBSLatestTag%
|
|
||||||
echo Last built OBS tag: %OBSLastTagBuilt%
|
|
||||||
|
|
||||||
if defined BuildOBS (
|
|
||||||
echo BuildOBS: true
|
|
||||||
) else (
|
|
||||||
echo BuildOBS: false
|
|
||||||
)
|
|
||||||
echo:
|
|
||||||
|
|
||||||
REM If the build flag is set, build obs-studio.
|
|
||||||
if defined BuildOBS (
|
|
||||||
echo Building obs-studio...
|
|
||||||
cd /D %OBSPath%
|
|
||||||
echo git checkout %OBSLatestTag%
|
|
||||||
git checkout %OBSLatestTag%
|
|
||||||
echo:
|
|
||||||
|
|
||||||
echo Removing previous build dirs...
|
|
||||||
if exist build32 rmdir /s /q "%OBSPath%\build32"
|
|
||||||
if exist build64 rmdir /s /q "%OBSPath%\build64"
|
|
||||||
|
|
||||||
echo Making new build dirs...
|
|
||||||
mkdir build32
|
|
||||||
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%" -DBUILD_CAPTIONS=true -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%" -DBUILD_CAPTIONS=true -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
|
|
||||||
echo:
|
|
||||||
echo:
|
|
||||||
|
|
||||||
REM echo Building obs-studio %OBSLatestTag% 32-bit ^(Build Config: %build_config%^)...
|
|
||||||
REM call msbuild /m /p:Configuration=%build_config% %OBSPath%\build32\obs-studio.sln
|
|
||||||
|
|
||||||
REM echo Building obs-studio %OBSLatestTag% 64-bit ^(Build Config: %build_config%^)...
|
|
||||||
REM call msbuild /m /p:Configuration=%build_config% %OBSPath%\build64\obs-studio.sln
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
git describe --tags --abbrev=0 > "%OBSPath%\obs-studio-last-tag-built.txt"
|
|
||||||
set /p OBSLastTagBuilt=<"%OBSPath%\obs-studio-last-tag-built.txt"
|
|
||||||
) else (
|
|
||||||
echo Last OBS tag built is: %OBSLastTagBuilt%
|
|
||||||
echo No need to rebuild OBS.
|
|
||||||
)
|
|
||||||
|
|
||||||
dir "%OBSPath%\libobs"
|
|
37
CI/prepare-obs-windows.cmd
Normal file
37
CI/prepare-obs-windows.cmd
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
@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%" -DBUILD_CAPTIONS=true -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%" -DBUILD_CAPTIONS=true -DDISABLE_PLUGINS=true -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
|
||||||
|
echo:
|
||||||
|
echo:
|
||||||
|
|
||||||
|
dir "%OBSPath%\libobs"
|
@ -187,6 +187,10 @@ if(UNIX AND NOT APPLE)
|
|||||||
|
|
||||||
file(GLOB locale_files data/locale/*.ini)
|
file(GLOB locale_files data/locale/*.ini)
|
||||||
|
|
||||||
|
if(${USE_UBUNTU_FIX})
|
||||||
|
install(TARGETS obs-websocket
|
||||||
|
LIBRARY DESTINATION "/usr/lib/obs-plugins")
|
||||||
|
endif()
|
||||||
install(TARGETS obs-websocket
|
install(TARGETS obs-websocket
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/obs-plugins")
|
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/obs-plugins")
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ It is **highly recommended** to protect obs-websocket with a password against un
|
|||||||
### For developers
|
### For developers
|
||||||
|
|
||||||
The server is a typical Websockets server running by default on port 4444 (the port number can be changed in the Settings dialog).
|
The server is a typical Websockets server running by default on port 4444 (the port number can be changed in the Settings dialog).
|
||||||
The protocol understood by the server is documented in [PROTOCOL.md](docs/generated/protocol.md).
|
The protocol understood by the server is documented in [PROTOCOL.md](docs/generated/protocol.md).
|
||||||
|
|
||||||
Here's a list of available language APIs for obs-websocket :
|
Here's a list of available language APIs for obs-websocket :
|
||||||
- Javascript (browser & nodejs): [obs-websocket-js](https://github.com/haganbmj/obs-websocket-js) by Brendan Hagan
|
- Javascript (browser & nodejs): [obs-websocket-js](https://github.com/haganbmj/obs-websocket-js) by Brendan Hagan
|
||||||
@ -36,6 +36,7 @@ Here's a list of available language APIs for obs-websocket :
|
|||||||
- Python 3.6+ with asyncio: [simpleobsws](https://github.com/IRLToolkit/simpleobsws) by tt2468
|
- Python 3.6+ with asyncio: [simpleobsws](https://github.com/IRLToolkit/simpleobsws) by tt2468
|
||||||
- Java 8+: [obs-websocket-java](https://github.com/Twasi/websocket-obs-java) by TwasiNET
|
- Java 8+: [obs-websocket-java](https://github.com/Twasi/websocket-obs-java) by TwasiNET
|
||||||
- Golang: [go-obs-websocket](https://github.com/christopher-dG/go-obs-websocket) by Chris de Graaf
|
- Golang: [go-obs-websocket](https://github.com/christopher-dG/go-obs-websocket) by Chris de Graaf
|
||||||
|
- HTTP API: [obs-websocket-http](https://github.com/IRLToolkit/obs-websocket-http) by tt2468
|
||||||
|
|
||||||
I'd like to know what you're building with or for obs-websocket. If you do something in this fashion, feel free to drop me an email at `stephane /dot/ lepin /at/ gmail /dot/ com` !
|
I'd like to know what you're building with or for obs-websocket. If you do something in this fashion, feel free to drop me an email at `stephane /dot/ lepin /at/ gmail /dot/ com` !
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ jobs:
|
|||||||
obs | "$(Agent.OS)"
|
obs | "$(Agent.OS)"
|
||||||
path: $(OBSPath)
|
path: $(OBSPath)
|
||||||
|
|
||||||
- script: ./CI/checkout-cmake-obs-windows.cmd
|
- script: ./CI/prepare-obs-windows.cmd
|
||||||
displayName: 'Checkout & CMake OBS Studio'
|
displayName: 'Checkout & CMake OBS Studio'
|
||||||
env:
|
env:
|
||||||
build_config: $(build_config)
|
build_config: $(build_config)
|
||||||
|
@ -6870,6 +6870,7 @@
|
|||||||
"name": "GetBrowserSourceProperties",
|
"name": "GetBrowserSourceProperties",
|
||||||
"category": "sources",
|
"category": "sources",
|
||||||
"since": "4.1.0",
|
"since": "4.1.0",
|
||||||
|
"deprecated": "Since 4.8.0. Prefer the use of GetSourceSettings.",
|
||||||
"returns": [
|
"returns": [
|
||||||
{
|
{
|
||||||
"type": "String",
|
"type": "String",
|
||||||
@ -6942,6 +6943,12 @@
|
|||||||
"description": "4.1.0"
|
"description": "4.1.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"deprecateds": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"description": "Since 4.8.0. Prefer the use of GetSourceSettings."
|
||||||
|
}
|
||||||
|
],
|
||||||
"heading": {
|
"heading": {
|
||||||
"level": 2,
|
"level": 2,
|
||||||
"text": "GetBrowserSourceProperties"
|
"text": "GetBrowserSourceProperties"
|
||||||
@ -6968,6 +6975,7 @@
|
|||||||
"api": "requests",
|
"api": "requests",
|
||||||
"name": "SetBrowserSourceProperties",
|
"name": "SetBrowserSourceProperties",
|
||||||
"category": "sources",
|
"category": "sources",
|
||||||
|
"deprecated": "Since 4.8.0. Prefer the use of SetSourceSettings.",
|
||||||
"since": "4.1.0",
|
"since": "4.1.0",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@ -7033,6 +7041,12 @@
|
|||||||
"description": "sources"
|
"description": "sources"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"deprecateds": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"description": "Since 4.8.0. Prefer the use of SetSourceSettings."
|
||||||
|
}
|
||||||
|
],
|
||||||
"sinces": [
|
"sinces": [
|
||||||
{
|
{
|
||||||
"name": "",
|
"name": "",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!-- This file was generated based on handlebars templates. Do not edit directly! -->
|
<!-- This file was generated based on handlebars templates. Do not edit directly! -->
|
||||||
|
|
||||||
# obs-websocket 4.7.0 protocol reference
|
# obs-websocket 4.8.0 protocol reference
|
||||||
|
|
||||||
# General Introduction
|
# General Introduction
|
||||||
Messages are exchanged between the client and the server as JSON objects.
|
Messages are exchanged between the client and the server as JSON objects.
|
||||||
@ -2643,6 +2643,7 @@ _No additional response items._
|
|||||||
|
|
||||||
### GetBrowserSourceProperties
|
### GetBrowserSourceProperties
|
||||||
|
|
||||||
|
- **⚠️ Deprecated. Since 4.8.0. Prefer the use of GetSourceSettings. ⚠️**
|
||||||
|
|
||||||
- Added in v4.1.0
|
- Added in v4.1.0
|
||||||
|
|
||||||
@ -2674,6 +2675,7 @@ Get current properties for a Browser Source.
|
|||||||
|
|
||||||
### SetBrowserSourceProperties
|
### SetBrowserSourceProperties
|
||||||
|
|
||||||
|
- **⚠️ Deprecated. Since 4.8.0. Prefer the use of SetSourceSettings. ⚠️**
|
||||||
|
|
||||||
- Added in v4.1.0
|
- Added in v4.1.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# obs-websocket 4.7.0 protocol reference
|
# obs-websocket 4.8.0 protocol reference
|
||||||
|
|
||||||
# General Introduction
|
# General Introduction
|
||||||
Messages are exchanged between the client and the server as JSON objects.
|
Messages are exchanged between the client and the server as JSON objects.
|
||||||
|
@ -15,7 +15,7 @@ bool isTextGDIPlusSource(const QString& sourceKind)
|
|||||||
|
|
||||||
bool isTextFreeType2Source(const QString& sourceKind)
|
bool isTextFreeType2Source(const QString& sourceKind)
|
||||||
{
|
{
|
||||||
return (sourceKind == "text_ft2" || sourceKind == "text_ft2_v2");
|
return (sourceKind == "text_ft2_source" || sourceKind == "text_ft2_source_v2");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -919,6 +919,7 @@ RpcResponse WSRequestHandler::SetTextFreetype2Properties(const RpcRequest& reque
|
|||||||
* @name GetBrowserSourceProperties
|
* @name GetBrowserSourceProperties
|
||||||
* @category sources
|
* @category sources
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
|
* @deprecated Since 4.8.0. Prefer the use of GetSourceSettings.
|
||||||
*/
|
*/
|
||||||
RpcResponse WSRequestHandler::GetBrowserSourceProperties(const RpcRequest& request)
|
RpcResponse WSRequestHandler::GetBrowserSourceProperties(const RpcRequest& request)
|
||||||
{
|
{
|
||||||
@ -960,6 +961,7 @@ RpcResponse WSRequestHandler::GetBrowserSourceProperties(const RpcRequest& reque
|
|||||||
* @api requests
|
* @api requests
|
||||||
* @name SetBrowserSourceProperties
|
* @name SetBrowserSourceProperties
|
||||||
* @category sources
|
* @category sources
|
||||||
|
* @deprecated Since 4.8.0. Prefer the use of SetSourceSettings.
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
RpcResponse WSRequestHandler::SetBrowserSourceProperties(const RpcRequest& request)
|
RpcResponse WSRequestHandler::SetBrowserSourceProperties(const RpcRequest& request)
|
||||||
|
@ -133,6 +133,9 @@ RpcResponse WSRequestHandler::TransitionToProgram(const RpcRequest& request) {
|
|||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
RpcResponse WSRequestHandler::EnableStudioMode(const RpcRequest& request) {
|
RpcResponse WSRequestHandler::EnableStudioMode(const RpcRequest& request) {
|
||||||
|
if (obs_frontend_preview_program_mode_active()) {
|
||||||
|
return request.failed("studio mode already active");
|
||||||
|
}
|
||||||
obs_queue_task(OBS_TASK_UI, [](void* param) {
|
obs_queue_task(OBS_TASK_UI, [](void* param) {
|
||||||
obs_frontend_set_preview_program_mode(true);
|
obs_frontend_set_preview_program_mode(true);
|
||||||
|
|
||||||
@ -150,6 +153,9 @@ RpcResponse WSRequestHandler::EnableStudioMode(const RpcRequest& request) {
|
|||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
RpcResponse WSRequestHandler::DisableStudioMode(const RpcRequest& request) {
|
RpcResponse WSRequestHandler::DisableStudioMode(const RpcRequest& request) {
|
||||||
|
if (!obs_frontend_preview_program_mode_active()) {
|
||||||
|
return request.failed("studio mode not active");
|
||||||
|
}
|
||||||
obs_queue_task(OBS_TASK_UI, [](void* param) {
|
obs_queue_task(OBS_TASK_UI, [](void* param) {
|
||||||
obs_frontend_set_preview_program_mode(false);
|
obs_frontend_set_preview_program_mode(false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user