From cec8b76f615b16e956961cd67fd5d80dc4a4f637 Mon Sep 17 00:00:00 2001 From: Aiden Date: Fri, 22 May 2026 16:31:49 +1000 Subject: [PATCH] schema settings --- .vscode/settings.json | 11 ++ config/runtime-host.json | 1 + config/runtime-host.schema.json | 210 ++++++++++++++++++++++++++++++++ 3 files changed, 222 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 config/runtime-host.schema.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7c30d57 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "json.schemas": [ + { + "fileMatch": [ + "/config/runtime-host.json", + "/config/runtime-host.*.json" + ], + "url": "./config/runtime-host.schema.json" + } + ] +} diff --git a/config/runtime-host.json b/config/runtime-host.json index 019a5ac..1e35151 100644 --- a/config/runtime-host.json +++ b/config/runtime-host.json @@ -1,4 +1,5 @@ { + "$schema": "./runtime-host.schema.json", "shaderLibrary": "shaders", "serverPort": 8080, "oscBindAddress": "0.0.0.0", diff --git a/config/runtime-host.schema.json b/config/runtime-host.schema.json new file mode 100644 index 0000000..434c361 --- /dev/null +++ b/config/runtime-host.schema.json @@ -0,0 +1,210 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://render-cadence.local/schemas/runtime-host.schema.json", + "title": "Render Cadence Runtime Host Configuration", + "description": "Startup configuration for the Render Cadence native host. This schema documents the settings currently read by AppConfigProvider.", + "type": "object", + "additionalProperties": false, + "properties": { + "$schema": { + "type": "string", + "description": "Editor-only schema reference. The native host ignores this field." + }, + "shaderLibrary": { + "type": "string", + "default": "shaders", + "description": "Path to the shader package library directory. Relative paths are resolved from the process/repo working location." + }, + "serverPort": { + "type": "integer", + "minimum": 1, + "maximum": 65535, + "default": 8080, + "description": "Preferred HTTP control server port." + }, + "oscBindAddress": { + "type": "string", + "default": "0.0.0.0", + "description": "OSC bind address reserved for the control surface. The current native host exposes this in state but does not start the OSC listener yet." + }, + "oscPort": { + "type": "integer", + "minimum": 1, + "maximum": 65535, + "default": 9000, + "description": "OSC UDP port reserved for the control surface." + }, + "oscSmoothing": { + "type": "number", + "minimum": 0, + "default": 0.18, + "description": "Reserved OSC smoothing amount exposed in runtime state." + }, + "input": { + "$ref": "#/$defs/input" + }, + "output": { + "$ref": "#/$defs/output" + }, + "autoReload": { + "type": "boolean", + "default": true, + "description": "When true, the runtime control layer may automatically rescan/reload shader packages when requested by the app flow." + }, + "maxTemporalHistoryFrames": { + "type": "integer", + "minimum": 0, + "default": 12, + "description": "Maximum temporal history frames exposed to shaders that request history." + }, + "previewEnabled": { + "type": "boolean", + "default": false, + "description": "Starts the optional preview window on its own thread." + }, + "previewFps": { + "type": "number", + "exclusiveMinimum": 0, + "default": 59.94, + "description": "Target repaint rate for the optional preview window. It does not change render/output cadence." + } + }, + "required": [ + "shaderLibrary", + "serverPort", + "input", + "output" + ], + "$defs": { + "inputBackend": { + "type": "string", + "enum": [ + "decklink", + "ndi", + "none", + "disabled", + "off" + ] + }, + "outputBackend": { + "type": "string", + "enum": [ + "decklink", + "none", + "disabled", + "off" + ] + }, + "resolution": { + "type": "string", + "enum": [ + "720p", + "1080i", + "1080p", + "2160p", + "4k", + "uhd" + ] + }, + "frameRate": { + "type": "string", + "enum": [ + "23.98", + "24", + "25", + "29.97", + "30", + "50", + "59.94", + "60" + ] + }, + "input": { + "type": "object", + "additionalProperties": false, + "description": "Video input backend configuration. DeckLink uses the configured resolution/frameRate as a capture mode. NDI adapts to the received source shape and logs if it differs from these expected values.", + "properties": { + "backend": { + "$ref": "#/$defs/inputBackend", + "default": "decklink", + "description": "Input backend. Use 'decklink' for Blackmagic capture, 'ndi' for NDI receive, or 'none'/'disabled'/'off' for black fallback input." + }, + "device": { + "type": "string", + "default": "default", + "description": "Input device/source selector. DeckLink currently uses 'default'. NDI accepts 'default'/'auto' for the first discovered source or an exact NDI source name." + }, + "resolution": { + "$ref": "#/$defs/resolution", + "default": "1080p", + "description": "Expected input resolution/mode. For NDI this is advisory only; received source dimensions are used." + }, + "frameRate": { + "$ref": "#/$defs/frameRate", + "default": "59.94", + "description": "Expected input frame rate. DeckLink uses this to resolve the hardware mode; NDI currently treats it as an expectation for logging/state." + } + }, + "required": [ + "backend", + "device", + "resolution", + "frameRate" + ] + }, + "output": { + "type": "object", + "additionalProperties": false, + "description": "Video output backend configuration. NDI output is not implemented yet; use DeckLink or disable output.", + "properties": { + "backend": { + "$ref": "#/$defs/outputBackend", + "default": "decklink", + "description": "Output backend. Currently 'decklink' and disabled aliases are supported. 'ndi' is reserved for future output work and will be rejected as unsupported at runtime today." + }, + "device": { + "type": "string", + "default": "default", + "description": "Output device selector. DeckLink currently uses the first compatible/default output device." + }, + "resolution": { + "$ref": "#/$defs/resolution", + "default": "1080p", + "description": "Output render and video mode resolution." + }, + "frameRate": { + "$ref": "#/$defs/frameRate", + "default": "59.94", + "description": "Output render cadence and video mode frame rate." + }, + "keying": { + "type": "object", + "additionalProperties": false, + "description": "DeckLink keying options.", + "properties": { + "external": { + "type": "boolean", + "default": false, + "description": "Requests DeckLink external keying when the selected output device supports it." + }, + "alphaRequired": { + "type": "boolean", + "default": false, + "description": "Requires alpha-capable output format support during DeckLink output setup." + } + }, + "required": [ + "external", + "alphaRequired" + ] + } + }, + "required": [ + "backend", + "device", + "resolution", + "frameRate" + ] + } + } +}