Skip to content

fix: present Wayland subtitles on media clock - #1

Merged
Lowband21 merged 6 commits into
mainfrom
subwave/issue/LOW-464
Jun 19, 2026
Merged

fix: present Wayland subtitles on media clock#1
Lowband21 merged 6 commits into
mainfrom
subwave/issue/LOW-464

Conversation

@Lowband21

@Lowband21 Lowband21 commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

Wayland subtitles now present from media running time through a clean linear commit series on top of main. The branch keeps the manually-added follow-up fixes: HDR surface tagging, x-raw entity decoding, and PGS cue persistence until an explicit clear display set.

Changes

  • Avoids startup churn by treating zero-position opens as no explicit resume seek and keeping HTTP context values in GStreamer’s expected string form.
  • Adds media-clocked subtitle primitives: scheduler, PGS decoder, text renderer, and subtitle runtime payloads.
  • Tags HDR Wayland video surfaces with compositor color management while keeping subtitle surfaces in compositor-default sRGB.
  • Wires demuxer subtitle probes into scheduled Wayland text/PGS presentation without reintroducing playbin3 subtitleoverlay.
  • Decodes x-raw subtitle entities and preserves PGS cues until a normal clear display set arrives.

Testing

  • cargo fmt --all --check — passed.
  • Nix GStreamer shell: cargo test -p subwave_wayland subtitle_scheduler --all-features — passed, 10 tests.
  • Nix GStreamer shell: cargo test -p subwave_wayland pgs --all-features — passed, 8 tests.
  • Nix GStreamer shell: cargo test -p subwave_wayland subtitle_entities --all-features — passed, 1 test.
  • Manual Wayland playback QA was not run in this environment.

Treat a zero start position as no explicit resume target so opening from
the beginning does not issue a redundant flushing seek. Also keep HTTP
header context values in the string form GStreamer expects.
Add the media-time subtitle scheduler, PGS decoder, text renderer, and
Wayland subtitle runtime payload types used to queue decoded cues before
presenting them on UI ticks.
Bind wp-color-management-v1 when available, tag HDR video surfaces with
stream colorimetry, keep subtitle buffers in the compositor default sRGB
space, and keep subtitle subsurface commits synchronized with the parent.
Defer waylandsink display/window setup to the bus sync handler, keep
subtitle stream IDs out of playbin3 SelectStreams, schedule subtitle
presentation from demuxer probes, and resume only after the target seek
AsyncDone is observed.
@Lowband21
Lowband21 merged commit 4de8fd4 into main Jun 19, 2026
1 of 4 checks passed
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.

1 participant