Skip to content

libobs: characterize and extract obs_enum_source_types and obs_enum_input_types2 #4772

Closed

Description

@zackees

Characterize and then extract exactly obs_enum_source_types (libobs/obs.c.h:1842-1848) and obs_enum_input_types2 (1858-1867), the source-type registry enumeration unit in Phase 6. The later Rust destination is obs-core.

Acceptance: add a new public-API cmocka characterization covering empty/populated registries, index bounds including SIZE_MAX, registry order, borrowed ID pointer identity, failure without output writes, and independent optional versioned/unversioned outputs. Run the new test and unchanged test_source_registration against production hybrid libobs and libobs-c-reference before and after extraction. Then move only the two bodies verbatim into libobs/obs-source-type-enum.c.h, with its own BUILD.md unity group, preserving signatures and behavior. No Rust swap, existing C test changes, or public header edits.

Existing test_source_registration.c covers registration and some enumeration but does not pin all optional-output/bounds contracts. PR #4733 swaps source-type metadata queries, a disjoint unit; its implementation remains untouched. Register the new native test once in test-graph.json, preserve the host condition, run the graph-sort fixer and native_build contracts, and compile the new test with Clang -Wformat-nonliteral -Werror.

This pool task is BRANCH-ONLY: push the prerequisite branch without creating a PR; the manager opens it when graph serialization permits. Characterization commit precedes the behavior-neutral extraction commit. File the separate Rust-swap follow-up after this prerequisite is ready. Tier 1/3 apply to that later swap; Tier 4 is not applicable to these registry queries.

Activity

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

    @zackees
    MemberAuthor

    Claiming: source-type enumeration characterization and extraction on test/4772-source-type-enum-extract (slot obs-studio13).

    1. Add public-API C characterization of bounds, borrowed IDs, registry order and independent optional outputs; run it and unchanged source-registration tests against both libraries.
    2. Commit characterization, then extract only obs_enum_source_types and obs_enum_input_types2 verbatim into their own .c.h/unity group and rerun focused validation.
    3. Run native graph contracts and final lint, push the branch only, and file the Rust-swap follow-up. No PR from this worker; the manager publishes when graph files are free. Expected branch handoff this session. feat(obs-source): swap source type metadata queries to Rust (Refs #4719) #4733 metadata queries remain untouched.
  3. moved this from In progress to Ready in obs-rust Multiviewon Nov 14, 2026
  4. rdoupe commented on Nov 16, 2026

    @rdoupe
    Collaborator

    @zackees are you still on this one? It was claimed on 2026-11-12 and test/4772-source-type-enum-extract has commits, but there's no PR yet, and the port in #4781 waits on it. If you've moved on, I'm happy to open the PR from your branch and carry it through.

  5. zackees commented on Nov 16, 2026

    @zackees
    MemberAuthor

    no, please feel free to take over

  6. rdoupe commented on Nov 16, 2026

    @rdoupe
    Collaborator

    Claiming: #4772, taking over zackees's branch test/4772-source-type-enum-extract (characterization commit, then the verbatim extraction). Plan: rebase onto master, re-run the new characterization and unchanged test_source_registration against hybrid libobs and libobs-c-reference on both commits, run the graph and lint checks, then open the PR. The Rust swap stays in #4781.

  7. rdoupe commented on Nov 16, 2026

    @rdoupe
    Collaborator

    PR: #4884 (your two commits rebased onto master, pushed as test/4772-source-type-enum-rebased so your branch is untouched).

  8. moved this from Ready to In progress in obs-rust Multiviewon Nov 16, 2026
  9. moved this from In progress to Ready in obs-rust Multiviewon Nov 17, 2026
  10. rdoupe commented on Nov 17, 2026

    @rdoupe
    Collaborator

    Done in #4884 (characterization plus the verbatim move into libobs/obs-source-type-enum.c.h); the Rust swap followed in #4897.

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

    P2enhancementportreadysize:S

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions