Skip to content

rust: Port the scene item save/load names in obs-scene.c to obs-scene #2114

Closed

Description

@rdoupe

Unit

Port the scene item save/load name tables and coordinate-key choice in libobs/obs-scene.c.h to rust/obs-scene, as a new module item_names:

  • In scene_load_item:
    • the scale filter names, the blend method and the blend type names, each with its default;
    • the choice between the relative and the absolute keys, for pos/scale and for bounds.
  • In scene_save_item:
    • the reverse tables, with their fallbacks (disable, default, normal);
    • the choice to write relative keys.

These stay in C: every obs_data_* call, the coordinate conversions (already ported), the source lookup, transitions and private settings. Name matching keeps using astrcmpi, which is already Rust in obs-util.

Plan (one PR, separate commits)

  1. A behaviour-neutral move into libobs/obs-scene-item-names.c.h, as hidden functions.
  2. Characterization in test_scene_item_names_steps. It covers:
    • every name in lower, upper and mixed case;
    • an unknown name, an empty string, a trailing space, and bytes above 0x7F;
    • every enum value, plus two outside each enum, on the save side;
    • the key choice for all flag combinations, with and without absolute_coordinates.
  3. RED, then GREEN: the safe Rust core plus shims, in a libobs.ported-scene-item-names group. Exported symbols are unchanged.
  4. Tier 3 parity against the original C: exhaustive over the enums and flags, plus a proptest over arbitrary byte strings. Also a deliberate-break check and port_comparison numbers.

These real-libobs tests must stay green on every lane: test_scene_blend, test_scene_item_crop_load, test_scene_duplicate_scale_ref and test_saved_transition.

Activity

  1. rdoupe commented on Oct 24, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #2114.

  2. added
    claimed
    on Oct 24, 2026
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

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions