fix linux bambu liveview decoder sink #523

Open
opened 2026-04-05 16:22:11 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @thomashenauer on 3/1/2026

Description

Related issue: #9280 (Linux Bambu liveview stream stops after a few seconds).

This PR improves Linux Bambu liveview stability by tightening decoder selection behavior and sink timing configuration for jitter-prone RTSP streams.

What this PR changes

In Linux wxMediaCtrl2.cpp:

  • marks Bambu playback context on the decode path
  • adds decoder autoplug filtering hooks for uridecodebin / decodebin
  • in Bambu context:
    • prefers software decode (avdec_h264) when available
    • avoids hard-blocking decode candidates when software decode is unavailable (keeps fallback path open)
  • applies sink timing settings for liveview robustness:
    • sync=false
    • qos=false
    • max-lateness=-1

Why this approach

  • scoped to Linux Bambu liveview only (no global decoder policy change)
  • addresses the observed Linux instability while minimizing impact to unrelated playback paths
  • preserves startup behavior in environments where avdec_h264 is not installed
  • improves tolerance to RTSP timing jitter/freezes without changing protocol handling

Expected result

  • fewer early liveview freezes/stalls on Linux
  • no black-screen regression from over-restrictive decoder filtering
  • improved continuity on Bambu H2D/X1C liveview in tested setups

Screenshots/Recordings/Graphs

N/A (runtime pipeline behavior change).

Tests

Date tested: March 1, 2026
Platform: Arch Linux, kernel 6.18.13-arch1-1, GStreamer 1.28.1.

Build/test status

  • Full project build: passed
  • Automated tests: 146/146 passed

Functional verification

  • Verified liveview start/stop/re-enable behavior on both Bambu H2D and X1C.
  • Verified decode path behavior with software decoder available.
  • Verified fallback behavior when software decoder is unavailable (gst-libav removed): stream still starts and hardware decode path is used.
  • Verified sink timing flags are applied and liveview remains stable under repeated stream control actions.

Notes / known limitation

  • In no-software-decoder environments, decode-path warnings may still appear depending on GPU/memory negotiation.
  • This PR does not redesign GStreamer memory negotiation; it focuses on safe decoder choice and robust sink timing behavior.
*Originally created by @thomashenauer on 3/1/2026* # Description Related issue: #9280 (Linux Bambu liveview stream stops after a few seconds). This PR improves Linux Bambu liveview stability by tightening decoder selection behavior and sink timing configuration for jitter-prone RTSP streams. ## What this PR changes In Linux `wxMediaCtrl2.cpp`: - marks Bambu playback context on the decode path - adds decoder autoplug filtering hooks for `uridecodebin` / `decodebin` - in Bambu context: - prefers software decode (`avdec_h264`) when available - avoids hard-blocking decode candidates when software decode is unavailable (keeps fallback path open) - applies sink timing settings for liveview robustness: - `sync=false` - `qos=false` - `max-lateness=-1` ## Why this approach - scoped to Linux Bambu liveview only (no global decoder policy change) - addresses the observed Linux instability while minimizing impact to unrelated playback paths - preserves startup behavior in environments where `avdec_h264` is not installed - improves tolerance to RTSP timing jitter/freezes without changing protocol handling ## Expected result - fewer early liveview freezes/stalls on Linux - no black-screen regression from over-restrictive decoder filtering - improved continuity on Bambu H2D/X1C liveview in tested setups # Screenshots/Recordings/Graphs N/A (runtime pipeline behavior change). ## Tests Date tested: March 1, 2026 Platform: Arch Linux, kernel 6.18.13-arch1-1, GStreamer 1.28.1. ### Build/test status - Full project build: passed - Automated tests: 146/146 passed ### Functional verification - Verified liveview start/stop/re-enable behavior on both Bambu H2D and X1C. - Verified decode path behavior with software decoder available. - Verified fallback behavior when software decoder is unavailable (`gst-libav` removed): stream still starts and hardware decode path is used. - Verified sink timing flags are applied and liveview remains stable under repeated stream control actions. ### Notes / known limitation - In no-software-decoder environments, decode-path warnings may still appear depending on GPU/memory negotiation. - This PR does not redesign GStreamer memory negotiation; it focuses on safe decoder choice and robust sink timing behavior.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#523