Skip to content

test: Characterize and extract video set_render_size before Rust port #4284

Closed

Description

@zackees

Phase 6 prerequisite for porting the host-independent render setup helper in libobs/obs-video.c.h:99-106 to obs-core.

Extract set_render_size verbatim to libobs/obs-video-render-size.c.h, preserving its signature and production call sites. Add a C cmocka characterization that records the depth-test, cull-mode, projection and viewport calls, their order and dimensions (including zero, asymmetric, float rounding boundaries and INT_MAX). The test compiles the private C source and uses recording graphics callbacks; it characterizes C only until a later port makes the helper reachable.

No existing focused C test or Rust implementation was found. Exact-name searches found no open issue/PR; pushed port/42* and test/42* diffs cover scale effects and core tick callbacks, which this work avoids. No public headers, existing C tests, host code or WebSocket changes.

Deliverable is a branch only, without a PR while the CI queue is backlogged. The Rust swap is a separate follow-up after this prerequisite lands, with safe-core tests, unchanged C compatibility and oracle differential coverage.

Activity

  1. added
    port
    ready
    P2
    size:S
    on Nov 9, 2026
  2. zackees commented on Nov 9, 2026

    @zackees
    MemberAuthor

    Claiming: characterization and verbatim extraction of set_render_size. 1. Pin graphics call arguments and order with a C-only cmocka test. 2. Extract the helper without changing its signature or behavior. 3. Verify and push branch test/4284-video-render-size-extract from slot obs-studio12 (im-bo-view2). Branch-only delivery this session; no PR until the queue drains.

  3. moved this from Ready to In progress in obs-rust Multiviewon Nov 9, 2026
  4. moved this from In progress to Ready in obs-rust Multiviewon Nov 10, 2026
  5. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Landed on master in #4358 (b227f00); verified the merge is an ancestor of origin/master and libobs/obs-video-render-size.c.h exists there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2portreadysize:S

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions