How p-rer/nodevideoeffects works
Project type and purpose
• NodeVideoEffects is a modular, node-based video-effects editor and runtime built with C# and WPF.
• It provides an API for defining “ports” and “nodes,” a Core engine to load and execute nodes, WPF controls and an editor UI, sets of built-in video-processing nodes (including HLSL shaders), a test harness (UITest), and an auto-updater.
Top-level components
A. API Layer
– Project: NodeVideoEffects.API
– Contains base abstractions: PortControlBase, PortValueBase, ShaderEffectNodeBase, etc.
B. Core Engine
– Project: NodeVideoEffects.Core
– Manages NodeInfo, NodeLogic, NodesManager, VideoEffectsLoader (discovers and loads nodes/shaders).
C. Node Definitions
– Project: NodeVideoEffects.Nodes (subfolders: Basic, Composite, Effect, Math)
– Concrete node implementations; each compiles against the API.
D. Shader Assets
– Folder: NodeVideoEffects.Shader
– HLSL files and ShaderCompiler.bat to generate .cso files used by Effect nodes.
E. UI Controls
– Project: NodeVideoEffects.Control
– WPF UserControls for each port type (BoolPort, ColorPort, NumberPort, etc.).
F. Node Editor
– Project: NodeVideoEffects.Editor
– WPF canvas, Node.xaml, Connector.xaml, NodeExplorer; follows MVVM-ish pattern.
G. Host Application
– Project: NodeVideoEffects (MainWindow, dockable panels, log viewer, menu, plugin bootstrap).
H. Utility Services
– Project: NodeVideoEffects.Utility
– Logger, ResourceLoader, TaskTracker, Text resources.
I. Updater Service
– Project: NodeVideoEffects.Updater
– WPF front-end for checking/download/install updates; calls NodeVideoEffects.UpdaterService.
J. UI Test Harness
– Project: NodeVideoEffects.UITest
– Simplified WPF app to test controls and editor in isolation.
Relationships and interactions
• The Host Application references Core, Editor, Control, Utility, API, and Updater.
• The Editor UI uses Control (port controls) and Core (to enumerate available nodes, execute logic).
• Core loads Node modules dynamically (reflection) and pulls in compiled shaders from the Shader folder.
• Node modules depend on API definitions only.
• Utility classes are injected or statically consumed by Core, Editor, and Host for logging and resource loading.
• The Updater communicates over HTTP (external service) to check for new versions; triggers Host restart.
• The UITest app references Control, Core, Editor, API to sandbox the editor/controls without the full Host.
Architectural patterns and principles
• Modular, plugin-style architecture (loose coupling via API interfaces, dynamic loading).
• Layered separation: API → Core → Host/UI → External (shaders, network).
• MVVM influences in Editor (XAML views, code-behind partially MVVM).
• Single Responsibility per project.