Skip to content

osn-replay-buffer: invoke output handler to save replays#1689

Merged
sandboxcoder merged 3 commits intostagingfrom
rno/replayBuffer-save
May 6, 2026
Merged

osn-replay-buffer: invoke output handler to save replays#1689
sandboxcoder merged 3 commits intostagingfrom
rno/replayBuffer-save

Conversation

@sandboxcoder
Copy link
Copy Markdown
Contributor

@sandboxcoder sandboxcoder commented May 6, 2026

Description

  • makes test more reliable resulting in much less replay buffer failures on the slower CI machines
  • follows similar pattern used by OBS - ReplayBufferSave
  • enable this test for MacOS now that it is more reliable

The previous approach can silently do nothing if:

  • The hotkey type check (OBS_HOTKEY_REGISTERER_OUTPUT) doesn't match
  • if no routed callback is registered, the save is a no-op
  • The hotkey hasn't been registered yet (possible race condition on slow CI machines)

Motivation and Context

Improve consistency of replay buffer save unit test

How Has This Been Tested?

Ran it on build machine a lot of times and did not observe this test fail. Also tested in Desktop and verified replays save properly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

* makes test more reliable resulting in much less replay buffer failures
on the slower CI machines

* follows similar pattern used by OBS - ReplayBufferSave
@sandboxcoder sandboxcoder changed the title osn-replay-buffer: invoke output handler to save osn-replay-buffer: invoke output handler to save replays May 6, 2026
@sandboxcoder sandboxcoder requested a review from Copilot May 6, 2026 17:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the replay-buffer save implementation to invoke the underlying OBS output proc handler directly (rather than routing through a hotkey callback), with the goal of making replay saves—and the corresponding unit test—more reliable on slower CI machines. It also enables the advanced replay-buffer tests on macOS by removing the Darwin skip.

Changes:

  • Reworked IReplayBuffer::Save to locate the replay buffer output and call its proc handler "save".
  • Removed macOS skips for the two advanced replay-buffer start/save test cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/osn-tests/src/test_osn_advanced_replayBuffer.ts Enables advanced replay-buffer tests on macOS by removing Darwin skips.
obs-studio-server/source/osn-replay-buffer.cpp Implements replay save via the OBS output proc handler ("save") on the replay buffer output instance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread obs-studio-server/source/osn-replay-buffer.cpp Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sandboxcoder sandboxcoder merged commit e0d4c05 into staging May 6, 2026
36 of 39 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.

3 participants