diff --git a/src/Mimir.Runtime/MimirRuntime.cs b/src/Mimir.Runtime/MimirRuntime.cs index f2ee62b..15334a7 100644 --- a/src/Mimir.Runtime/MimirRuntime.cs +++ b/src/Mimir.Runtime/MimirRuntime.cs @@ -1220,7 +1220,10 @@ public sealed class MimirRuntime : IAquariumRuntime, IAquariumRuntimeServicesRec var frame = placement is { } value ? $"{value.CenterX:0.00},{value.CenterY:0.00} {value.Width:0.00}x{value.Height:0.00}" : "unplaced"; - return $"{(selected ? "* " : " ")}{feed.Layer + 1}. {feed.DisplayName} {frame}"; + var status = feed.Available + ? presentationControls.IncludesVideo(feed.SourceId) ? "live" : "hidden" + : "waiting"; + return $"{(selected ? "* " : " ")}{feed.Layer + 1}. {feed.DisplayName} {status} {frame}"; } private void SetSelectedVideoVisible(bool visible) @@ -1373,7 +1376,9 @@ public sealed class MimirRuntime : IAquariumRuntime, IAquariumRuntimeServicesRec var active = feeds .Where(feed => presentationControls.IncludesVideo(feed.SourceId)) .Select(feed => $"{feed.Layer + 1}:{feed.SourceId}@{feed.Opacity:0.00}"); - return string.Join(" | ", active.DefaultIfEmpty("black")); + var waiting = feeds.Count(feed => !feed.Available); + var summary = string.Join(" | ", active.DefaultIfEmpty("black")); + return waiting == 0 ? summary : $"{summary} / waiting {waiting}"; } private string DescribeProgramAudio() diff --git a/src/Mimir.Runtime/Synchronization/MimirPresentationControlState.cs b/src/Mimir.Runtime/Synchronization/MimirPresentationControlState.cs index 68d737d..d703b2b 100644 --- a/src/Mimir.Runtime/Synchronization/MimirPresentationControlState.cs +++ b/src/Mimir.Runtime/Synchronization/MimirPresentationControlState.cs @@ -87,6 +87,10 @@ public sealed class MimirVideoPresentationControl public bool Enabled { get; set; } = true; + public bool Available { get; private set; } + + public long SampleCount { get; private set; } + public bool Solo { get; set; } public float Opacity { get; set; } = 1.0f; @@ -100,6 +104,12 @@ public sealed class MimirVideoPresentationControl DisplayName = displayName; } } + + public void RefreshAvailability(bool available, long sampleCount) + { + Available = available; + SampleCount = Math.Max(0, sampleCount); + } } public sealed class MimirAudioPresentationControl @@ -116,6 +126,10 @@ public sealed class MimirAudioPresentationControl public bool Muted { get; set; } + public bool Available { get; private set; } + + public long SampleCount { get; private set; } + public bool Solo { get; set; } public float Gain { get; set; } = 1.0f; @@ -127,6 +141,12 @@ public sealed class MimirAudioPresentationControl DisplayName = displayName; } } + + public void RefreshAvailability(bool available, long sampleCount) + { + Available = available; + SampleCount = Math.Max(0, sampleCount); + } } public sealed record MimirPostprocessControlSnapshot( @@ -186,6 +206,7 @@ public sealed class MimirPresentationControlState } control.RefreshLabel(buffer.Descriptor.Label); + control.RefreshAvailability(buffer.Latest.HasValue, buffer.Count); continue; } @@ -198,6 +219,7 @@ public sealed class MimirPresentationControlState } control.RefreshLabel(buffer.Descriptor.Label); + control.RefreshAvailability(buffer.Latest.HasValue, buffer.Count); } } @@ -213,7 +235,7 @@ public sealed class MimirPresentationControlState } var hasSolo = video.Values.Any(feed => feed.Solo); - return hasSolo ? control.Solo : control.Enabled; + return control.Available && (hasSolo ? control.Solo : control.Enabled); } public float VideoOpacity(string sourceId) => diff --git a/src/Mimir.Well/Program.cs b/src/Mimir.Well/Program.cs index 8e78919..315b2dd 100644 --- a/src/Mimir.Well/Program.cs +++ b/src/Mimir.Well/Program.cs @@ -1004,6 +1004,9 @@ internal static class MimirWellCapturePage feed.SourceId, feed.DisplayName, feed.Enabled, + feed.Available, + feed.SampleCount, + Included = presentation.IncludesVideo(feed.SourceId), feed.Solo, feed.Opacity, feed.Layer, @@ -1618,6 +1621,9 @@ internal static class MimirWellSnapshot feed.SourceId, feed.DisplayName, feed.Enabled, + feed.Available, + feed.SampleCount, + Included = presentation.IncludesVideo(feed.SourceId), feed.Solo, feed.Opacity, feed.Layer, diff --git a/state/evidence.jsonl b/state/evidence.jsonl index ecfe91e..33a8262 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -370,3 +370,4 @@ {"ts": "2026-06-03T04:40:48+01:00", "type": "implementation", "status": "ok", "note": "2026-06-03: Source health and process-clock repair: FFmpeg/process/frame-event sources now use UTC arrival timestamps instead of Stopwatch-domain timestamps; Well sourceHealth distinguishes live, stalled, waiting-network, and waiting-device-samples. Live verification after restart reached repeated 6/6 Ready frames, while streamPressure exposed the next bottleneck: inline WebSocket body lane published ~66 MB across 53 Well snapshots at ~82 ms average publish cost."} {"ts": "2026-06-03T04:55:12+01:00", "type": "implementation", "status": "ok", "note": "Well live-loop stall was caused by inline complex-contour matched-filter analysis running inside the drinking/publish cadence. Mimir.Well now follows the app runtime authority: complex contour may be configured/published but only runs inline when MIMIR_COMPLEX_CONTOUR_RUNTIME_INLINE is truthy; otherwise it logs suppression and leaves the heavy decoder for a worker-owned path. Live verification in online-verse-daemons-20260602-233914 after restart reached seq 122->140 over ~4.4s with 6/6 Ready, publish avg <0.3 ms, zero dropped documents, and adaptive delay near 40 ms."} {"ts": "2026-06-03T05:10:12+01:00", "type": "observation", "status": "ok", "note": "Kiyo Pro source-health diagnosis: after stopping Well, direct native KS smoke through mimir_camera_capture.dll produced 0 frames for Kiyo Pro across 640x480 YUY2, 640x480 MJPG, and 1920x1080 MJPG, while Kiyo basic produced 107 frames in 3s through the same DLL. MF/GPU fallback probe hung under the live stack. Added source factory diagnostics to Well snapshots so Odin sees adapter/path/mode and starved KS-camera reason; live restart showed Kiyo Pro waiting-device-samples with reason 'KS camera opened but no frames...' for 640x480 YUY2, while Leap and Kiyo basic stayed live and Well held 6/6 Ready at 40 ms."} +{"ts": "2026-06-03T05:13:42+01:00", "type": "implementation", "status": "ok", "note": "Presentation availability cut: MimirPresentationControlState now keeps user Enabled/Solo intent separate from derived Available/SampleCount. IncludesVideo requires live samples, so configured-but-starved video sources no longer occupy program output. Live Well verification after restart showed Kiyo Pro, Raven display, and Eve camera available=false/included=false, while Leap and Kiyo basic were available=true/included=true and synchronized frame stayed 6/6 Ready at 40 ms."}