mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Compare commits
8 Commits
5.0.0
...
release/5.
Author | SHA1 | Date | |
---|---|---|---|
d465dd3110 | |||
a89f47e720 | |||
952a1f914e | |||
816c1b278b | |||
2daba572e8 | |||
02ccd0b76f | |||
f95865c2c4 | |||
4dc5229c49 |
6
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
6
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@ -49,6 +49,7 @@ body:
|
||||
label: OBS Studio Version
|
||||
description: What version of OBS Studio are you using?
|
||||
options:
|
||||
- 28.0.0
|
||||
- 27.2.4
|
||||
- 27.2.3
|
||||
- 27.2.2
|
||||
@ -75,12 +76,9 @@ body:
|
||||
label: obs-websocket Version
|
||||
description: What version of obs-websocket are you using?
|
||||
options:
|
||||
- 5.0.1
|
||||
- 5.0.0
|
||||
- 5.0.0-beta1
|
||||
- 5.0.0-alpha3
|
||||
- 5.0.0-alpha2
|
||||
- 4.9.1
|
||||
- 4.9.0
|
||||
- Git
|
||||
validations:
|
||||
required: true
|
||||
|
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@ -47,7 +47,8 @@ jobs:
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=27.2.4" >> $GITHUB_ENV
|
||||
# echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: 'Checkout last OBS Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
@ -110,7 +111,7 @@ jobs:
|
||||
run: |
|
||||
if(!(Test-Path -Path ".\build32")){New-Item -ItemType directory -Path .\build32}
|
||||
cd .\build32
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF ..
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF -DBUILD_VST=OFF ..
|
||||
- name: 'Build OBS Studio 32-bit'
|
||||
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
@ -131,7 +132,7 @@ jobs:
|
||||
run: |
|
||||
if(!(Test-Path -Path ".\build64")){New-Item -ItemType directory -Path .\build64}
|
||||
cd .\build64
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF ..
|
||||
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2019_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES -DBUILD_BROWSER=OFF -DBUILD_VST=OFF ..
|
||||
- name: 'Build OBS Studio 64-bit'
|
||||
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
@ -201,7 +202,8 @@ jobs:
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=27.2.4" >> $GITHUB_ENV
|
||||
# echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: 'Checkout last OBS Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
@ -388,7 +390,8 @@ jobs:
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
echo "OBS_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
echo "OBS_GIT_TAG=27.2.4" >> $GITHUB_ENV
|
||||
# echo "OBS_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: 'Checkout last OBS Studio release (${{ env.OBS_GIT_TAG }})'
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/obs-studio
|
||||
|
@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.16...3.20)
|
||||
|
||||
# Version variables
|
||||
project(obs-websocket VERSION 5.0.0)
|
||||
project(obs-websocket VERSION 5.0.1)
|
||||
set(OBS_WEBSOCKET_RPC_VERSION 1)
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
# obs-websocket 5.0.0 Protocol
|
||||
# obs-websocket 5.0.1 Protocol
|
||||
|
||||
## Main Table of Contents
|
||||
|
||||
@ -143,7 +143,7 @@ Authentication is required
|
||||
{
|
||||
"op": 0,
|
||||
"d": {
|
||||
"obsWebSocketVersion": "5.0.0",
|
||||
"obsWebSocketVersion": "5.0.1",
|
||||
"rpcVersion": 1,
|
||||
"authentication": {
|
||||
"challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=",
|
||||
@ -159,7 +159,7 @@ Authentication is not required
|
||||
{
|
||||
"op": 0,
|
||||
"d": {
|
||||
"obsWebSocketVersion": "5.0.0",
|
||||
"obsWebSocketVersion": "5.0.1",
|
||||
"rpcVersion": 1
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void EventHandler::HandleRecordStateChanged(ObsOutputState state)
|
||||
json eventData;
|
||||
eventData["outputActive"] = GetOutputStateActive(state);
|
||||
eventData["outputState"] = state;
|
||||
if (state == OBS_WEBSOCKET_OUTPUT_STOPPED) {
|
||||
if (state == OBS_WEBSOCKET_OUTPUT_STOPPED || state == OBS_WEBSOCKET_OUTPUT_STARTED) {
|
||||
eventData["outputPath"] = Utils::Obs::StringHelper::GetLastRecordFileName();
|
||||
} else {
|
||||
eventData["outputPath"] = nullptr;
|
||||
|
@ -26,7 +26,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
#include "utils/Obs.h"
|
||||
#include "plugin-macros.generated.h"
|
||||
|
||||
class Config;
|
||||
struct Config;
|
||||
typedef std::shared_ptr<Config> ConfigPtr;
|
||||
|
||||
class EventHandler;
|
||||
|
@ -759,7 +759,7 @@ RequestResult RequestHandler::SetSceneItemPrivateSettings(const Request &request
|
||||
std::string comment;
|
||||
OBSSceneItemAutoRelease sceneItem = request.ValidateSceneItem("sceneName", "sceneItemId", statusCode, comment,
|
||||
OBS_WEBSOCKET_SCENE_FILTER_SCENE_OR_GROUP);
|
||||
if (!sceneItem || !request.ValidateObject("sceneItemSettings", statusCode, comment))
|
||||
if (!sceneItem || !request.ValidateObject("sceneItemSettings", statusCode, comment, true))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
|
||||
OBSDataAutoRelease privateSettings = obs_sceneitem_get_private_settings(sceneItem);
|
||||
|
@ -339,7 +339,7 @@ RequestResult RequestHandler::SetSourcePrivateSettings(const Request &request)
|
||||
RequestStatus::RequestStatus statusCode;
|
||||
std::string comment;
|
||||
OBSSourceAutoRelease source = request.ValidateSource("sourceName", statusCode, comment);
|
||||
if (!source || !request.ValidateObject("sourceSettings", statusCode, comment))
|
||||
if (!source || !request.ValidateObject("sourceSettings", statusCode, comment, true))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
|
||||
OBSDataAutoRelease privateSettings = obs_source_get_private_settings(source);
|
||||
|
@ -228,7 +228,7 @@ RequestResult RequestHandler::OpenVideoMixProjector(const Request &request)
|
||||
if (videoMixType == "OBS_WEBSOCKET_VIDEO_MIX_TYPE_PREVIEW")
|
||||
projectorType = "Preview";
|
||||
else if (videoMixType == "OBS_WEBSOCKET_VIDEO_MIX_TYPE_PROGRAM")
|
||||
projectorType = "Program";
|
||||
projectorType = "StudioProgram";
|
||||
else if (videoMixType == "OBS_WEBSOCKET_VIDEO_MIX_TYPE_MULTIVIEW")
|
||||
projectorType = "Multiview";
|
||||
else
|
||||
|
@ -445,6 +445,12 @@ void WebSocketServer::onMessage(websocketpp::connection_hdl hdl,
|
||||
goto skipProcessing;
|
||||
}
|
||||
|
||||
if (!incomingMessage["op"].is_number()) {
|
||||
ret.closeCode = WebSocketCloseCode::UnknownOpCode;
|
||||
ret.closeReason = "Your `op` is not a number.";
|
||||
goto skipProcessing;
|
||||
}
|
||||
|
||||
ProcessMessage(session, ret, incomingMessage["op"], incomingMessage["d"]);
|
||||
|
||||
skipProcessing:
|
||||
|
Reference in New Issue
Block a user