Doc cleanup
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m49s
CI / Windows Release Package (push) Successful in 3m8s

This commit is contained in:
Aiden
2026-05-12 01:37:20 +10:00
parent 709d3d3fa4
commit 2531d871e8
17 changed files with 594 additions and 5461 deletions

View File

@@ -8,6 +8,7 @@
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <windows.h>
@@ -19,7 +20,8 @@ VideoBackend::VideoBackend(RenderEngine& renderEngine, HealthTelemetry& healthTe
mOutputProductionController(mPlayoutPolicy),
mReadyOutputQueue(mPlayoutPolicy),
mVideoIODevice(std::make_unique<DeckLinkSession>()),
mBridge(std::make_unique<OpenGLVideoIOBridge>(renderEngine))
mBridge(std::make_unique<OpenGLVideoIOBridge>(renderEngine)),
mInputCaptureDisabled(IsEnvironmentFlagEnabled("VST_DISABLE_INPUT_CAPTURE"))
{
}
@@ -69,6 +71,12 @@ bool VideoBackend::ConfigureInput(const VideoFormat& inputVideoMode, std::string
{
if (mLifecycle.State() != VideoBackendLifecycleState::Configuring)
ApplyLifecycleTransition(VideoBackendLifecycleState::Configuring, "Configuring video backend input.");
if (mInputCaptureDisabled)
{
MutableState().hasInputSource = false;
MutableState().statusMessage = "DeckLink input capture disabled by VST_DISABLE_INPUT_CAPTURE for output timing isolation.";
return true;
}
if (!mVideoIODevice->ConfigureInput(
[this](const VideoIOFrame& frame) { HandleInputFrame(frame); },
inputVideoMode,
@@ -127,7 +135,7 @@ bool VideoBackend::Start()
return false;
}
if (!mVideoIODevice->StartInputStreams())
if (!mInputCaptureDisabled && !mVideoIODevice->StartInputStreams())
{
StopOutputProducerWorker();
StopOutputCompletionWorker();
@@ -198,6 +206,8 @@ bool VideoBackend::HasInputDevice() const
bool VideoBackend::HasInputSource() const
{
if (mInputCaptureDisabled)
return false;
return mVideoIODevice->HasInputSource();
}
@@ -311,6 +321,9 @@ void VideoBackend::ReportNoInputDeviceSignalStatus()
void VideoBackend::HandleInputFrame(const VideoIOFrame& frame)
{
if (mInputCaptureDisabled)
return;
const VideoIOState& state = mVideoIODevice->State();
mHealthTelemetry.TryReportSignalStatus(!frame.hasNoInputSource, state.inputFrameSize.width, state.inputFrameSize.height, state.inputDisplayModeName);
PublishInputSignalChanged(frame, state);
@@ -1065,3 +1078,18 @@ std::string VideoBackend::PixelFormatName(VideoIOPixelFormat pixelFormat)
{
return std::string(VideoIOPixelFormatName(pixelFormat));
}
bool VideoBackend::IsEnvironmentFlagEnabled(const char* name)
{
if (name == nullptr || name[0] == '\0')
return false;
char* value = nullptr;
std::size_t valueSize = 0;
if (_dupenv_s(&value, &valueSize, name) != 0 || value == nullptr)
return false;
const std::string flag(value);
std::free(value);
return flag == "1" || flag == "true" || flag == "TRUE" || flag == "yes" || flag == "on";
}

View File

@@ -101,6 +101,7 @@ private:
void PublishTimingSample(const std::string& subsystem, const std::string& metric, double value, const std::string& unit);
static std::string CompletionResultName(VideoIOCompletionResult result);
static std::string PixelFormatName(VideoIOPixelFormat pixelFormat);
static bool IsEnvironmentFlagEnabled(const char* name);
HealthTelemetry& mHealthTelemetry;
RuntimeEventDispatcher& mRuntimeEventDispatcher;
@@ -128,6 +129,7 @@ private:
bool mOutputCompletionWorkerStopping = false;
bool mOutputProducerWorkerRunning = false;
bool mOutputProducerWorkerStopping = false;
bool mInputCaptureDisabled = false;
uint64_t mNextReadyOutputFrameIndex = 0;
uint64_t mInputFrameIndex = 0;
uint64_t mOutputFrameScheduleIndex = 0;