Skip to content

Commit

Permalink
Merge pull request #668 from Palakis/cleanup-for-v4.9.0
Browse files Browse the repository at this point in the history
Cleanup for v4.9.0
  • Loading branch information
Palakis authored Feb 4, 2021
2 parents b6ee6e9 + 212d1cb commit 4647312
Show file tree
Hide file tree
Showing 17 changed files with 227 additions and 225 deletions.
2 changes: 1 addition & 1 deletion CI/macos/obs-websocket.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
<key>OVERWRITE_PERMISSIONS</key>
<false/>
<key>VERSION</key>
<string>4.8.0</string>
<string>4.9.0</string>
</dict>
<key>PROJECT_COMMENTS</key>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(obs-websocket VERSION 4.8.0)
project(obs-websocket VERSION 4.9.0)

set(CMAKE_PREFIX_PATH "${QTDIR}")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down
2 changes: 1 addition & 1 deletion docs/partials/introduction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# obs-websocket 4.8.0 protocol reference
# obs-websocket 4.9.0 protocol reference

# General Introduction
Messages are exchanged between the client and the server as JSON objects.
Expand Down
2 changes: 1 addition & 1 deletion installer/installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "obs-websocket"
#define MyAppVersion "4.8.0"
#define MyAppVersion "4.9.0"
#define MyAppPublisher "Stephane Lepin"
#define MyAppURL "http://github.com/Palakis/obs-websocket"

Expand Down
22 changes: 11 additions & 11 deletions src/WSEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ void WSEvents::OnTransitionBegin(void* param, calldata_t* data) {

/**
* A transition (other than "cut") has ended.
* Please note that the `from-scene` field is not available in TransitionEnd.
* Note: The `from-scene` field is not available in TransitionEnd.
*
* @return {String} `name` Transition name.
* @return {String} `type` Transition type.
Expand Down Expand Up @@ -1208,7 +1208,7 @@ void WSEvents::OnSourceMuteStateChange(void* param, calldata_t* data) {
* @api events
* @name SourceAudioDeactivated
* @category sources
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnSourceAudioDeactivated(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1231,7 +1231,7 @@ void WSEvents::OnSourceAudioDeactivated(void* param, calldata_t* data) {
* @api events
* @name SourceAudioActivated
* @category sources
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnSourceAudioActivated(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand Down Expand Up @@ -1498,7 +1498,7 @@ void WSEvents::OnSourceFilterOrderChanged(void* param, calldata_t* data) {
* @api events
* @name MediaPlaying
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaPlaying(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1519,7 +1519,7 @@ void WSEvents::OnMediaPlaying(void* param, calldata_t* data) {
* @api events
* @name MediaPaused
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaPaused(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1540,7 +1540,7 @@ void WSEvents::OnMediaPaused(void* param, calldata_t* data) {
* @api events
* @name MediaRestarted
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaRestarted(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1561,7 +1561,7 @@ void WSEvents::OnMediaRestarted(void* param, calldata_t* data) {
* @api events
* @name MediaStopped
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaStopped(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1582,7 +1582,7 @@ void WSEvents::OnMediaStopped(void* param, calldata_t* data) {
* @api events
* @name MediaNext
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaNext(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1603,7 +1603,7 @@ void WSEvents::OnMediaNext(void* param, calldata_t* data) {
* @api events
* @name MediaPrevious
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaPrevious(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1624,7 +1624,7 @@ void WSEvents::OnMediaPrevious(void* param, calldata_t* data) {
* @api events
* @name MediaStarted
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaStarted(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand All @@ -1645,7 +1645,7 @@ void WSEvents::OnMediaStarted(void* param, calldata_t* data) {
* @api events
* @name MediaEnded
* @category media
* @since unreleased
* @since 4.9.0
*/
void WSEvents::OnMediaEnded(void* param, calldata_t* data) {
auto self = reinterpret_cast<WSEvents*>(param);
Expand Down
183 changes: 92 additions & 91 deletions src/WSRequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,101 +29,113 @@
using namespace std::placeholders;

const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap{
// Category: General
{ "GetVersion", &WSRequestHandler::GetVersion },
{ "GetAuthRequired", &WSRequestHandler::GetAuthRequired },
{ "Authenticate", &WSRequestHandler::Authenticate },

{ "GetStats", &WSRequestHandler::GetStats },
{ "SetHeartbeat", &WSRequestHandler::SetHeartbeat },
{ "GetVideoInfo", &WSRequestHandler::GetVideoInfo },
{ "OpenProjector", &WSRequestHandler::OpenProjector },

{ "SetFilenameFormatting", &WSRequestHandler::SetFilenameFormatting },
{ "GetFilenameFormatting", &WSRequestHandler::GetFilenameFormatting },

{ "GetStats", &WSRequestHandler::GetStats },
{ "BroadcastCustomMessage", &WSRequestHandler::BroadcastCustomMessage },

{ "GetVideoInfo", &WSRequestHandler::GetVideoInfo },
{ "OpenProjector", &WSRequestHandler::OpenProjector },
{ "TriggerHotkeyByName", &WSRequestHandler::TriggerHotkeyByName },
{ "TriggerHotkeyBySequence", &WSRequestHandler::TriggerHotkeyBySequence },

{ "ExecuteBatch", &WSRequestHandler::ExecuteBatch },

{ "SetCurrentScene", &WSRequestHandler::SetCurrentScene },
{ "GetCurrentScene", &WSRequestHandler::GetCurrentScene },
{ "GetSceneList", &WSRequestHandler::GetSceneList },
{ "CreateScene", &WSRequestHandler::CreateScene },
{ "SetSceneTransitionOverride", &WSRequestHandler::SetSceneTransitionOverride },
{ "RemoveSceneTransitionOverride", &WSRequestHandler::RemoveSceneTransitionOverride },
{ "GetSceneTransitionOverride", &WSRequestHandler::GetSceneTransitionOverride },

{ "SetSourceRender", &WSRequestHandler::SetSceneItemRender }, // Retrocompat
{ "GetSceneItemList", &WSRequestHandler::GetSceneItemList },
{ "SetSceneItemRender", &WSRequestHandler::SetSceneItemRender },
{ "SetSceneItemPosition", &WSRequestHandler::SetSceneItemPosition },
{ "SetSceneItemTransform", &WSRequestHandler::SetSceneItemTransform },
{ "SetSceneItemCrop", &WSRequestHandler::SetSceneItemCrop },
{ "GetSceneItemProperties", &WSRequestHandler::GetSceneItemProperties },
{ "SetSceneItemProperties", &WSRequestHandler::SetSceneItemProperties },
{ "ResetSceneItem", &WSRequestHandler::ResetSceneItem },
{ "DeleteSceneItem", &WSRequestHandler::DeleteSceneItem },
{ "AddSceneItem", &WSRequestHandler::AddSceneItem },
{ "DuplicateSceneItem", &WSRequestHandler::DuplicateSceneItem },
{ "ReorderSceneItems", &WSRequestHandler::ReorderSceneItems },
// Category: Media Control
{ "PlayPauseMedia", &WSRequestHandler::PlayPauseMedia },
{ "RestartMedia", &WSRequestHandler::RestartMedia },
{ "StopMedia", &WSRequestHandler::StopMedia },
{ "NextMedia", &WSRequestHandler::NextMedia },
{ "PreviousMedia", &WSRequestHandler::PreviousMedia },
{ "GetMediaDuration", &WSRequestHandler::GetMediaDuration },
{ "GetMediaTime", &WSRequestHandler::GetMediaTime },
{ "SetMediaTime", &WSRequestHandler::SetMediaTime },
{ "ScrubMedia", &WSRequestHandler::ScrubMedia },
{ "GetMediaState", &WSRequestHandler::GetMediaState },
{ "GetMediaSourcesList", &WSRequestHandler::GetMediaSourcesList },

{ "GetStreamingStatus", &WSRequestHandler::GetStreamingStatus },
{ "StartStopStreaming", &WSRequestHandler::StartStopStreaming },
{ "StartStopRecording", &WSRequestHandler::StartStopRecording },
// Category: Outputs
{ "ListOutputs", &WSRequestHandler::ListOutputs },
{ "GetOutputInfo", &WSRequestHandler::GetOutputInfo },
{ "StartOutput", &WSRequestHandler::StartOutput },
{ "StopOutput", &WSRequestHandler::StopOutput },

{ "StartStreaming", &WSRequestHandler::StartStreaming },
{ "StopStreaming", &WSRequestHandler::StopStreaming },
// Category: Profiles
{ "SetCurrentProfile", &WSRequestHandler::SetCurrentProfile },
{ "GetCurrentProfile", &WSRequestHandler::GetCurrentProfile },
{ "ListProfiles", &WSRequestHandler::ListProfiles },

// Category: Recording
{ "GetRecordingStatus", &WSRequestHandler::GetRecordingStatus },
{ "StartStopRecording", &WSRequestHandler::StartStopRecording },
{ "StartRecording", &WSRequestHandler::StartRecording },
{ "StopRecording", &WSRequestHandler::StopRecording },
{ "PauseRecording", &WSRequestHandler::PauseRecording },
{ "ResumeRecording", &WSRequestHandler::ResumeRecording },
{ "SetRecordingFolder", &WSRequestHandler::SetRecordingFolder },
{ "GetRecordingFolder", &WSRequestHandler::GetRecordingFolder },

// Category: Replay Buffer
{ "GetReplayBufferStatus", &WSRequestHandler::GetReplayBufferStatus },
{ "StartStopReplayBuffer", &WSRequestHandler::StartStopReplayBuffer },
{ "StartReplayBuffer", &WSRequestHandler::StartReplayBuffer },
{ "StopReplayBuffer", &WSRequestHandler::StopReplayBuffer },
{ "SaveReplayBuffer", &WSRequestHandler::SaveReplayBuffer },

{ "SetRecordingFolder", &WSRequestHandler::SetRecordingFolder },
{ "GetRecordingFolder", &WSRequestHandler::GetRecordingFolder },
// Category: Scene Collections
{ "SetCurrentSceneCollection", &WSRequestHandler::SetCurrentSceneCollection },
{ "GetCurrentSceneCollection", &WSRequestHandler::GetCurrentSceneCollection },
{ "ListSceneCollections", &WSRequestHandler::ListSceneCollections },

{ "GetTransitionList", &WSRequestHandler::GetTransitionList },
{ "GetCurrentTransition", &WSRequestHandler::GetCurrentTransition },
{ "SetCurrentTransition", &WSRequestHandler::SetCurrentTransition },
{ "SetTransitionDuration", &WSRequestHandler::SetTransitionDuration },
{ "GetTransitionDuration", &WSRequestHandler::GetTransitionDuration },
{ "GetTransitionPosition", &WSRequestHandler::GetTransitionPosition },
{ "GetTransitionSettings", &WSRequestHandler::GetTransitionSettings },
{ "SetTransitionSettings", &WSRequestHandler::SetTransitionSettings },
{ "ReleaseTBar", &WSRequestHandler::ReleaseTBar },
{ "SetTBarPosition", &WSRequestHandler::SetTBarPosition },
// Category: Scene Items
{ "GetSceneItemList", &WSRequestHandler::GetSceneItemList },
{ "GetSceneItemProperties", &WSRequestHandler::GetSceneItemProperties },
{ "SetSceneItemProperties", &WSRequestHandler::SetSceneItemProperties },
{ "ResetSceneItem", &WSRequestHandler::ResetSceneItem },
{ "SetSceneItemRender", &WSRequestHandler::SetSceneItemRender },
{ "SetSceneItemPosition", &WSRequestHandler::SetSceneItemPosition },
{ "SetSceneItemTransform", &WSRequestHandler::SetSceneItemTransform },
{ "SetSceneItemCrop", &WSRequestHandler::SetSceneItemCrop },
{ "SetSourceRender", &WSRequestHandler::SetSceneItemRender }, // Retrocompat TODO: Remove in 5.0.0
{ "DeleteSceneItem", &WSRequestHandler::DeleteSceneItem },
{ "AddSceneItem", &WSRequestHandler::AddSceneItem },
{ "DuplicateSceneItem", &WSRequestHandler::DuplicateSceneItem },

// Category: Scenes
{ "SetCurrentScene", &WSRequestHandler::SetCurrentScene },
{ "GetCurrentScene", &WSRequestHandler::GetCurrentScene },
{ "GetSceneList", &WSRequestHandler::GetSceneList },
{ "CreateScene", &WSRequestHandler::CreateScene },
{ "ReorderSceneItems", &WSRequestHandler::ReorderSceneItems },
{ "SetSceneTransitionOverride", &WSRequestHandler::SetSceneTransitionOverride },
{ "RemoveSceneTransitionOverride", &WSRequestHandler::RemoveSceneTransitionOverride },
{ "GetSceneTransitionOverride", &WSRequestHandler::GetSceneTransitionOverride },

// Category: Sources
{ "CreateSource", &WSRequestHandler::CreateSource },
{ "SetVolume", &WSRequestHandler::SetVolume },
{ "GetSourcesList", &WSRequestHandler::GetSourcesList },
{ "GetSourceTypesList", &WSRequestHandler::GetSourceTypesList },
{ "GetVolume", &WSRequestHandler::GetVolume },
{ "ToggleMute", &WSRequestHandler::ToggleMute },
{ "SetMute", &WSRequestHandler::SetMute },
{ "SetVolume", &WSRequestHandler::SetVolume },
{ "GetMute", &WSRequestHandler::GetMute },
{ "SetMute", &WSRequestHandler::SetMute },
{ "ToggleMute", &WSRequestHandler::ToggleMute },
{ "GetAudioActive", &WSRequestHandler::GetAudioActive },
{ "SetSourceName", &WSRequestHandler::SetSourceName },
{ "SetSyncOffset", &WSRequestHandler::SetSyncOffset },
{ "GetSyncOffset", &WSRequestHandler::GetSyncOffset },
{ "GetSpecialSources", &WSRequestHandler::GetSpecialSources },
{ "GetSourcesList", &WSRequestHandler::GetSourcesList },
{ "GetSourceTypesList", &WSRequestHandler::GetSourceTypesList },
{ "GetSourceSettings", &WSRequestHandler::GetSourceSettings },
{ "SetSourceSettings", &WSRequestHandler::SetSourceSettings },
{ "GetAudioMonitorType", &WSRequestHandler::GetAudioMonitorType },
{ "SetAudioMonitorType", &WSRequestHandler::SetAudioMonitorType },
{ "GetSourceDefaultSettings", &WSRequestHandler::GetSourceDefaultSettings },
{ "TakeSourceScreenshot", &WSRequestHandler::TakeSourceScreenshot },
{ "RefreshBrowserSource", &WSRequestHandler::RefreshBrowserSource },

{ "GetTextGDIPlusProperties", &WSRequestHandler::GetTextGDIPlusProperties },
{ "SetTextGDIPlusProperties", &WSRequestHandler::SetTextGDIPlusProperties },
{ "GetTextFreetype2Properties", &WSRequestHandler::GetTextFreetype2Properties },
{ "SetTextFreetype2Properties", &WSRequestHandler::SetTextFreetype2Properties },
{ "GetBrowserSourceProperties", &WSRequestHandler::GetBrowserSourceProperties },
{ "SetBrowserSourceProperties", &WSRequestHandler::SetBrowserSourceProperties },
{ "GetSpecialSources", &WSRequestHandler::GetSpecialSources },
{ "GetSourceFilters", &WSRequestHandler::GetSourceFilters },
{ "GetSourceFilterInfo", &WSRequestHandler::GetSourceFilterInfo },
{ "AddFilterToSource", &WSRequestHandler::AddFilterToSource },
Expand All @@ -132,20 +144,23 @@ const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap{
{ "MoveSourceFilter", &WSRequestHandler::MoveSourceFilter },
{ "SetSourceFilterSettings", &WSRequestHandler::SetSourceFilterSettings },
{ "SetSourceFilterVisibility", &WSRequestHandler::SetSourceFilterVisibility },
{ "GetAudioMonitorType", &WSRequestHandler::GetAudioMonitorType },
{ "SetAudioMonitorType", &WSRequestHandler::SetAudioMonitorType },
{ "GetSourceDefaultSettings", &WSRequestHandler::GetSourceDefaultSettings },
{ "TakeSourceScreenshot", &WSRequestHandler::TakeSourceScreenshot },
{ "RefreshBrowserSource", &WSRequestHandler::RefreshBrowserSource },

{ "SetCurrentSceneCollection", &WSRequestHandler::SetCurrentSceneCollection },
{ "GetCurrentSceneCollection", &WSRequestHandler::GetCurrentSceneCollection },
{ "ListSceneCollections", &WSRequestHandler::ListSceneCollections },

{ "SetCurrentProfile", &WSRequestHandler::SetCurrentProfile },
{ "GetCurrentProfile", &WSRequestHandler::GetCurrentProfile },
{ "ListProfiles", &WSRequestHandler::ListProfiles },

// Category: Streaming
{ "GetStreamingStatus", &WSRequestHandler::GetStreamingStatus },
{ "StartStopStreaming", &WSRequestHandler::StartStopStreaming },
{ "StartStreaming", &WSRequestHandler::StartStreaming },
{ "StopStreaming", &WSRequestHandler::StopStreaming },
{ "SetStreamSettings", &WSRequestHandler::SetStreamSettings },
{ "GetStreamSettings", &WSRequestHandler::GetStreamSettings },
{ "SaveStreamSettings", &WSRequestHandler::SaveStreamSettings },
{ "SendCaptions", &WSRequestHandler::SendCaptions },

// Category: Studio Mode
{ "GetStudioModeStatus", &WSRequestHandler::GetStudioModeStatus },
{ "GetPreviewScene", &WSRequestHandler::GetPreviewScene },
{ "SetPreviewScene", &WSRequestHandler::SetPreviewScene },
Expand All @@ -154,31 +169,17 @@ const QHash<QString, RpcMethodHandler> WSRequestHandler::messageMap{
{ "DisableStudioMode", &WSRequestHandler::DisableStudioMode },
{ "ToggleStudioMode", &WSRequestHandler::ToggleStudioMode },

{ "SetTextGDIPlusProperties", &WSRequestHandler::SetTextGDIPlusProperties },
{ "GetTextGDIPlusProperties", &WSRequestHandler::GetTextGDIPlusProperties },

{ "SetTextFreetype2Properties", &WSRequestHandler::SetTextFreetype2Properties },
{ "GetTextFreetype2Properties", &WSRequestHandler::GetTextFreetype2Properties },

{ "GetBrowserSourceProperties", &WSRequestHandler::GetBrowserSourceProperties },
{ "SetBrowserSourceProperties", &WSRequestHandler::SetBrowserSourceProperties },

{ "ListOutputs", &WSRequestHandler::ListOutputs },
{ "GetOutputInfo", &WSRequestHandler::GetOutputInfo },
{ "StartOutput", &WSRequestHandler::StartOutput },
{ "StopOutput", &WSRequestHandler::StopOutput },

{ "PlayPauseMedia", &WSRequestHandler::PlayPauseMedia },
{ "RestartMedia", &WSRequestHandler::RestartMedia },
{ "StopMedia", &WSRequestHandler::StopMedia },
{ "NextMedia", &WSRequestHandler::NextMedia },
{ "PreviousMedia", &WSRequestHandler::PreviousMedia },
{ "GetMediaDuration", &WSRequestHandler::GetMediaDuration },
{ "GetMediaTime", &WSRequestHandler::GetMediaTime },
{ "SetMediaTime", &WSRequestHandler::SetMediaTime },
{ "ScrubMedia", &WSRequestHandler::ScrubMedia },
{ "GetMediaState", &WSRequestHandler::GetMediaState },
{ "GetMediaSourcesList", &WSRequestHandler::GetMediaSourcesList }
// Category: Transitions
{ "GetTransitionList", &WSRequestHandler::GetTransitionList },
{ "GetCurrentTransition", &WSRequestHandler::GetCurrentTransition },
{ "SetCurrentTransition", &WSRequestHandler::SetCurrentTransition },
{ "SetTransitionDuration", &WSRequestHandler::SetTransitionDuration },
{ "GetTransitionDuration", &WSRequestHandler::GetTransitionDuration },
{ "GetTransitionPosition", &WSRequestHandler::GetTransitionPosition },
{ "GetTransitionSettings", &WSRequestHandler::GetTransitionSettings },
{ "SetTransitionSettings", &WSRequestHandler::SetTransitionSettings },
{ "ReleaseTBar", &WSRequestHandler::ReleaseTBar },
{ "SetTBarPosition", &WSRequestHandler::SetTBarPosition }
};

const QSet<QString> WSRequestHandler::authNotRequired {
Expand Down
Loading

0 comments on commit 4647312

Please sign in to comment.