Skip to content

obs-outputs: module host behind obs-outputs-host.h, portable bit helpers and min_size (#851) - #2096

Merged
zackees merged 4 commits into
masterfrom
facade/851-core
Oct 24, 2026
Merged

zackees merged 4 commits into
masterfrom
facade/851-core

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Fixes #851 (slice 3 of 3: obs-outputs.c.h, obs-outputs.pch.h, mp4-mux-internal.h, utils.h). Stacked on #2092 (which is on #2076); rebased onto master as they land.

  • obs-outputs-host.h + obs-outputs-host-{windows,posix}.c.h: Winsock start/stop and the mbedtls MBEDTLS_THREADING_ALT critical-section mutexes move verbatim to the Windows host; POSIX load/unload do nothing. Own groups/PCHs; winsock2.h/mbedtls/threading.h leave the shared PCH.
  • utils.h: the _MSC_VER intrinsics branch is dropped. GCC/Clang/clang-cl keep the builtins; plain MSVC uses the portable popcount fallback already there (correct for every input, defined at 0).
  • mp4-mux-internal.h: the non-Windows min() (Windows got min from windows.h) becomes min_size() everywhere; its one caller is updated.
  • Cross check: both module host groups. Baseline: no plugins/obs-outputs entries left.

RED: e15405f adds test_obs_outputs_host (Tier 2: POSIX load/unload; clz32/ctz32 across bit positions); fails to build.
GREEN: next commit. Locally all test_obs_outputs_*, test_rtmp_*, test_mp4_* pass; cross win-x64 + mac-arm64 compile. Local-only failures are the same native-core canvas/shutdown/audio tests and test_deinterlace_2x_field_order, plus test_output_end_capture_thread_join (libobs, compiles no obs-outputs source).

Tiers 1/3/4 n/a (C restructuring, no behavior change).

@zackees

zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

Coordinator: Windows Tier 2 fails to compile. plugins/obs-outputs/utils.h(38,21): warning C4146: unary minus operator applied to unsigned type, result still unsigned is promoted to an error by C2220, in test_mp4_mux_multichannel and test_mp4_split_time (run 40077366177, job 120824619195). This PR is what makes those tests reach utils.h on Windows, so the fix belongs here, either a signed cast or 0 - x.

@zackees
zackees added this pull request to the merge queue Oct 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 24, 2026
@zackees

zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

Coordinator: this is CONFLICTING now that #2092 landed. The only conflict is test/cmocka/test_obs_outputs_rtmp_host.c in test_no_socket_loop: master has assert_false(rtmp_host_has_socket_loop());, and this branch's copy of commit dde618a ("test: obs-outputs RTMP output POSIX host") doesn't. It looks like #2092's commits are still on this branch, so git rebase --onto origin/master <last #2092 commit> should drop them. The branch is protected, so I can't push it; please rebase.

@zackees
zackees enabled auto-merge October 24, 2026 10:16
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 94c6b64 Oct 24, 2026
37 checks passed
@zackees
zackees deleted the facade/851-core branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

facade: plugins/obs-outputs: move 34 platform conditionals behind a per-platform layer

1 participant