Revert "Video backend"

This reverts commit 4ffbb97abf.
This commit is contained in:
Aiden
2026-05-09 16:47:43 +10:00
parent 0c16665610
commit bc9aa6fbad
21 changed files with 275 additions and 512 deletions

View File

@@ -13,10 +13,10 @@ std::string NormalizeModeToken(const std::string& value)
return normalized;
}
bool ResolveConfiguredDeckLinkDisplayMode(const VideoIOModeConfiguration& mode, BMDDisplayMode& displayMode, std::string& displayModeName)
bool ResolveConfiguredDisplayMode(const std::string& videoFormat, const std::string& frameRate, BMDDisplayMode& displayMode, std::string& displayModeName)
{
DeckLinkVideoMode videoMode;
if (!ResolveConfiguredDeckLinkVideoMode(mode, videoMode))
VideoFormat videoMode;
if (!ResolveConfiguredVideoFormat(videoFormat, frameRate, videoMode))
return false;
displayMode = videoMode.displayMode;
@@ -24,10 +24,10 @@ bool ResolveConfiguredDeckLinkDisplayMode(const VideoIOModeConfiguration& mode,
return true;
}
bool ResolveConfiguredDeckLinkVideoMode(const VideoIOModeConfiguration& mode, DeckLinkVideoMode& videoMode)
bool ResolveConfiguredVideoFormat(const std::string& videoFormat, const std::string& frameRate, VideoFormat& videoMode)
{
const std::string formatToken = NormalizeModeToken(mode.videoFormat);
const std::string frameToken = NormalizeModeToken(mode.frameRate);
const std::string formatToken = NormalizeModeToken(videoFormat);
const std::string frameToken = NormalizeModeToken(frameRate);
const std::string combinedToken = formatToken + frameToken;
struct ModeOption
@@ -98,22 +98,25 @@ bool ResolveConfiguredDeckLinkVideoMode(const VideoIOModeConfiguration& mode, De
return false;
}
bool ResolveConfiguredDeckLinkVideoModes(
const VideoIOConfiguration& config,
DeckLinkVideoModeSelection& videoModes,
bool ResolveConfiguredVideoFormats(
const std::string& inputVideoFormat,
const std::string& inputFrameRate,
const std::string& outputVideoFormat,
const std::string& outputFrameRate,
VideoFormatSelection& videoModes,
std::string& error)
{
if (!ResolveConfiguredDeckLinkVideoMode(config.inputMode, videoModes.input))
if (!ResolveConfiguredVideoFormat(inputVideoFormat, inputFrameRate, videoModes.input))
{
error = "Unsupported DeckLink input mode in config/runtime-host.json: " +
config.inputMode.videoFormat + " / " + config.inputMode.frameRate;
error = "Unsupported DeckLink inputVideoFormat/inputFrameRate in config/runtime-host.json: " +
inputVideoFormat + " / " + inputFrameRate;
return false;
}
if (!ResolveConfiguredDeckLinkVideoMode(config.outputMode, videoModes.output))
if (!ResolveConfiguredVideoFormat(outputVideoFormat, outputFrameRate, videoModes.output))
{
error = "Unsupported DeckLink output mode in config/runtime-host.json: " +
config.outputMode.videoFormat + " / " + config.outputMode.frameRate;
error = "Unsupported DeckLink outputVideoFormat/outputFrameRate in config/runtime-host.json: " +
outputVideoFormat + " / " + outputFrameRate;
return false;
}