Skip to content

Fix seamless Media Playlist Source playback with dual media sources - #60

Open
Vencite wants to merge 5 commits into
CodeYan01:masterfrom
Vencite:pr/seamless-playback
Open

Fix seamless Media Playlist Source playback with dual media sources#60
Vencite wants to merge 5 commits into
CodeYan01:masterfrom
Vencite:pr/seamless-playback

Conversation

@Vencite

@Vencite Vencite commented Aug 30, 2026

Copy link
Copy Markdown

Fixes #59

Summary

Media Playlist Source could become invisible or render a blank/transparent frame when changing to another playlist file. This PR implements seamless dual-source playback.

Root cause

The single internal ffmpeg_source cleared its output to NULL before media_ended, so the parent could render a transparent/blank frame during a file change.

Solution

  • Maintain two private Media Sources (A/B).
  • Preload the next local video on the standby source.
  • Perform the hard cut only after the new decoder is ready and a preloaded frame is available.
  • Keep audio ownership tied to the active source/generation.
  • Apply latest-request-wins behavior for rapid Next/Previous requests.
  • Bound handling of invalid media.
  • Fix bootstrap lifecycle and active-child enumeration so hidden standby sources are activated when the parent becomes visible.

Compatibility

The change preserves the existing public source ID, persisted settings keys, playlist controls, and scene collection compatibility.

Tests

  • Coordinator unit tests via CTest.
  • Ubuntu build.
  • Final PR branch 6d4124b verified by GitHub Actions on Ubuntu, Windows and macOS.
  • Runtime testing of the implemented playback fix on OBS 32.2.2 for macOS, including a production Mac.
  • Runtime testing was performed on 26abc4e; the implementation was then carried into this clean PR branch. The exact final commit 6d4124b passed the full GitHub Actions CI/build verification.

Manual regression coverage

The manual regression checklist is included in tests/manual-regression.md and covers:

  • startup directly on a playlist scene;
  • startup on another scene followed by activating the playlist scene;
  • leaving and returning to an initialized playlist;
  • STOP_RESTART, PAUSE_UNPAUSE, ALWAYS_PLAY and STOP_PLAY_NEXT;
  • Restart Current while a Next transition is pending;
  • duplicate audio/decoder prevention;
  • natural seamless A→B playback.

@Vencite Vencite closed this Aug 31, 2026
@Vencite
Vencite deleted the pr/seamless-playback branch August 31, 2026 10:52
@Vencite
Vencite restored the pr/seamless-playback branch August 31, 2026 10:54
@Vencite Vencite reopened this Aug 31, 2026
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.

On File Change, Source Becomes Invisible

1 participant