feat: add webcam frame diagnostics to debug gray block issue

Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
2026-09-12 10:32:18 -07:00
parent 58050d9ab1
commit 992bb21bdb
2 changed files with 17 additions and 2 deletions
+10 -2
View File
@@ -317,8 +317,16 @@ public sealed class MediaCaptureFrameSource : ICameraFrameSource
}
// MediaCapture video carries no alpha plane — the OS fills 255.
FrameAvailable?.Invoke(new VideoFrame(bitmap.PixelWidth, bitmap.PixelHeight, pixels)
{ IsOpaque = true, Epoch = ++_epoch });
var frame = new VideoFrame(bitmap.PixelWidth, bitmap.PixelHeight, pixels)
{ IsOpaque = true, Epoch = ++_epoch };
// Diagnostic: Log frame properties for compositor debugging
if ((now - _lastAlphaProbe).TotalSeconds >= 5.0)
{
AppLog.Write($"Webcam frame emit: {frame.Width}x{frame.Height}, IsOpaque={frame.IsOpaque}, Epoch={frame.Epoch}");
}
FrameAvailable?.Invoke(frame);
}
}
catch (Exception ex)