optional preview frame
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "RuntimeLayerController.h"
|
||||
#include "../logging/Logger.h"
|
||||
#include "../control/RuntimeStateJson.h"
|
||||
#include "../preview/PreviewWindowThread.h"
|
||||
#include "../telemetry/TelemetryHealthMonitor.h"
|
||||
#include "../video/DeckLinkInput.h"
|
||||
#include "../video/DeckLinkOutput.h"
|
||||
@@ -94,6 +95,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
StartPreviewWindow();
|
||||
StartOptionalVideoOutput();
|
||||
mTelemetryHealth.Start(mFrameExchange, mOutput, mOutputThread, mRenderThread);
|
||||
StartHttpServer();
|
||||
@@ -106,6 +108,7 @@ public:
|
||||
{
|
||||
mHttpServer.Stop();
|
||||
mTelemetryHealth.Stop();
|
||||
mPreviewWindow.Stop();
|
||||
mOutputThread.Stop();
|
||||
mOutput.Stop();
|
||||
mRuntimeLayers.Stop();
|
||||
@@ -228,6 +231,24 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void StartPreviewWindow()
|
||||
{
|
||||
if (!mConfig.previewEnabled)
|
||||
return;
|
||||
|
||||
PreviewWindowConfig previewConfig;
|
||||
previewConfig.enabled = true;
|
||||
previewConfig.fps = mConfig.previewFps;
|
||||
std::string error;
|
||||
if (mPreviewWindow.Start(mFrameExchange, previewConfig, error))
|
||||
{
|
||||
Log("preview", "Preview window thread started.");
|
||||
return;
|
||||
}
|
||||
|
||||
LogWarning("preview", "Preview window did not start: " + error);
|
||||
}
|
||||
|
||||
std::string BuildStateJson()
|
||||
{
|
||||
CadenceTelemetrySnapshot telemetry = mHttpTelemetry.Sample(mFrameExchange, mOutput, mOutputThread, mRenderThread);
|
||||
@@ -281,6 +302,7 @@ private:
|
||||
TelemetryHealthMonitor mTelemetryHealth;
|
||||
CadenceTelemetry mHttpTelemetry;
|
||||
HttpControlServer mHttpServer;
|
||||
PreviewWindowThread mPreviewWindow;
|
||||
RuntimeLayerController mRuntimeLayers;
|
||||
std::function<DeckLinkInputMetrics()> mDeckLinkInputMetricsProvider;
|
||||
uint64_t mLastInputCapturedFrames = 0;
|
||||
|
||||
Reference in New Issue
Block a user