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