Skip to content

rust: Port the source load migration in obs.c to obs-core #2143

Closed

Description

@rdoupe

Unit

Port the source load migration and value rules in obs_load_source_type() (libobs/obs.c.h) to rust/obs-core, as a new module source_load. These decisions move:

These stay in C: every obs_data_* call and setter, the source creation, the canvas lookup and the filter recursion.

Plan (one PR, separate commits)

  1. A behaviour-neutral move into libobs/obs-source-load.c.h, as hidden functions.
  2. Characterization in test_source_load_migration_steps. It covers:
    • versions just below, at and above 23.2.2 and 33.0.0;
    • prev_ver 0, UINT32_MAX, and an int64 above it;
    • each monitoring type, plus one outside the enum, with and without the cap;
    • the value rules at their edges, including NaN and ±inf.
  3. RED, then GREEN: the safe Rust core plus shims, in a libobs.ported-source-load group. Exported symbols are unchanged.
  4. Tier 3 parity against the original C: exhaustive over the cap and types, plus a proptest over u32 versions and f64/f32 values taken as bit patterns. Also a deliberate-break check and port_comparison numbers.

These real-libobs tests must stay green on every lane: test_source_audio_ranges, test_source_volume_mix, test_deinterlace_mode_load, and any test that loads a scene collection with monitoring settings.

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