{
  "schema": "sync-platform-parity-matrix-v1",
  "generatedDate": "2026-09-18",
  "platforms": {
    "macos": {
      "os": "macOS 12.3+",
      "videoDriver": "CoreMediaIO System Extension (SyncCamera.systemextension)",
      "audioDriver": "CoreAudio AudioHAL / AudioUnit",
      "status": "Production Qualified"
    },
    "windows": {
      "os": "Windows 11 (Build 22000+)",
      "videoDriver": "Media Foundation Virtual Camera (SyncCamera.dll) + DirectShow KS Proxy",
      "audioDriver": "WASAPI (Windows Audio Session API)",
      "status": "Architecture Parity Verified, Camera E2E Passed"
    }
  },
  "dimensions": [
    {
      "dimension": "Virtual Camera Framework",
      "macos": "CoreMediaIO Extension (CMIOExtensionProviderSource / CMIOExtensionStreamSource)",
      "windows": "Media Foundation Virtual Camera (IMFMediaSourceEx / IMFMediaStream2 via MFCreateVirtualCamera)",
      "parity": "Full Parity",
      "notes": "Both use modern non-kernel user-mode driver frameworks supported by their respective OS vendors."
    },
    {
      "dimension": "Driver Host Process Model",
      "macos": "Out-of-process sandboxed system extension helper (com.apple.cmio.registerassistantservice)",
      "windows": "In-process COM DLL (SyncCamera.dll) loaded by Windows Camera Frame Server (FSCS.exe, Local Service)",
      "parity": "Architectural Parity",
      "notes": "macOS uses XPC; Windows uses Windows Camera Frame Server RPC and COM activator loading."
    },
    {
      "dimension": "DirectShow Application Compatibility",
      "macos": "N/A (macOS uses AVFoundation and CoreMediaIO DAL)",
      "windows": "Automatic bridging via Windows Kernel Streaming proxy (ksproxy.ax / CLSID_VideoInputDeviceCategory)",
      "parity": "Windows Advantage",
      "notes": "Exposes camera to legacy DirectShow consumers (OBS, TouchDesigner, Zoom) without custom filter."
    },
    {
      "dimension": "Native Video Formats",
      "macos": "1920x1080@60fps kCMPixelFormat_32BGRA (Full range 0-255)",
      "windows": "1920x1080@60fps MFVideoFormat_NV12 (BT.709 Studio range 16-235, default) and MFVideoFormat_RGB32 (Full range 0-255)",
      "parity": "Full Parity",
      "notes": "Windows supports dual format negotiation, providing NV12 for hardware decoders and RGB32 for graphics."
    },
    {
      "dimension": "Color Space and Matrix Conversion",
      "macos": "Native BGRA passthrough to CoreMediaIO; conversion handled by consumer GPU/CoreVideo",
      "windows": "Fixed-point 16.16 BT.709 studio range conversion with 2x2 box-filtered chroma subsampling in SyncCamera.dll",
      "parity": "Full Parity",
      "notes": "Matrix and nominal range explicitly declared via MF_MT_YUV_MATRIX and MF_MT_VIDEO_NOMINAL_RANGE."
    },
    {
      "dimension": "Inter-Process Video Buffer Handoff",
      "macos": "CoreMediaIO Sink Stream IPC (cmio_camera_sink.mm)",
      "windows": "3-slot lock-free shared memory ring buffer (Local\\io.noisefactor.sync.camera.frame.v1)",
      "parity": "Full Parity",
      "notes": "Both achieve zero-copy / single-copy frame handoff with sequence-based atomics."
    },
    {
      "dimension": "Demand-Driven Backpressure & Power Saving",
      "macos": "CMIO client connection sensing / start-stop stream events",
      "windows": "Atomic 64-bit microsecond demand heartbeat (record_demand) on RequestSample with 1.0s timeout",
      "parity": "Full Parity",
      "notes": "Daemon suspends rendering and pixel conversion when no camera consumers are active."
    },
    {
      "dimension": "Stream Drop & Disconnect Relay Policy",
      "macos": "CameraRelayPolicy (grace period + pre-rendered waiting card fallback)",
      "windows": "CameraRelayPolicy (grace period + pre-rendered waiting card fallback)",
      "parity": "Identical Implementation",
      "notes": "Both share the exact same C++ CameraRelayPolicy implementation and idle card asset."
    },
    {
      "dimension": "Audio Capture Backend",
      "macos": "CoreAudio AudioHAL / AudioUnit via RtAudio (MACOSX_CORE)",
      "windows": "WASAPI Shared-Mode / Exclusive-Mode via RtAudio (WINDOWS_WASAPI)",
      "parity": "Full Parity",
      "notes": "Both use low-latency native OS audio engines with discrete multichannel routing."
    },
    {
      "dimension": "Audio Channel Capacity",
      "macos": "Up to 32 discrete channels (float32 PCM, 48 kHz standard)",
      "windows": "Up to 32 discrete channels (float32 PCM, 48 kHz standard)",
      "parity": "Identical Implementation",
      "notes": "Capped at kMaximumChannels = 32 with float32 circular ring buffering."
    },
    {
      "dimension": "Audio Security & Permissions",
      "macos": "TCC microphone permission dialog via AVCaptureDevice authorization",
      "windows": "Windows CapabilityAccessManager / App privacy settings (Microphone access)",
      "parity": "Full Parity",
      "notes": "macOS prompts explicitly; Windows enforces user privacy toggle at audio client open."
    },
    {
      "dimension": "Hardware Capture Buffer Mechanics",
      "macos": "Non-blocking hardware callback pushing into 4,096-frame circular lock-free buffer",
      "windows": "Event-driven IAudioClient buffer callback pushing into 4,096-frame circular lock-free buffer",
      "parity": "Identical Implementation",
      "notes": "Both latch immediate failure on RTAUDIO_INPUT_OVERFLOW to guarantee stream continuity."
    },
    {
      "dimension": "End-to-End Test Automation",
      "macos": "sync_camera_tests, sync_cmio_camera_sink_tests, paired AVFoundation/Chromium E2E (600s)",
      "windows": "sync_virtual_camera_e2e_tests, sync_camera_capability_probe, sync_camera_delivered_probe",
      "parity": "Camera Parity Verified; Audio Hardware Gap",
      "notes": "Windows camera passes E2E in CI; audio capture requires connected hardware interface."
    }
  ]
}
