intial phase 1 subsytem split
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m31s
CI / Windows Release Package (push) Successful in 2m32s

This commit is contained in:
Aiden
2026-05-10 23:03:15 +10:00
parent 618831d578
commit 3629227aa9
12 changed files with 348 additions and 61 deletions

View File

@@ -0,0 +1,41 @@
#include "RuntimeSnapshotProvider.h"
RuntimeSnapshotProvider::RuntimeSnapshotProvider(RuntimeHost& runtimeHost) :
mRuntimeHost(runtimeHost)
{
}
bool RuntimeSnapshotProvider::BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error) const
{
return mRuntimeHost.BuildLayerPassFragmentShaderSources(layerId, passSources, error);
}
std::vector<RuntimeRenderState> RuntimeSnapshotProvider::GetLayerRenderStates(unsigned outputWidth, unsigned outputHeight) const
{
return mRuntimeHost.GetLayerRenderStates(outputWidth, outputHeight);
}
bool RuntimeSnapshotProvider::TryGetLayerRenderStates(unsigned outputWidth, unsigned outputHeight, std::vector<RuntimeRenderState>& states) const
{
return mRuntimeHost.TryGetLayerRenderStates(outputWidth, outputHeight, states);
}
bool RuntimeSnapshotProvider::TryRefreshCachedLayerStates(std::vector<RuntimeRenderState>& states) const
{
return mRuntimeHost.TryRefreshCachedLayerStates(states);
}
void RuntimeSnapshotProvider::RefreshDynamicRenderStateFields(std::vector<RuntimeRenderState>& states) const
{
mRuntimeHost.RefreshDynamicRenderStateFields(states);
}
uint64_t RuntimeSnapshotProvider::GetRenderStateVersion() const
{
return mRuntimeHost.GetRenderStateVersion();
}
uint64_t RuntimeSnapshotProvider::GetParameterStateVersion() const
{
return mRuntimeHost.GetParameterStateVersion();
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include "RuntimeHost.h"
#include <cstdint>
#include <string>
#include <vector>
class RuntimeSnapshotProvider
{
public:
explicit RuntimeSnapshotProvider(RuntimeHost& runtimeHost);
bool BuildLayerPassFragmentShaderSources(const std::string& layerId, std::vector<ShaderPassBuildSource>& passSources, std::string& error) const;
std::vector<RuntimeRenderState> GetLayerRenderStates(unsigned outputWidth, unsigned outputHeight) const;
bool TryGetLayerRenderStates(unsigned outputWidth, unsigned outputHeight, std::vector<RuntimeRenderState>& states) const;
bool TryRefreshCachedLayerStates(std::vector<RuntimeRenderState>& states) const;
void RefreshDynamicRenderStateFields(std::vector<RuntimeRenderState>& states) const;
uint64_t GetRenderStateVersion() const;
uint64_t GetParameterStateVersion() const;
private:
RuntimeHost& mRuntimeHost;
};

View File

@@ -0,0 +1,161 @@
#include "RuntimeStore.h"
RuntimeStore::RuntimeStore(RuntimeHost& runtimeHost) :
mRuntimeHost(runtimeHost)
{
}
bool RuntimeStore::Initialize(std::string& error)
{
return mRuntimeHost.Initialize(error);
}
bool RuntimeStore::AddLayer(const std::string& shaderId, std::string& error)
{
return mRuntimeHost.AddLayer(shaderId, error);
}
bool RuntimeStore::RemoveLayer(const std::string& layerId, std::string& error)
{
return mRuntimeHost.RemoveLayer(layerId, error);
}
bool RuntimeStore::MoveLayer(const std::string& layerId, int direction, std::string& error)
{
return mRuntimeHost.MoveLayer(layerId, direction, error);
}
bool RuntimeStore::MoveLayerToIndex(const std::string& layerId, std::size_t targetIndex, std::string& error)
{
return mRuntimeHost.MoveLayerToIndex(layerId, targetIndex, error);
}
bool RuntimeStore::SetLayerBypass(const std::string& layerId, bool bypassed, std::string& error)
{
return mRuntimeHost.SetLayerBypass(layerId, bypassed, error);
}
bool RuntimeStore::SetLayerShader(const std::string& layerId, const std::string& shaderId, std::string& error)
{
return mRuntimeHost.SetLayerShader(layerId, shaderId, error);
}
bool RuntimeStore::UpdateLayerParameter(const std::string& layerId, const std::string& parameterId, const JsonValue& newValue, std::string& error)
{
return mRuntimeHost.UpdateLayerParameter(layerId, parameterId, newValue, error);
}
bool RuntimeStore::UpdateLayerParameterByControlKey(const std::string& layerKey, const std::string& parameterKey, const JsonValue& newValue, std::string& error)
{
return mRuntimeHost.UpdateLayerParameterByControlKey(layerKey, parameterKey, newValue, error);
}
bool RuntimeStore::UpdateLayerParameterByControlKey(const std::string& layerKey, const std::string& parameterKey, const JsonValue& newValue, bool persistState, std::string& error)
{
return mRuntimeHost.UpdateLayerParameterByControlKey(layerKey, parameterKey, newValue, persistState, error);
}
bool RuntimeStore::ResetLayerParameters(const std::string& layerId, std::string& error)
{
return mRuntimeHost.ResetLayerParameters(layerId, error);
}
bool RuntimeStore::SaveStackPreset(const std::string& presetName, std::string& error) const
{
return mRuntimeHost.SaveStackPreset(presetName, error);
}
bool RuntimeStore::LoadStackPreset(const std::string& presetName, std::string& error)
{
return mRuntimeHost.LoadStackPreset(presetName, error);
}
std::string RuntimeStore::BuildStateJson() const
{
return mRuntimeHost.BuildStateJson();
}
const std::filesystem::path& RuntimeStore::GetRepoRoot() const
{
return mRuntimeHost.GetRepoRoot();
}
const std::filesystem::path& RuntimeStore::GetUiRoot() const
{
return mRuntimeHost.GetUiRoot();
}
const std::filesystem::path& RuntimeStore::GetDocsRoot() const
{
return mRuntimeHost.GetDocsRoot();
}
const std::filesystem::path& RuntimeStore::GetRuntimeRoot() const
{
return mRuntimeHost.GetRuntimeRoot();
}
unsigned short RuntimeStore::GetServerPort() const
{
return mRuntimeHost.GetServerPort();
}
unsigned short RuntimeStore::GetOscPort() const
{
return mRuntimeHost.GetOscPort();
}
const std::string& RuntimeStore::GetOscBindAddress() const
{
return mRuntimeHost.GetOscBindAddress();
}
double RuntimeStore::GetOscSmoothing() const
{
return mRuntimeHost.GetOscSmoothing();
}
unsigned RuntimeStore::GetMaxTemporalHistoryFrames() const
{
return mRuntimeHost.GetMaxTemporalHistoryFrames();
}
unsigned RuntimeStore::GetPreviewFps() const
{
return mRuntimeHost.GetPreviewFps();
}
bool RuntimeStore::ExternalKeyingEnabled() const
{
return mRuntimeHost.ExternalKeyingEnabled();
}
const std::string& RuntimeStore::GetInputVideoFormat() const
{
return mRuntimeHost.GetInputVideoFormat();
}
const std::string& RuntimeStore::GetInputFrameRate() const
{
return mRuntimeHost.GetInputFrameRate();
}
const std::string& RuntimeStore::GetOutputVideoFormat() const
{
return mRuntimeHost.GetOutputVideoFormat();
}
const std::string& RuntimeStore::GetOutputFrameRate() const
{
return mRuntimeHost.GetOutputFrameRate();
}
void RuntimeStore::SetCompileStatus(bool succeeded, const std::string& message)
{
mRuntimeHost.SetCompileStatus(succeeded, message);
}
void RuntimeStore::ClearReloadRequest()
{
mRuntimeHost.ClearReloadRequest();
}

View File

@@ -0,0 +1,51 @@
#pragma once
#include "RuntimeHost.h"
#include <filesystem>
#include <string>
class RuntimeStore
{
public:
explicit RuntimeStore(RuntimeHost& runtimeHost);
bool Initialize(std::string& error);
bool AddLayer(const std::string& shaderId, std::string& error);
bool RemoveLayer(const std::string& layerId, std::string& error);
bool MoveLayer(const std::string& layerId, int direction, std::string& error);
bool MoveLayerToIndex(const std::string& layerId, std::size_t targetIndex, std::string& error);
bool SetLayerBypass(const std::string& layerId, bool bypassed, std::string& error);
bool SetLayerShader(const std::string& layerId, const std::string& shaderId, std::string& error);
bool UpdateLayerParameter(const std::string& layerId, const std::string& parameterId, const JsonValue& newValue, std::string& error);
bool UpdateLayerParameterByControlKey(const std::string& layerKey, const std::string& parameterKey, const JsonValue& newValue, std::string& error);
bool UpdateLayerParameterByControlKey(const std::string& layerKey, const std::string& parameterKey, const JsonValue& newValue, bool persistState, std::string& error);
bool ResetLayerParameters(const std::string& layerId, std::string& error);
bool SaveStackPreset(const std::string& presetName, std::string& error) const;
bool LoadStackPreset(const std::string& presetName, std::string& error);
std::string BuildStateJson() const;
const std::filesystem::path& GetRepoRoot() const;
const std::filesystem::path& GetUiRoot() const;
const std::filesystem::path& GetDocsRoot() const;
const std::filesystem::path& GetRuntimeRoot() const;
unsigned short GetServerPort() const;
unsigned short GetOscPort() const;
const std::string& GetOscBindAddress() const;
double GetOscSmoothing() const;
unsigned GetMaxTemporalHistoryFrames() const;
unsigned GetPreviewFps() const;
bool ExternalKeyingEnabled() const;
const std::string& GetInputVideoFormat() const;
const std::string& GetInputFrameRate() const;
const std::string& GetOutputVideoFormat() const;
const std::string& GetOutputFrameRate() const;
void SetCompileStatus(bool succeeded, const std::string& message);
void ClearReloadRequest();
private:
RuntimeHost& mRuntimeHost;
};