Doc cleanup
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user