Skip to content

obs-source: Port deinterlace mode and field-order getters (#3861) - #3862

Merged
zackees merged 9 commits into
masterfrom
port/source-deinterlace-getters
Nov 7, 2026
Merged

zackees merged 9 commits into
masterfrom
port/source-deinterlace-getters

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports obs_source_get_deinterlace_mode and obs_source_get_deinterlace_field_order into the existing obs-source crate. Preserves stored mode bits, independent field order, NULL defaults and the historical setter-named debug diagnostics. No intended behavior or public ABI differences.

Fixes #3861, native sub-issue of #444. Setters, threading, callbacks and lifecycle remain outside this slice. Original C implementation by Lain Bailey (OBS Project).

Commit sequence after the clean rebase: C-only actual-library characterization f3e3fe776; verbatim extraction b6e8fa70d; Tier 1 RED 78abffaca; Rust GREEN c8100b56c. RED command SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core source::deinterlace_getters:: exited 101: all three tests panic at todo!("#3861"). RED artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-hIUQvS.log.

Rust owns both getters, defaults and log decisions. The private C adapter only returns borrowed field addresses; each shim dereferences only its requested field, under the original getter's synchronization contract. Rust does not mirror obs_source. The adapter is extracted verbatim into the oracle, and the original getters remain in their C-reference source group. Both public symbols have an export fragment; no hidden Rust fragment or matching Windows benchmark stand-in applies. Public headers, existing C tests and WebSocket are unchanged. No feature-ledger entry applies to this behavior-preserving port.

Validation:

  • Restored GREEN regression: 128 deinterlace tests passed, exit 0, with OBS_PARITY_CASES=reduced soldr cargo test -p obs-data --test obs-tests-core source::deinterlace. Includes all seven new Tier 1/layout/Tier 3 tests. The global-log probe re-execs the Core state binary; its output confirms one child test, not an empty selection. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-MXYoP6.log.
  • Real obs-internal.h measures view size/alignment/every field offset and both enum sizes/alignments. C allocates complete source fixtures; parity covers all defined modes, raw 32-bit mode edges/random values, both field orders, NULL logs and unchanged bytes of the entire source after calls. No intentional differences or exclusions; proptest persistence is disabled.
  • Focused Tier 2 used repository docker_task_command and this slot's warm volume. The unchanged characterization passed three repeats against both actual libraries before extraction, after extraction and after the Rust swap. ldd proves /build/tree/libobs-c-reference/libobs.so.30 and /build/tree/libobs/libobs.so.30 load respectively; dynamic exports match exactly: 1,767 symbols. Baseline artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-ZXaanJ.log; extraction: local-test-SUQfGG.log; post-swap: local-test-1vnttx.log in the same directory. Reproducer: /tmp/source-deinterlace/tier2.py.
  • GCC and Clang accept the extracted group with -Wall -Wextra -Werror -Wconversion -Wsign-conversion -Wfloat-conversion, using the oracle dependency-header shims. Clang uses -Qunused-arguments for the Nix wrapper's injected linker arguments.
  • Mutation: forcing non-NULL mode results to zero makes characterized_edges and random_fields_match_c fail, exit 101; the random case shrinks to mode 1. Exact GREEN source was restored before the regression run. Artifact: /tmp/source-deinterlace/mutation.log.
  • Source-group, port-metadata and sorted native-graph checks: 17 passed. The native test belongs to the core suite.
  • SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none ./lint --fix exited 1 only at the documented soldr refusal to build the Dylint driver under clud. All earlier formatting, 350 CI self-test scripts, workspace Clippy and feature Clippy lanes passed. No workaround: hosted Fast Gate must provide Dylint. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-5CBUzM.log. Final soldr cargo fmt --all --check passed.
  • One primary clud-review reviewer: clean after correcting the child selector and native suite registration.
  • Rebased onto current origin/master immediately before final push; git range-diff reports all four commits unchanged. git merge-tree --write-tree --name-only origin/master HEAD succeeds with no conflicting files.

Test cost: 25 debug invocations per new module at reduced parity. Tier 1 longest 0.04 s, peak 11,608 KiB RSS; layout/parity longest 0.03 s, peak 16,324 KiB RSS. No own threads; one isolated child process for log probes. Existing Core state binary only.

The full ./unittest/Tier 2 suite, native macOS/Windows runs and local-gate attestation were not run. Hosted required checks remain the merge gate. Tier 4 does not apply to these field readers.

Manager repair of the failed hosted run (superseded head 4d8a0d149897d50fc5172da30c598591c58d7834):

  • Reproduced Clang's -Wformat-nonliteral failure on the original oracle callback. A guarded printf format attribute on its declaration fixes the forwarder without suppressing warnings. Both Clang and GCC accept the exact oracle under -Werror -Wformat=2 and strict conversion warnings. This is the only oracle file changed in this PR.
  • Format failed the exact native core inventory, not a formatter: both inventory totals now account for the added test. The README record is in sorted position in the port table; graph sorting and native inventory checks pass.
  • Read the macOS Tier 2 failure: this stack-only characterization needs no runtime working directory, so removed its ${runtime} template, which required absent macOS OBS_OUTPUT_DIR.
  • Downloaded the ASan build artifact: its undefined-symbol set is exactly obs_source_deinterlace_fields and blog, also seen in Windows Tier 2. Unrelated obs-source step tests pull getter shims through shared Rust archive members. New aborting link support supplies those uncalled dependencies to all 27 affected targets, without editing their C tests. Native-graph entries carry the real private-header dependencies; deferred CMake support covers the four legacy targets and avoids duplicate sources. Actual getter characterization links both real libraries and receives no stand-ins.
  • Focused Docker replay: all 28 targets (the 27 former link failures plus unchanged characterization) pass three repeats against each actual library. ldd proves both library paths and 1,767 exports match. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-ld359c.log.
  • Focused Rust regression passes all seven tests, plus its isolated one-test child. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-dqd7j5.log.
  • Linux Tier 2's separate zccache broken connection/recovery failure is infrastructure; no cache code changed. The subsequent hidden-seam linker errors are covered by the support fix above.

No full sanitizer or native macOS/Windows runtime replay was performed locally; hosted required checks remain the merge gate.

Repair final gate: SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none ./lint --fix passed formatters, CI self-tests and workspace/feature Clippy, then exited 1 only at the documented soldr refusal to build a Dylint driver under clud. Last three artifact lines confirm that exact refusal; no workaround. Artifact: /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-WdgT4q.log.

Rebased onto current master again before pushing repair head 24b9e70cece9ca6befeb8a37f3b81d0811af2b8b; git range-diff retains all four original patches unchanged and adds one repair commit. Graph sorting and inventory checks pass after the rebase. git merge-tree --write-tree --name-only origin/master HEAD succeeds without conflicts. Remote head verified after a lease pinned to the superseded head above. Claim rechecked with no refusal or competing claim.

Second hosted-CI repair (head b5ab4df2500d88a632bf35a6c6e94d561cb79f56):

  • Read all three failed job logs: macOS Rust Tests 128393937573, Windows Rust Tests 128393937622, Windows Tier 2 128393937672. These are deterministic build/test regressions, so no infrastructure rerun was requested.
  • The first repair added two support sources, private-header imports and caption/uthash dependencies to Rust-static fixtures, but six native registration tests still asserted their previous single-source shape. Reproduced all six failures locally (exit 101); updated exact source order, header lists, dependency suffix and total library counts while preserving every original linkage and selection assertion. The scene-only fixtures still require their original inputs without stand-ins.
  • Windows Tier 2 failed compiling the new support source: obs-internal.h reaches util/threading.h, whose pthread.h was absent from these targets' include paths. Added the established conditional OBS::w32-pthreads dependency to all 23 native-graph targets and the deferred support for four legacy targets. No C tests, public headers or getter behavior changed. Sibling obs-source: Port async flag getters (#3872) #3873 also fails Windows Tier 2 with the same missing header; its platform checks did not provide a passing baseline. That PR remains outside this repair.
  • RED regression commit 0f18c6dbd: uv run ci/test_native_b2_portability.py NativeB2Portability.test_deinterlace_link_support_imports_windows_pthreads fails without the dependency. GREEN commit b5ab4df25: all four portability checks, two graph-sorting checks and five port-metadata checks pass. Current native inventory passes; README remains in its table row.
  • Focused native registration GREEN: seven tests pass. RED artifact /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-bfkAXe.log; GREEN artifact local-test-9Sa9fA.log in the same directory. Focused getter regression: all seven tests plus the isolated child pass, artifact local-test-o4tOFa.log.
  • SOLDR_PORCELAIN=0 SOLDR_RUSTC_WRAPPER=none ./lint completed formatting, CI self-tests and workspace Clippy before exit 1 at the documented soldr refusal to build the Dylint driver under clud. Final three lines inspected; no driver/toolchain workaround. Hosted Fast Gate must provide Dylint. Artifact /home/niteris/.clud/tmp/tool-output/local-test-private/local-test-oMHnGc.log. An initial formatting-only failure was corrected before this run.
  • One primary clud-review reviewer reports the incremental repair clean. Original five commits are unchanged by range-diff; the remote old head was still 24b9e70cece9ca6befeb8a37f3b81d0811af2b8b, and the push used that explicit lease. Master remains 6d29998aa, already an ancestor; no rebase was needed.

Not rerun locally: native Windows/macOS builds, full Tier 2/unittest or sanitizer runtime. Prior actual-library getter and staticlib validation remains recorded above. Hosted CI and the pool chaperone own the final native results and merge observation. This repair adds no test executable, property generator or thread; the registration checks complete together in about 0.1 seconds.

@zackees
zackees force-pushed the port/source-deinterlace-getters branch from 7ea888a to 4d8a0d1 Compare November 7, 2026 09:29
@zackees
zackees marked this pull request as ready for review November 7, 2026 09:30
@zackees
zackees enabled auto-merge November 7, 2026 09:30
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator / pool chaperone. Verified GREEN head 4d8a0d1 is pushed, ready and has auto-merge enabled with the head pinned. Local evidence and the Dylint-driver limitation are final in the PR body. Required hosted checks and merge-queue observation remain with the chaperone. Slot obs-studio5 is being detached cleanly at origin/master.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator after manager-directed repairs. Replaced 4d8a0d1 with verified head 24b9e70 using an explicit lease. All 27 formerly failing staticlib links plus unchanged characterization pass on both libraries (28 targets per mode, three repeats); seven focused Rust tests pass. Format, CI self-tests and Clippy pass; only the documented local Dylint-driver refusal remains for hosted Fast Gate. Full repair evidence and limits are in the PR body. Auto-merge re-armed with match-head-commit; required CI is pending.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Continuing the pool-owned repair in slot obs-studio3. Hosted job logs identify stale exact native registration expectations after adding link support, plus a missing Windows pthread header dependency in that support. I will preserve exact graph assertions and unchanged C tests while repairing the build dependencies, then validate and hand back to the pool chaperone.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Handed off to the pool chaperone: verified GREEN head b5ab4df is pushed and auto-merge is confirmed enabled after match-head-commit re-arming. Cause: first repair added link-support sources/dependencies without updating six exact native registration contracts; additionally obs-internal.h needs the conditional OBS::w32-pthreads dependency on Windows. Fixed both paths without weakening assertions or editing C tests/public headers. RED reproduced all six registration failures and the missing dependency; GREEN passes seven registration tests (final artifact local-test-PYERuD.log), seven getter tests plus isolated child, four portability checks, graph sorting and port metadata. Lint reaches only the documented clud Dylint-driver refusal; hosted Fast Gate must provide Dylint. Body contains evidence and native-validation limits. Replaced head 24b9e70 with an explicit lease; original commits unchanged. No infrastructure rerun. Native CI and merge observation remain with the chaperone.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master 58d2c11; replaced b5ab4df with a126f76 using the explicit lease. Kept master’s inventory-based portability checks in place of superseded fixed counts; retained all port additions. Range-diff reviewed. Seven native registrations and seven focused deinterlace getter tests (plus isolated child) pass; graph sorting, README and portability checks pass. Remote head verified and auto-merge remains enabled. Full Tier 2/native platform suites and hosted CI were not repeated or awaited.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 7, 2026
@zackees
zackees force-pushed the port/source-deinterlace-getters branch from a126f76 to 02bf07a Compare November 7, 2026 15:06
@zackees
zackees enabled auto-merge November 7, 2026 15:07
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased after the 14:43 UTC merges onto origin/master 5de5b53, replacing a126f76 with 02bf07a. Kept both oracle extraction blocks and both portability-test groups. Combined exact registration contracts in the shared helper: source getter support plus master’s ordered scene logging-stub sources; scene library counting now recognizes the test source even when the stub is first. No semantic overlap. Passed whole native_build:: (113), portability (7), graph sorting (2), README (1), full CI self-tests, obs-c-oracle build and all 128 reduced deinterlace Rust/parity tests. Formatting and diff checks pass; range-diff reviewed. Explicit-lease push verified and auto-merge re-armed/confirmed after manager dequeue. Handed off to the pool manager for hosted checks and queue observation.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 7, 2026
@zackees
zackees force-pushed the port/source-deinterlace-getters branch from 02bf07a to 0a7dd55 Compare November 7, 2026 16:29
@zackees
zackees enabled auto-merge November 7, 2026 16:29
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased after #3879: preserved both independent oracle extraction blocks and all master/PR declarations, table records and registrations. Replaced 02bf07a with 0a7dd55 using an exact lease; range-diff preserves all seven patches except extraction context. Passed fmt, whole native_build module (127 tests), portability, graph sorting, README, oracle build and focused deinterlace Rust/parity suite (128 plus isolated child). Auto-merge re-armed pinned to this head. Initial focused attempt hit an active build lock; serialized retry passed.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Cause: #3879’s unchanged encoder_metadata.o references five obs-output getters from its log probe; COFF can pull that member into obs-util, which does not link obs-output. Focused master fix: #3919 passes getter callbacks while preserving every C/Rust log assertion. Its standalone regression reproduces the exact five-symbol Windows link RED and passes GREEN. No feature-code change needed here; merge/rebase with the shared fix when it lands.

@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Needs fix in obs-rust Multiview Nov 7, 2026
@zackees
zackees force-pushed the port/source-deinterlace-getters branch from 0a7dd55 to 6b7cd02 Compare November 7, 2026 18:30
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master after #3916/#3920/#3919. Dropped the manual build.rs adapter block (discovery preserves source_deinterlace_fields.inc); moved all 23 exact registration support expectations to the per-port JSON entry; passed getter callbacks into the oracle log probe to remove production getter references. Passed discovery/registration guards, workspace fmt, complete native_build::, oracle build, obs-util, all seven focused getter/parity tests, portability, graph sorting, README and local-gate self-test. Lease-pinned push verified at 6b7cd02; auto-merge remains enabled. Hosted/native platform results remain with the pool coordinator.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@zackees
zackees force-pushed the port/source-deinterlace-getters branch from 6b7cd02 to 5b513ef Compare November 7, 2026 20:17
@zackees
zackees enabled auto-merge November 7, 2026 20:17
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master 1f39fb9 after #3884 and #3912. Preserved both private field adapters, both link-support sources, Windows dependencies and exact registration assertions; corrected support-source order to the independent inventory. Characterization, extraction, RED and GREEN order is retained. Replaced 6b7cd02 with 5b513ef using a pinned lease.

Passed: eight focused Tier 1/Tier 3 tests; all 146 native-build tests; whole obs-util suite and doctests; oracle discovery, independent native entries, portability, graph sorting, README and workspace formatting checks. GCC and Clang compiled the affected core-source unity group in the Nix shell. Extra strict warning flags initially exposed existing initializer warnings; the format-diagnostic compile passes. Hosted CI, Tier 2 and native Windows/macOS runtimes were not repeated. Head-pinned auto-merge re-armed; handed back to the pool coordinator.

@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to In merge queue in obs-rust Multiview Nov 7, 2026
Merged via the queue into master with commit 385c91b Nov 7, 2026
40 checks passed
@zackees
zackees deleted the port/source-deinterlace-getters branch November 7, 2026 22:23
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In merge queue to Done in obs-rust Multiview Nov 8, 2026
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.

rust: Port obs-source deinterlace getters to obs-source

1 participant