OSC stubs
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "RuntimeLayerController.h"
|
||||
#include "../logging/Logger.h"
|
||||
#include "../control/RuntimeStateJson.h"
|
||||
#include "../control/osc/OscControlServer.h"
|
||||
#include "../json/JsonWriter.h"
|
||||
#include "../preview/PreviewWindowThread.h"
|
||||
#include "../telemetry/TelemetryHealthMonitor.h"
|
||||
@@ -115,6 +116,7 @@ public:
|
||||
StartPreviewWindow();
|
||||
StartOptionalVideoOutput();
|
||||
mTelemetryHealth.Start(mFrameExchange, *mOutput, mOutputThread, mRenderThread);
|
||||
StartOscServer();
|
||||
StartHttpServer();
|
||||
Log("app", "RenderCadenceCompositor started.");
|
||||
mStarted = true;
|
||||
@@ -124,6 +126,7 @@ public:
|
||||
void Stop()
|
||||
{
|
||||
mHttpServer.Stop();
|
||||
mOscServer.Stop();
|
||||
mTelemetryHealth.Stop();
|
||||
mPreviewWindow.Stop();
|
||||
mOutputThread.Stop();
|
||||
@@ -325,10 +328,29 @@ private:
|
||||
mVideoOutputEnabled,
|
||||
mVideoOutputStatus,
|
||||
mRuntimeLayers.ShaderCatalog(),
|
||||
layerSnapshot
|
||||
layerSnapshot,
|
||||
&mOscServer.State()
|
||||
});
|
||||
}
|
||||
|
||||
void StartOscServer()
|
||||
{
|
||||
OscControlServerConfig oscConfig;
|
||||
oscConfig.bindAddress = mConfig.oscBindAddress;
|
||||
oscConfig.port = mConfig.oscPort;
|
||||
oscConfig.smoothing = mConfig.oscSmoothing;
|
||||
|
||||
std::string error;
|
||||
if (!mOscServer.Start(oscConfig, error))
|
||||
{
|
||||
LogWarning("osc", "OSC control stub did not start: " + error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mOscServer.State().statusMessage.empty())
|
||||
Log("osc", mOscServer.State().statusMessage);
|
||||
}
|
||||
|
||||
std::string BuildConfigJson() const
|
||||
{
|
||||
AppConfig diskConfig = mConfig;
|
||||
@@ -442,6 +464,7 @@ private:
|
||||
TelemetryHealthMonitor mTelemetryHealth;
|
||||
CadenceTelemetry mHttpTelemetry;
|
||||
HttpControlServer mHttpServer;
|
||||
OscControlServer mOscServer;
|
||||
PreviewWindowThread mPreviewWindow;
|
||||
RuntimeLayerController mRuntimeLayers;
|
||||
std::function<VideoInputEdgeMetrics()> mVideoInputMetricsProvider;
|
||||
|
||||
Reference in New Issue
Block a user