Repository navigation
Description
Phase 6 follow-up to the C-only characterization/extraction in #5316: port libobs/obs-encoder-group-num-started.c.h to obs-output after the prerequisite merges.
Preserve the hidden obs_encoder_group_num_started(struct obs_encoder_group *) -> uint32_t contract, including one group mutex lock/read/unlock, the read inside the lock and snapshot before unlock, full uint32_t counts, and the existing non-NULL group precondition. Keep private layout owned by C through the smallest real field/mutex adapter; do not copy pthread mutex layout into Rust. Retain all assertions from test_encoder_group_num_started unchanged and relink it to the actual replacement.
Before RED/GREEN, inventory the production calls in output interleaving and encoder set-group, the Rust extern import in rust/obs-output/src/ffi/output_interleave.rs, and exact-name fakes in rust/obs-output/tests/output/interleave_parity.rs, test/cmocka/output_interleave_fields_stub.c, and the benchmark stand-in in rust/obs-c-oracle/benches/port_comparison.rs / ci/test_bench_libobs_stand_ins.py. Their pre-existing definitions must not collide with or accidentally interpose on the real swap. History: #1599 (hidden accessor), #1603 (interleaver port), #2934 (started-group move ordering).
Required coverage: safe Rust mirrors in the existing core category binary, original-C differential/layout and deliberate-mutation evidence, unchanged C-source characterization linked to both C and Rust implementations, unchanged grouped-encoder and interleave compatibility tests against hybrid and C-reference libobs, export parity, and native Windows/macOS link/runtime obligations where applicable. Tier 4 is inapplicable to this non-protocol accessor. Address real adapter support for standalone Rust-static consumers under the shared support mechanism from #5246 once available; never add aborting placeholders. Prove Darwin fixture binding explicitly for same-name fakes (the #5226 lesson).
Dependency: wait for #5316 to merge. No implementation claim is made by this follow-up.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 21, 2026
Claiming: investigation
The prerequisite (#5316) merged in #5322, so
libobs/obs-encoder-group-num-started.c.his on master as its own unit and still C. The scope, contract and coverage are already spelled out above, so this meets Ready.rdoupe commentedon Nov 21, 2026
/ready
github-actions commentedon Nov 21, 2026
Claim bot: @rdoupe, this can't be claimed yet: it is blocked by 1 open issue(s) (see "Blocked by" on the issue); claim it once they close.
rdoupe commentedon Nov 21, 2026
/ready
rdoupe commentedon Nov 21, 2026
Claiming: Rust swap of
obs_encoder_group_num_startedinto obs-output, branchport/5319-encoder-group-num-started.interleave_parity.rs,output_interleave_fields_stub.c, the bench stand-in) so the swap never collides with or interposes on them.test_encoder_group_num_startedagainst atodo!()core, and Tier 3 against the extracted original with mutants (read outside the lock, no unlock, clamped count)._rusttwin linked to the swap; the interleave and set-group tests run against both libraries.First PR expected within a few hours.
rdoupe commentedon Nov 21, 2026
Done in #5375 (merged 2026-11-21): obs_encoder_group_num_started now runs through safe Rust in obs-output; master push run is green.
obs-output: swap encoder group started count to safe Rust (Refs obs-r…