Skip to content

fix: fall back to main when substream playback fails - #33

Merged
mrinc merged 1 commit into
masterfrom
fix/substream-fallback
Sep 23, 2026
Merged

mrinc merged 1 commit into
masterfrom
fix/substream-fallback

Conversation

@bcbetterninja

Copy link
Copy Markdown
Contributor

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

  • All 34 Rust core tests pass, including fallback eligibility, immediate errors, stall timeout, and no repeated attempt after fallback.
  • git diff --check passes; commit signature verified.
  • Full Linux cargo check is blocked by missing GLib/GTK/GStreamer development libraries.
  • Physical kiosk playback and layout-switch recovery still need testing; opening as draft.

Independent of the unrelated layout-refresh fix in #32. This addresses Linux playback; Android already has a separate fallback implementation.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3a1362a2-a4e9-4e8b-984c-07772924bbf7


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bcbetterninja
bcbetterninja marked this pull request as ready for review September 23, 2026 22:59
@bcbetterninja

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: d6fec92bc3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@mrinc
mrinc merged commit 77a7631 into master Sep 23, 2026
10 checks passed
@mrinc
mrinc deleted the fix/substream-fallback branch September 23, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants