config cleanup
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Failing after 2m30s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
2026-05-22 16:05:40 +10:00
parent 2058f94193
commit e006fcc6ee
17 changed files with 238 additions and 133 deletions

View File

@@ -31,17 +31,26 @@ std::filesystem::path WriteConfigFixture()
<< " \"oscBindAddress\": \"127.0.0.1\",\n"
<< " \"oscPort\": 9100,\n"
<< " \"oscSmoothing\": 0.25,\n"
<< " \"inputVideoFormat\": \"720p\",\n"
<< " \"inputFrameRate\": \"50\",\n"
<< " \"outputVideoFormat\": \"2160p\",\n"
<< " \"outputFrameRate\": \"60\",\n"
<< " \"videoInputBackend\": \"none\",\n"
<< " \"videoOutputBackend\": \"decklink\",\n"
<< " \"input\": {\n"
<< " \"backend\": \"none\",\n"
<< " \"device\": \"input-card-1\",\n"
<< " \"resolution\": \"720p\",\n"
<< " \"frameRate\": \"50\"\n"
<< " },\n"
<< " \"output\": {\n"
<< " \"backend\": \"decklink\",\n"
<< " \"device\": \"output-card-1\",\n"
<< " \"resolution\": \"2160p\",\n"
<< " \"frameRate\": \"60\",\n"
<< " \"keying\": {\n"
<< " \"external\": true,\n"
<< " \"alphaRequired\": true\n"
<< " }\n"
<< " },\n"
<< " \"autoReload\": false,\n"
<< " \"maxTemporalHistoryFrames\": 8,\n"
<< " \"previewEnabled\": true,\n"
<< " \"previewFps\": 24,\n"
<< " \"enableExternalKeying\": true\n"
<< " \"previewFps\": 24\n"
<< "}\n";
return path;
}
@@ -64,17 +73,20 @@ void TestLoadsRuntimeHostConfig()
Expect(config.oscBindAddress == "127.0.0.1", "OSC bind address loads");
Expect(config.oscPort == 9100, "OSC port loads");
Expect(config.oscSmoothing == 0.25, "OSC smoothing loads");
Expect(config.inputVideoFormat == "720p", "input format loads");
Expect(config.inputFrameRate == "50", "input frame rate loads");
Expect(config.outputVideoFormat == "2160p", "output format loads");
Expect(config.outputFrameRate == "60", "output frame rate loads");
Expect(config.videoInputBackend == "none", "video input backend loads");
Expect(config.videoOutputBackend == "decklink", "video output backend loads");
Expect(config.input.resolution == "720p", "input resolution loads");
Expect(config.input.frameRate == "50", "input frame rate loads");
Expect(config.input.device == "input-card-1", "input device loads");
Expect(config.output.resolution == "2160p", "output resolution loads");
Expect(config.output.frameRate == "60", "output frame rate loads");
Expect(config.output.device == "output-card-1", "output device loads");
Expect(config.input.backend == "none", "video input backend loads");
Expect(config.output.backend == "decklink", "video output backend loads");
Expect(!config.autoReload, "auto reload loads");
Expect(config.maxTemporalHistoryFrames == 8, "history length loads");
Expect(config.previewEnabled, "preview enabled toggle loads");
Expect(config.previewFps == 24.0, "preview fps loads");
Expect(config.deckLink.externalKeyingEnabled, "external keying loads");
Expect(config.output.externalKeyingEnabled, "external keying loads");
Expect(config.output.outputAlphaRequired, "output alpha requirement loads");
std::filesystem::remove(path);
}

View File

@@ -38,8 +38,8 @@ void WriteFile(const std::filesystem::path& path, const std::string& contents)
int main()
{
RenderCadenceCompositor::AppConfig config = RenderCadenceCompositor::DefaultAppConfig();
config.outputVideoFormat = "1080p";
config.outputFrameRate = "59.94";
config.output.resolution = "1080p";
config.output.frameRate = "59.94";
RenderCadenceCompositor::CadenceTelemetrySnapshot telemetry;
telemetry.renderFps = 59.94;
@@ -117,8 +117,8 @@ int main()
ExpectContains(json, "\"type\":\"color\"", "state JSON should serialize parameter types for the UI");
ExpectContains(json, "\"width\":1920", "state JSON should expose output width");
ExpectContains(json, "\"height\":1080", "state JSON should expose output height");
ExpectContains(json, "\"videoInputBackend\":\"decklink\"", "state JSON should expose input backend");
ExpectContains(json, "\"videoOutputBackend\":\"decklink\"", "state JSON should expose output backend");
ExpectContains(json, "\"input\":{\"backend\":\"decklink\",\"device\":\"default\",\"resolution\":\"1080p\",\"frameRate\":\"59.94\"}", "state JSON should expose nested input config");
ExpectContains(json, "\"output\":{\"backend\":\"decklink\",\"device\":\"default\",\"resolution\":\"1080p\",\"frameRate\":\"59.94\",\"keying\"", "state JSON should expose nested output config");
ExpectContains(json, "\"videoOutput\":{\"enabled\":true,\"backend\":\"decklink\"", "state JSON should expose neutral video output status");
ExpectContains(json, "\"scheduleFailures\":2", "state JSON should expose neutral video output schedule failures");
ExpectContains(json, "\"backendMetrics\":{\"bufferedAvailable\":true,\"buffered\":4", "state JSON should expose backend-specific video output metrics");