Skip to content

obs-output: Port encoder ROI-state getters (#3906) - #3907

Merged
zackees merged 4 commits into
masterfrom
port/3906-encoder-roi-state
Nov 7, 2026
Merged

zackees merged 4 commits into
masterfrom
port/3906-encoder-roi-state

Conversation

@zackees

@zackees zackees commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Ports obs_encoder_has_roi and obs_encoder_get_roi_increment into obs-output, preserving NULL defaults and exact debug messages, full-width values, and the original unsynchronized reads. A private C adapter lends field addresses from the real encoder; Rust never mirrors its private layout. Fixes #3906; refs #444 and #3856. Other getter groups remain outside this slice.

Commit sequence: actual-library C characterization b6fce082f; verbatim, building C extraction d5cafe97b; Tier 1 RED c94763f95 (both cases fail at todo!(), exit 101); Rust GREEN 2d72ae508. The extraction used the current core-output PCH, then the dedicated ported group switched to the existing minimal private-header PCH. The characterization is unchanged after its first commit. No public header, existing C test, WebSocket file or workflow changed. No intentional behavior differences; Tier 4 does not apply.

Validation (logs in build_ci_audit/encoder-roi-state/):

  • Characterization and extraction each build and pass against both actual libraries (characterization3.log, extraction.log).
  • Six safe/layout/differential tests pass in the existing Core state binary (green.log, green-restored.log). The real header supplies the field-view size, alignment and every offset; complete C encoders check independent state and byte-for-byte non-mutation. Full-range randomized counts/increments use reduced parity with persistence disabled.
  • Mutation: change the count rule from > 0 to > 1; differential characterized_edges fails with false/true mismatch, exit 101. Restored GREEN passes (mutation.log, green-restored.log).
  • Warm-volume Tier 2 through docker_task_command: unchanged new characterization and existing test_encoder_roi each pass three consecutive runs against each library without skips. ldd proves /build/tree/libobs and /build/tree/libobs-c-reference; all 1,767 dynamic exports match. The final export replay gates every command on its exit status (tier2-green.log, exports-final.log).
  • Host GCC and Clang accept the oracle (including the production field adapter), fixture and extracted group with -Wformat-nonliteral -Werror -Wconversion -Wsign-conversion; Nix Clang uses -Qunused-arguments, and dependencies have SYSTEM include roots. Portable printf callback annotations are present.
  • All seven native_build::canonical_rust_static_ checks pass (native-static-final.log). Native portability (4), graph order (2), README (1), build groups (10) and port metadata (5) pass. No standalone obs-output Rust-static test variant is added; these getters are exercised through actual libobs.

SOLDR_PORCELAIN=0 ./lint passes completely (exit 0, 250.5 seconds), including formatting, all 353 CI self-tests, workspace/feature Clippy and the repository Dylints (lint.log). Final fetch/rebase onto origin/master 58d2c1155 is a no-op; the verified source is unchanged.

Test cost: 25 debug runs of all six new cases with reduced parity, longest 0.031 seconds and peak RSS 16,468 KiB; no own threads. The logging test re-execs the existing binary for process isolation. Allocation sizes are fixed complete C encoder objects. No new Rust test executable.

Not verified locally: full ./unittest, native Windows/macOS runtime, or a local-gate attestation. Hosted PR CI remains the merge gate.

@zackees
zackees marked this pull request as ready for review November 7, 2026 14:18
@zackees
zackees enabled auto-merge November 7, 2026 14:19
@zackees
zackees force-pushed the port/3906-encoder-roi-state branch from 2d72ae5 to 883328b Compare November 7, 2026 15:03
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master 6551be3 after #3858/#3883, replacing 2d72ae5 with 883328b. Kept counter and ROI field adapters plus both canvas/ROI oracle extraction blocks. Adjacent encoder deletions preserve the counter port and move only ROI getters; no semantic overlap. Range-diff preserves all four commits. Checks exit 0: full native_build:: (115), native portability, sorted graph (--fix then check), README, local_gate self-test, oracle build, reduced output::encoder_roi_state (6 including parity). Exact force-with-lease push and remote head verified; auto-merge retained. Hosted CI/Tier 2/native runtimes were not repeated.

@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/3906-encoder-roi-state branch from 883328b to 5fc4d80 Compare November 7, 2026 16:31
@zackees
zackees enabled auto-merge November 7, 2026 16:31
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased after #3879, replacing 883328b with 5fc4d80. Kept metadata and ROI-state README records, both field adapters in alphabetical order, and both oracle/build and module registrations; no semantic overlap. Passed formatting, all 129 native_build tests, native portability (6), graph ordering (2; --fix unchanged), README (1), build groups (10), oracle build and all six focused ROI-state Rust/layout/parity/log tests with reduced parity. Every check exited 0. Auto-merge re-armed at the new head.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased 5fc4d80 onto master 5653407; pushed d97add7 with the exact authorized lease after listing remote-only commits and reviewing the range-diff. Kept both hotkey and ROI adapter blocks; no discovery changes. Shared five-getter Windows link fix is #3919 (metadata oracle now receives callbacks). Local integration of this rebased head with #3919 passed Windows-target obs-util link, 914 Linux utility tests plus doctests, oracle build, and all 127 native_build:: tests. Auto-merge re-armed with d97add7 pinned. This PR still needs #3919 in its merge result to remove the shared latent metadata dependency.

@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master 8e406b2 after #3916/#3920/#3919, replacing d97add7 with 47252f3 using an exact lease. Dropped manual adapter extraction; generated encoder_roi_state_fields.inc matches the oracle include. C null-log probe now takes both getter callbacks, avoiding production getter dependencies. No shared registration additions required migration. Passed: whole native_build (129), oracle build, obs-util (914 plus doctests), focused ROI Rust/parity (6), and full local-gate self-test (including discovery, registration, portability, graph, README and build-group checks). Clud verification-ratio refused the combined standalone Python-check/workspace fmt-check command before execution; it was not retried or bypassed. Workspace fmt rewrite and graph --fix completed before that refusal. Initial concurrent focused/util attempts hit soldr active-lock refusals; serial retries passed. Range-diff reviewed; remote head and enabled auto-merge confirmed.

@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/3906-encoder-roi-state branch from 47252f3 to 5ce0652 Compare November 7, 2026 20:16
@zackees
zackees enabled auto-merge November 7, 2026 20:16
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto master 1f39fb9, replacing 47252f3. Kept both master's last-error field seam and this PR's ROI field seam; the unity group, test graph and README retain master's additions. The four characterization/extraction/RED/GREEN commits remain in order, with the range-diff limited to integration context.

Checked: all six focused Tier 1/layout/Tier 3 cases; oracle discovery, native registration entries, native portability, test-graph ordering and README policy; the whole native-build module; workspace Rust formatting; and the core-output unity group with GCC and Clang, including precompiled headers in the Nix sanitizer environment.

Hosted CI and the merge queue remain responsible for the merge gate. Full Tier 2, full workspace tests and native Windows/macOS execution were not rerun for this rebase.

@zackees
zackees removed this pull request from the merge queue due to a manual request Nov 7, 2026
@zackees
zackees force-pushed the port/3906-encoder-roi-state branch from 5ce0652 to 2c8f86f Compare November 7, 2026 21:33
@zackees
zackees enabled auto-merge November 7, 2026 21:33
@zackees

zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto current master, replacing 5ce0652 with 2c8f86f. Kept master’s scaling-enabled port and this PR’s ROI-state additions in the unity group, Rust module lists and test graph. Characterization, extraction, RED and GREEN order is preserved; implementation and focused test bodies are unchanged. Focused Tier 1 and Tier 3 tests, oracle discovery, registration inventory, the full native-build module, utility tests and doctests, workspace formatting, portability, graph sorting and README policy checks all pass. The conflicted native group compiles with GCC and Clang in the Nix environment. Exact-lease push verified and head-pinned auto-merge re-armed. Full Tier 2 and hosted CI were not rerun locally. Handed back to the pool coordinator.

@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to In review in obs-rust Multiview Nov 7, 2026
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit dbcb10c Nov 7, 2026
77 of 79 checks passed
@zackees
zackees deleted the port/3906-encoder-roi-state branch November 7, 2026 23:58
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review 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-encoder.c.h ROI-state getters to obs-output

1 participant