fix: fall back to main when substream playback fails - #33
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Summary
A Hikvision NVR channel returns RTSP 404 on substream while main stream works. Linux kiosks currently retry the failed substream without trying main. This change swaps only the affected tile to its configured main stream after an explicit playback error (on the next one-second status tick), or ten seconds without video.
Fallback is remembered per display and camera for the current layout visit, logged without stream URLs, and indicated by the M badge. A real layout switch clears that display's fallback decisions and retries substream. The shared pipeline pool keeps fallback main streams warm; other displays can continue using substream. Main failures retain existing recovery behavior without oscillating between streams. No camera configuration is changed, and fallback requires distinct configured main/sub URLs.
Validation
Independent of the unrelated layout-refresh fix in #32. This addresses Linux playback; Android already has a separate fallback implementation.