Repository navigation
obs-output: Port public encoder width and height getters (#3936) - #3938
Conversation
e1fdebc to
e30b312
Compare
|
Rebased onto current master, replacing e1fdebc with e30b312. Preserved master’s scaling-enabled port and this PR’s dimension extraction: both original implementations remain in their proper reference groups, while hybrid libobs retains the Rust swaps. Characterization, extraction, RED and GREEN order is intact; implementation, oracle and characterization 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 checks 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. |
Fixes #3936. Refs #3856.
Ports obs_encoder_get_width and obs_encoder_get_height to obs-output. Reuses the existing encoder_size routing helper and preserves NULL debug diagnostics, wrong-type warnings with the encoder name, missing-media precedence over scaled dimensions, independent full-width scaled axes, and lazy video fallback. No intentional behavior differences.
The new borrowed field adapter retains the private encoder layout in C and borrows context.name as char *const *. The oracle owns its name buffer, uses the original C size helper, and receives media/getter callbacks instead of calling production libobs functions directly. Adapter discovery requires no build.rs extraction block. Native registration has its own entry and selects only its own target. Existing Core state and Application test binaries are reused.
Commit sequence: actual-library C characterization 905f3e3, separate building verbatim extraction 3b4350e, Tier 1 RED a8e4032, and Rust GREEN e1fdebc. Both RED tests fail at the deliberate stub with exit 101.
Validation:
Test cost over 25 debug runs per new module: safe API longest 0.02 seconds and peak RSS 10,872 KiB; parity longest 0.01 seconds and peak RSS 17,580 KiB; registration longest 0.04 seconds and peak RSS 10,928 KiB. Each isolated parity child opens one existing video worker and joins it on cleanup. Safe API and registration cases start no threads. No new Rust test executable.
Public headers, pre-existing C tests, WebSocket and workflows are unchanged. No behavior change or features-ledger entry. Tier 4 is inapplicable. Local Tier 2 covers the five encoder tests above; the full cmocka suite, full workspace execution, native Windows/macOS and hosted CI were not verified locally. No native-coverage label exists in this repository. There is no local-gate attestation, so hosted validation remains enabled.