Skip to content

libobs: characterize and extract obs_get_main_canvas (Refs #4779) - #4784

Merged
zackees merged 2 commits into
masterfrom
test/4779-get-main-canvas-extract
Nov 13, 2026
Merged

zackees merged 2 commits into
masterfrom
test/4779-get-main-canvas-extract

Conversation

@zackees

@zackees zackees commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

obs_get_main_canvas is still embedded in obs.c.h, which prevents replacing the wrapper independently. This C-only prerequisite adds direct public-API characterization and moves the complete function verbatim into obs-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 3cb4c6efc precedes extraction commit 007777202. 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_canvas and unchanged test_object_ref / test_canvas_signals each 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 ./lint passed (exit 0, lane lint: ok, 202.0 s). Pinned clang-format/gersemi and Windows cmocka diagnostics checks passed. Rebased onto master f9365c785950e7725b7d4a731972c94899916ebb after #4762 landed; the sole conflict retained both sorted getter includes. Range-diff confirms no functional change; build-group checks and git diff --check passed after rebase. The full lint and actual-library replay preceded that include-only rebase. ./push published remote head 007777202c24ba674a3ef40f5b19dad74a4793c6, 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.

@zackees zackees changed the title libobs: extract obs_get_main_canvas verbatim (Refs #4779) libobs: characterize and extract obs_get_main_canvas (Refs #4779) Nov 12, 2026
@zackees
zackees enabled auto-merge November 12, 2026 23:40
@zackees
zackees added this pull request to the merge queue Nov 13, 2026
Merged via the queue into master with commit 9c9a05f Nov 13, 2026
42 checks passed
@zackees
zackees deleted the test/4779-get-main-canvas-extract branch November 13, 2026 00:17
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.

test: Characterize and extract obs_get_main_canvas before Rust swap

1 participant