How rikupin1105/sportscoder_for_volleyball works
Project Type and Purpose
• This is a Windows desktop application built with .NET (WPF + MVVM) called “SportsCoder for Volleyball,” designed to capture and judge volleyball plays in real time.
• It includes a supporting .NET wrapper library (NDILibDotNet2) for the NDI (Network Device Interface) SDK to send/receive video streams over the network, plus a WAP project for Microsoft Store packaging.
File-Structure Analysis
• Top-level solution (SportsCoderForVolleyball.sln) contains three subprojects:
• NDILibDotNet2 — a class-library that P/Invokes into the native NDI SDK.
• SportsCoderForVolleyball — the WPF/MVVM application (Views, ViewModels, Models, Converters).
• WapProj — a UWP wrapper for appx packaging and Store deployment.
• Configuration & packaging files: .csproj (build), Package.appxmanifest, WapProj.wapproj.
• Documentation under docs/ describes commands, manual, judgement logic, and FAQs.
Architectural Patterns and Major Components
a. MVVM Layers in SportsCoderForVolleyball
• Views: XAML files (MainWindow, ScoreBoard, ControlWindow, Dialogs)
• ViewModels: orchestrate UI state and user commands (MainWindowViewModel, ScoreBoardViewModel, etc.)
• Models: domain entities (Game, Point, Control, Option, Data)
• Converters: IValueConverter implementations to adapt Models → Views
b. NDI Integration Layer
• NDILibDotNet2 library:
• AudioFrame.cs, VideoFrame.cs – managed wrappers
• Finder, Sender, Source, Router classes – high-level managed APIs
• Pinvoke folder – C# bindings for native Processing.NDI.*.dll
c. Packaging Layer
• WapProj: bundles the WPF app for Microsoft Store distribution.
Interactions and Data Flows
• UI (Views) ←→ ViewModels: two-way data binding, commands trigger ViewModel methods
• ViewModels → Models: update game state, track points, options
• ViewModels call NDILibDotNet2 APIs to send and receive video/audio frames over the network
• NDILibDotNet2 uses P/Invoke to the native NDI SDK and handles discovery (Finder), streaming (Sender/Source), routing.
• Packaging project does not participate at runtime but encapsulates the WPF app for deployment.
• Clear labels for every component and project name (NDILibDotNet2, SportsCoderForVolleyball, WapProj).