Repository navigation
Description
Phase 6 encoder unit, targeting obs-encoder. Swap only the extracted obs_encoder_video_tex_active implementation in libobs/obs-encoder-video-tex-active.c.h after the C-only prerequisite for #5212 has merged. The prerequisite PR/branch is linked below when published; do not start the swap before it lands.
The deterministic real-private-header C characterization in test/cmocka/test_encoder_video_tex_active.c covers the exact media pointer and exactly one mix lookup on every format, absent mixes including NULL media on a valid encoder, all 26 declared video formats and four NV12/P010 flag combinations, flag reads after lookup, and unchanged encoder/mix storage. Leave it and the existing test_encoder_tex_active_null.c unchanged. The existing real-device test derives capabilities and may skip; never assume GPU support is true on a particular host (#5182).
Keep get_mix_for_video and its existing mutex-protected walk in C, along with C-owned texture state. Preserve the live encoder/core preconditions, lookup-first order, NULL-mix guard, and only the matching NV12 or P010 flag read. Do not add NULL-encoder behavior or duplicate private C layouts in Rust. Keep raw access and platform details at the FFI boundary, with owner NULL checks before any field projection and real private mix/field adapters.
Acceptance: RED then GREEN safe-core mirrors in the existing obs-tests-core category binary, real-header layout/projection coverage where needed, original-C Tier 3 differential coverage plus a killed mutation, unchanged C characterizations against C reference and hybrid libobs, and identical export sets. Move the extracted C source into its own ported group/source-set fragment and keep export/oracle/native inventories consistent. No public-header or existing-C-test edits, no WebSocket changes, and no additional Rust test binary.
Every Rust-referenced C adapter must link its REAL source into EVERY standalone Rust-static consumer through tests.d link-support fragments; no aborting placeholders. Build EVERY configured Linux *_rust cmocka target, not a sample (#5190/#5155), and run ci/windows_link_check.py plus the whole native_build module and repository lint. Respect native C long width in any new counter/test helpers (#5159). Do not port unrelated encoder, video-core or graphics backend work in this unit.
This is a separate behavior-preserving swap after the prerequisite; no design decisions remain open.
Prerequisite publication: #5215 (Refs #5212), branch test/5212-encoder-tex-active. Wait for #5215 to merge before claiming this swap.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 19, 2026
Claiming: #5216 encoder texture-active Rust swap in pool slot obs-studio5, branch port/5216-encoder-tex-active. 1. Commit safe-core RED mirrors in obs-tests-core. 2. Implement the guarded Rust swap with C-owned mix/flag adapters and Tier 3 differential coverage. 3. Run unchanged OFF/ON characterizations, every Linux *_rust target, cross-link checks, native_build and lint; publish subject to backpressure. First publication expected this session.
test(encoder): mirror texture-active characterization against a Rust …
obs-encoder: swap texture-input activity to safe Rust (Refs #5216)
fix(obs-encoder): bind the static characterization to its Rust entry …
zackees commentedon Nov 19, 2026
Landed on master in #5226 (157e2df): obs_encoder_video_tex_active now runs in safe Rust in obs-encoder. The merge-group run included macOS Tier 2, which confirms the Darwin binding fix.