Repository navigation
libobs: characterize and extract obs_get_main_canvas (Refs #4779) - #4784
Merged
Merged
Conversation
zackees
enabled auto-merge
November 12, 2026 23:40
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
obs_get_main_canvasis still embedded inobs.c.h, which prevents replacing the wrapper independently. This C-only prerequisite adds direct public-API characterization and moves the complete function verbatim intoobs-get-main-canvas.c.h, included by the existing core unity group. Its signature, reference ownership and behavior are unchanged.Fixes #4779. Rust swap follow-up: #4780, dependent on this extraction landing.
Characterization commit
3cb4c6efcprecedes extraction commit007777202. The three cases pin main-canvas identity, exactly one acquired reference per call, balanced release, repeated held references, the core's retained ownership, weak-reference reacquisition and independence from public/private auxiliary canvases. An initialized core remains a precondition. The test needs no video/audio reset, sleep or own thread.Before extraction, the new
test_get_main_canvasand unchangedtest_object_ref/test_canvas_signalseach passed five repeats against each actual hybrid/C-reference library (30 suite executions, zero failures). Loaded-library paths were verified; all 1,768 dynamic exports matched. A scratch preload mutant returning a borrowed main canvas failed the ownership assertion (1 != 2), exit 1. The entire extracted definition matches the original byte-for-byte, and the parent removes only that span.After extraction, the same three suites passed another five repeats against each actual library (30 more suite executions, zero failures), and all 1,768 dynamic exports still matched. One full
SOLDR_PORCELAIN=0 ./lintpassed (exit 0,lane lint: ok, 202.0 s). Pinned clang-format/gersemi and Windows cmocka diagnostics checks passed. Rebased onto masterf9365c785950e7725b7d4a731972c94899916ebbafter #4762 landed; the sole conflict retained both sorted getter includes. Range-diff confirms no functional change; build-group checks andgit diff --checkpassed after rebase. The full lint and actual-library replay preceded that include-only rebase../pushpublished remote head007777202c24ba674a3ef40f5b19dad74a4793c6, verified against local HEAD and the remote branch. Its new client-proof lane passed formatting, all 371 CI self-test files and host clippy, then Soldr refused to build the missing Dylint driver under clud (nightly-2026-05-28; only an August driver is deployed). No complete client evidence was stamped; ordinary hosted PR CI remains required. No workaround was attempted.This prerequisite contains no Rust: safe Tier 1 RED/GREEN, C-layout and original-C differential Tier 3 belong to #4780. Tier 4 is inapplicable. No existing C test, public header, WebSocket plugin, workflow, shared test graph, native test list or Rust executable changed. No user-visible behavior change requires a features-ledger line. Full Tier 2, native Windows/macOS runtime, sanitizers and hosted CI completion are not claimed as local validation. Hosted PR CI remains the merge gate.