mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
WSRequestHandler: fixes
This commit is contained in:
@ -25,120 +25,120 @@
|
|||||||
#include "WSRequestHandler.h"
|
#include "WSRequestHandler.h"
|
||||||
|
|
||||||
const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap {
|
const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap {
|
||||||
{ "GetVersion", &WSRequestHandler::GetVersion },
|
// { "GetVersion", &WSRequestHandler::GetVersion },
|
||||||
{ "GetAuthRequired", &WSRequestHandler::GetAuthRequired },
|
// { "GetAuthRequired", &WSRequestHandler::GetAuthRequired },
|
||||||
{ "Authenticate", &WSRequestHandler::Authenticate },
|
// { "Authenticate", &WSRequestHandler::Authenticate },
|
||||||
|
|
||||||
{ "GetStats", &WSRequestHandler::GetStats },
|
// { "GetStats", &WSRequestHandler::GetStats },
|
||||||
{ "SetHeartbeat", &WSRequestHandler::SetHeartbeat },
|
// { "SetHeartbeat", &WSRequestHandler::SetHeartbeat },
|
||||||
{ "GetVideoInfo", &WSRequestHandler::GetVideoInfo },
|
// { "GetVideoInfo", &WSRequestHandler::GetVideoInfo },
|
||||||
|
|
||||||
{ "SetFilenameFormatting", &WSRequestHandler::SetFilenameFormatting },
|
// { "SetFilenameFormatting", &WSRequestHandler::SetFilenameFormatting },
|
||||||
{ "GetFilenameFormatting", &WSRequestHandler::GetFilenameFormatting },
|
// { "GetFilenameFormatting", &WSRequestHandler::GetFilenameFormatting },
|
||||||
|
|
||||||
{ "BroadcastCustomMessage", &WSRequestHandler::BroadcastCustomMessage },
|
// { "BroadcastCustomMessage", &WSRequestHandler::BroadcastCustomMessage },
|
||||||
|
|
||||||
{ "SetCurrentScene", &WSRequestHandler::SetCurrentScene },
|
// { "SetCurrentScene", &WSRequestHandler::SetCurrentScene },
|
||||||
{ "GetCurrentScene", &WSRequestHandler::GetCurrentScene },
|
// { "GetCurrentScene", &WSRequestHandler::GetCurrentScene },
|
||||||
{ "GetSceneList", &WSRequestHandler::GetSceneList },
|
// { "GetSceneList", &WSRequestHandler::GetSceneList },
|
||||||
|
|
||||||
{ "SetSourceRender", &WSRequestHandler::SetSceneItemRender }, // Retrocompat
|
// { "SetSourceRender", &WSRequestHandler::SetSceneItemRender }, // Retrocompat
|
||||||
{ "SetSceneItemRender", &WSRequestHandler::SetSceneItemRender },
|
// { "SetSceneItemRender", &WSRequestHandler::SetSceneItemRender },
|
||||||
{ "SetSceneItemPosition", &WSRequestHandler::SetSceneItemPosition },
|
// { "SetSceneItemPosition", &WSRequestHandler::SetSceneItemPosition },
|
||||||
{ "SetSceneItemTransform", &WSRequestHandler::SetSceneItemTransform },
|
// { "SetSceneItemTransform", &WSRequestHandler::SetSceneItemTransform },
|
||||||
{ "SetSceneItemCrop", &WSRequestHandler::SetSceneItemCrop },
|
// { "SetSceneItemCrop", &WSRequestHandler::SetSceneItemCrop },
|
||||||
{ "GetSceneItemProperties", &WSRequestHandler::GetSceneItemProperties },
|
// { "GetSceneItemProperties", &WSRequestHandler::GetSceneItemProperties },
|
||||||
{ "SetSceneItemProperties", &WSRequestHandler::SetSceneItemProperties },
|
// { "SetSceneItemProperties", &WSRequestHandler::SetSceneItemProperties },
|
||||||
{ "ResetSceneItem", &WSRequestHandler::ResetSceneItem },
|
// { "ResetSceneItem", &WSRequestHandler::ResetSceneItem },
|
||||||
{ "DeleteSceneItem", &WSRequestHandler::DeleteSceneItem },
|
// { "DeleteSceneItem", &WSRequestHandler::DeleteSceneItem },
|
||||||
{ "DuplicateSceneItem", &WSRequestHandler::DuplicateSceneItem },
|
// { "DuplicateSceneItem", &WSRequestHandler::DuplicateSceneItem },
|
||||||
{ "ReorderSceneItems", &WSRequestHandler::ReorderSceneItems },
|
// { "ReorderSceneItems", &WSRequestHandler::ReorderSceneItems },
|
||||||
|
|
||||||
{ "GetStreamingStatus", &WSRequestHandler::GetStreamingStatus },
|
// { "GetStreamingStatus", &WSRequestHandler::GetStreamingStatus },
|
||||||
{ "StartStopStreaming", &WSRequestHandler::StartStopStreaming },
|
// { "StartStopStreaming", &WSRequestHandler::StartStopStreaming },
|
||||||
{ "StartStopRecording", &WSRequestHandler::StartStopRecording },
|
// { "StartStopRecording", &WSRequestHandler::StartStopRecording },
|
||||||
|
|
||||||
{ "StartStreaming", &WSRequestHandler::StartStreaming },
|
// { "StartStreaming", &WSRequestHandler::StartStreaming },
|
||||||
{ "StopStreaming", &WSRequestHandler::StopStreaming },
|
// { "StopStreaming", &WSRequestHandler::StopStreaming },
|
||||||
|
|
||||||
{ "StartRecording", &WSRequestHandler::StartRecording },
|
// { "StartRecording", &WSRequestHandler::StartRecording },
|
||||||
{ "StopRecording", &WSRequestHandler::StopRecording },
|
// { "StopRecording", &WSRequestHandler::StopRecording },
|
||||||
{ "PauseRecording", &WSRequestHandler::PauseRecording },
|
// { "PauseRecording", &WSRequestHandler::PauseRecording },
|
||||||
{ "ResumeRecording", &WSRequestHandler::ResumeRecording },
|
// { "ResumeRecording", &WSRequestHandler::ResumeRecording },
|
||||||
|
|
||||||
{ "StartStopReplayBuffer", &WSRequestHandler::StartStopReplayBuffer },
|
// { "StartStopReplayBuffer", &WSRequestHandler::StartStopReplayBuffer },
|
||||||
{ "StartReplayBuffer", &WSRequestHandler::StartReplayBuffer },
|
// { "StartReplayBuffer", &WSRequestHandler::StartReplayBuffer },
|
||||||
{ "StopReplayBuffer", &WSRequestHandler::StopReplayBuffer },
|
// { "StopReplayBuffer", &WSRequestHandler::StopReplayBuffer },
|
||||||
{ "SaveReplayBuffer", &WSRequestHandler::SaveReplayBuffer },
|
// { "SaveReplayBuffer", &WSRequestHandler::SaveReplayBuffer },
|
||||||
|
|
||||||
{ "SetRecordingFolder", &WSRequestHandler::SetRecordingFolder },
|
// { "SetRecordingFolder", &WSRequestHandler::SetRecordingFolder },
|
||||||
{ "GetRecordingFolder", &WSRequestHandler::GetRecordingFolder },
|
// { "GetRecordingFolder", &WSRequestHandler::GetRecordingFolder },
|
||||||
|
|
||||||
{ "GetTransitionList", &WSRequestHandler::GetTransitionList },
|
// { "GetTransitionList", &WSRequestHandler::GetTransitionList },
|
||||||
{ "GetCurrentTransition", &WSRequestHandler::GetCurrentTransition },
|
// { "GetCurrentTransition", &WSRequestHandler::GetCurrentTransition },
|
||||||
{ "SetCurrentTransition", &WSRequestHandler::SetCurrentTransition },
|
// { "SetCurrentTransition", &WSRequestHandler::SetCurrentTransition },
|
||||||
{ "SetTransitionDuration", &WSRequestHandler::SetTransitionDuration },
|
// { "SetTransitionDuration", &WSRequestHandler::SetTransitionDuration },
|
||||||
{ "GetTransitionDuration", &WSRequestHandler::GetTransitionDuration },
|
// { "GetTransitionDuration", &WSRequestHandler::GetTransitionDuration },
|
||||||
|
|
||||||
{ "SetVolume", &WSRequestHandler::SetVolume },
|
// { "SetVolume", &WSRequestHandler::SetVolume },
|
||||||
{ "GetVolume", &WSRequestHandler::GetVolume },
|
// { "GetVolume", &WSRequestHandler::GetVolume },
|
||||||
{ "ToggleMute", &WSRequestHandler::ToggleMute },
|
// { "ToggleMute", &WSRequestHandler::ToggleMute },
|
||||||
{ "SetMute", &WSRequestHandler::SetMute },
|
// { "SetMute", &WSRequestHandler::SetMute },
|
||||||
{ "GetMute", &WSRequestHandler::GetMute },
|
// { "GetMute", &WSRequestHandler::GetMute },
|
||||||
{ "SetSyncOffset", &WSRequestHandler::SetSyncOffset },
|
// { "SetSyncOffset", &WSRequestHandler::SetSyncOffset },
|
||||||
{ "GetSyncOffset", &WSRequestHandler::GetSyncOffset },
|
// { "GetSyncOffset", &WSRequestHandler::GetSyncOffset },
|
||||||
{ "GetSpecialSources", &WSRequestHandler::GetSpecialSources },
|
// { "GetSpecialSources", &WSRequestHandler::GetSpecialSources },
|
||||||
{ "GetSourcesList", &WSRequestHandler::GetSourcesList },
|
// { "GetSourcesList", &WSRequestHandler::GetSourcesList },
|
||||||
{ "GetSourceTypesList", &WSRequestHandler::GetSourceTypesList },
|
// { "GetSourceTypesList", &WSRequestHandler::GetSourceTypesList },
|
||||||
{ "GetSourceSettings", &WSRequestHandler::GetSourceSettings },
|
// { "GetSourceSettings", &WSRequestHandler::GetSourceSettings },
|
||||||
{ "SetSourceSettings", &WSRequestHandler::SetSourceSettings },
|
// { "SetSourceSettings", &WSRequestHandler::SetSourceSettings },
|
||||||
{ "TakeSourceScreenshot", &WSRequestHandler::TakeSourceScreenshot },
|
// { "TakeSourceScreenshot", &WSRequestHandler::TakeSourceScreenshot },
|
||||||
|
|
||||||
{ "GetSourceFilters", &WSRequestHandler::GetSourceFilters },
|
// { "GetSourceFilters", &WSRequestHandler::GetSourceFilters },
|
||||||
{ "GetSourceFilterInfo", &WSRequestHandler::GetSourceFilterInfo },
|
// { "GetSourceFilterInfo", &WSRequestHandler::GetSourceFilterInfo },
|
||||||
{ "AddFilterToSource", &WSRequestHandler::AddFilterToSource },
|
// { "AddFilterToSource", &WSRequestHandler::AddFilterToSource },
|
||||||
{ "RemoveFilterFromSource", &WSRequestHandler::RemoveFilterFromSource },
|
// { "RemoveFilterFromSource", &WSRequestHandler::RemoveFilterFromSource },
|
||||||
{ "ReorderSourceFilter", &WSRequestHandler::ReorderSourceFilter },
|
// { "ReorderSourceFilter", &WSRequestHandler::ReorderSourceFilter },
|
||||||
{ "MoveSourceFilter", &WSRequestHandler::MoveSourceFilter },
|
// { "MoveSourceFilter", &WSRequestHandler::MoveSourceFilter },
|
||||||
{ "SetSourceFilterSettings", &WSRequestHandler::SetSourceFilterSettings },
|
// { "SetSourceFilterSettings", &WSRequestHandler::SetSourceFilterSettings },
|
||||||
{ "SetSourceFilterVisibility", &WSRequestHandler::SetSourceFilterVisibility },
|
// { "SetSourceFilterVisibility", &WSRequestHandler::SetSourceFilterVisibility },
|
||||||
|
|
||||||
{ "SetCurrentSceneCollection", &WSRequestHandler::SetCurrentSceneCollection },
|
// { "SetCurrentSceneCollection", &WSRequestHandler::SetCurrentSceneCollection },
|
||||||
{ "GetCurrentSceneCollection", &WSRequestHandler::GetCurrentSceneCollection },
|
// { "GetCurrentSceneCollection", &WSRequestHandler::GetCurrentSceneCollection },
|
||||||
{ "ListSceneCollections", &WSRequestHandler::ListSceneCollections },
|
// { "ListSceneCollections", &WSRequestHandler::ListSceneCollections },
|
||||||
|
|
||||||
{ "SetCurrentProfile", &WSRequestHandler::SetCurrentProfile },
|
// { "SetCurrentProfile", &WSRequestHandler::SetCurrentProfile },
|
||||||
{ "GetCurrentProfile", &WSRequestHandler::GetCurrentProfile },
|
// { "GetCurrentProfile", &WSRequestHandler::GetCurrentProfile },
|
||||||
{ "ListProfiles", &WSRequestHandler::ListProfiles },
|
// { "ListProfiles", &WSRequestHandler::ListProfiles },
|
||||||
|
|
||||||
{ "SetStreamSettings", &WSRequestHandler::SetStreamSettings },
|
// { "SetStreamSettings", &WSRequestHandler::SetStreamSettings },
|
||||||
{ "GetStreamSettings", &WSRequestHandler::GetStreamSettings },
|
// { "GetStreamSettings", &WSRequestHandler::GetStreamSettings },
|
||||||
{ "SaveStreamSettings", &WSRequestHandler::SaveStreamSettings },
|
// { "SaveStreamSettings", &WSRequestHandler::SaveStreamSettings },
|
||||||
#if BUILD_CAPTIONS
|
// #if BUILD_CAPTIONS
|
||||||
{ "SendCaptions", &WSRequestHandler::SendCaptions },
|
// { "SendCaptions", &WSRequestHandler::SendCaptions },
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
{ "GetStudioModeStatus", &WSRequestHandler::GetStudioModeStatus },
|
// { "GetStudioModeStatus", &WSRequestHandler::GetStudioModeStatus },
|
||||||
{ "GetPreviewScene", &WSRequestHandler::GetPreviewScene },
|
// { "GetPreviewScene", &WSRequestHandler::GetPreviewScene },
|
||||||
{ "SetPreviewScene", &WSRequestHandler::SetPreviewScene },
|
// { "SetPreviewScene", &WSRequestHandler::SetPreviewScene },
|
||||||
{ "TransitionToProgram", &WSRequestHandler::TransitionToProgram },
|
// { "TransitionToProgram", &WSRequestHandler::TransitionToProgram },
|
||||||
{ "EnableStudioMode", &WSRequestHandler::EnableStudioMode },
|
// { "EnableStudioMode", &WSRequestHandler::EnableStudioMode },
|
||||||
{ "DisableStudioMode", &WSRequestHandler::DisableStudioMode },
|
// { "DisableStudioMode", &WSRequestHandler::DisableStudioMode },
|
||||||
{ "ToggleStudioMode", &WSRequestHandler::ToggleStudioMode },
|
// { "ToggleStudioMode", &WSRequestHandler::ToggleStudioMode },
|
||||||
|
|
||||||
{ "SetTextGDIPlusProperties", &WSRequestHandler::SetTextGDIPlusProperties },
|
// { "SetTextGDIPlusProperties", &WSRequestHandler::SetTextGDIPlusProperties },
|
||||||
{ "GetTextGDIPlusProperties", &WSRequestHandler::GetTextGDIPlusProperties },
|
// { "GetTextGDIPlusProperties", &WSRequestHandler::GetTextGDIPlusProperties },
|
||||||
|
|
||||||
{ "SetTextFreetype2Properties", &WSRequestHandler::SetTextFreetype2Properties },
|
// { "SetTextFreetype2Properties", &WSRequestHandler::SetTextFreetype2Properties },
|
||||||
{ "GetTextFreetype2Properties", &WSRequestHandler::GetTextFreetype2Properties },
|
// { "GetTextFreetype2Properties", &WSRequestHandler::GetTextFreetype2Properties },
|
||||||
|
|
||||||
{ "GetBrowserSourceProperties", &WSRequestHandler::GetBrowserSourceProperties },
|
// { "GetBrowserSourceProperties", &WSRequestHandler::GetBrowserSourceProperties },
|
||||||
{ "SetBrowserSourceProperties", &WSRequestHandler::SetBrowserSourceProperties },
|
// { "SetBrowserSourceProperties", &WSRequestHandler::SetBrowserSourceProperties },
|
||||||
|
|
||||||
{ "ListOutputs", &WSRequestHandler::ListOutputs },
|
// { "ListOutputs", &WSRequestHandler::ListOutputs },
|
||||||
{ "GetOutputInfo", &WSRequestHandler::GetOutputInfo },
|
// { "GetOutputInfo", &WSRequestHandler::GetOutputInfo },
|
||||||
{ "StartOutput", &WSRequestHandler::StartOutput },
|
// { "StartOutput", &WSRequestHandler::StartOutput },
|
||||||
{ "StopOutput", &WSRequestHandler::StopOutput }
|
// { "StopOutput", &WSRequestHandler::StopOutput }
|
||||||
};
|
};
|
||||||
|
|
||||||
const QSet<QString> WSRequestHandler::authNotRequired {
|
const QSet<QString> WSRequestHandler::authNotRequired {
|
||||||
|
@ -19,11 +19,9 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
#include <QtCore/QSet>
|
#include <QtCore/QSet>
|
||||||
#include <QtCore/QVariantHash>
|
|
||||||
#include <QtCore/QString>
|
|
||||||
#include <QtCore/QSharedPointer>
|
|
||||||
|
|
||||||
#include <obs.hpp>
|
#include <obs.hpp>
|
||||||
#include <obs-frontend-api.h>
|
#include <obs-frontend-api.h>
|
||||||
@ -135,31 +133,31 @@ class WSRequestHandler {
|
|||||||
RpcResponse GetStreamSettings(const RpcRequest&);
|
RpcResponse GetStreamSettings(const RpcRequest&);
|
||||||
RpcResponse SaveStreamSettings(const RpcRequest&);
|
RpcResponse SaveStreamSettings(const RpcRequest&);
|
||||||
#if BUILD_CAPTIONS
|
#if BUILD_CAPTIONS
|
||||||
RpcResponse SendCaptions(WSRequestHandler * req);
|
RpcResponse SendCaptions(const RpcRequest&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RpcResponse SetTransitionDuration(const RpcRequest& request);
|
RpcResponse SetTransitionDuration(const RpcRequest&);
|
||||||
RpcResponse GetTransitionDuration(const RpcRequest& request);
|
RpcResponse GetTransitionDuration(const RpcRequest&);
|
||||||
|
|
||||||
RpcResponse GetStudioModeStatus(const RpcRequest& request);
|
RpcResponse GetStudioModeStatus(const RpcRequest&);
|
||||||
RpcResponse GetPreviewScene(const RpcRequest& request);
|
RpcResponse GetPreviewScene(const RpcRequest&);
|
||||||
RpcResponse SetPreviewScene(const RpcRequest& request);
|
RpcResponse SetPreviewScene(const RpcRequest&);
|
||||||
RpcResponse TransitionToProgram(const RpcRequest& request);
|
RpcResponse TransitionToProgram(const RpcRequest&);
|
||||||
RpcResponse EnableStudioMode(const RpcRequest& request);
|
RpcResponse EnableStudioMode(const RpcRequest&);
|
||||||
RpcResponse DisableStudioMode(const RpcRequest& request);
|
RpcResponse DisableStudioMode(const RpcRequest&);
|
||||||
RpcResponse ToggleStudioMode(const RpcRequest& request);
|
RpcResponse ToggleStudioMode(const RpcRequest&);
|
||||||
|
|
||||||
RpcResponse SetTextGDIPlusProperties(const RpcRequest& request);
|
RpcResponse SetTextGDIPlusProperties(const RpcRequest&);
|
||||||
RpcResponse GetTextGDIPlusProperties(const RpcRequest& request);
|
RpcResponse GetTextGDIPlusProperties(const RpcRequest&);
|
||||||
|
|
||||||
RpcResponse SetTextFreetype2Properties(const RpcRequest& request);
|
RpcResponse SetTextFreetype2Properties(const RpcRequest&);
|
||||||
RpcResponse GetTextFreetype2Properties(const RpcRequest& request);
|
RpcResponse GetTextFreetype2Properties(const RpcRequest&);
|
||||||
|
|
||||||
RpcResponse SetBrowserSourceProperties(const RpcRequest& request);
|
RpcResponse SetBrowserSourceProperties(const RpcRequest&);
|
||||||
RpcResponse GetBrowserSourceProperties(const RpcRequest& request);
|
RpcResponse GetBrowserSourceProperties(const RpcRequest&);
|
||||||
|
|
||||||
RpcResponse ListOutputs(const RpcRequest& request);
|
RpcResponse ListOutputs(const RpcRequest&);
|
||||||
RpcResponse GetOutputInfo(const RpcRequest& request);
|
RpcResponse GetOutputInfo(const RpcRequest&);
|
||||||
RpcResponse StartOutput(const RpcRequest& request);
|
RpcResponse StartOutput(const RpcRequest&);
|
||||||
RpcResponse StopOutput(const RpcRequest& request);
|
RpcResponse StopOutput(const RpcRequest&);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user