Repository navigation
Description
Rust port, round 11 unit 2: the transition load, scale type and swap checks left in libobs/obs-source-transition.c.h, moved to obs-source next to transition_start, transition_clock and transition_render.
Unit
libobs/obs-source-transition.c.h (the decisions only) to rust/obs-source, new module transition_load.
Phase and position
Phase 6 (libobs core), the core-source+ group. After the canvas flag rules (#2546) and the slot-A release fix (#2584), which changed the load this unit moves.
Dependencies and existing tests
Rust takes over these decisions, on plain values:
transition_valid(): the type check afterobs_ptr_valid();valid_scale_type(), used byobs_transition_set_scale_type()andobs_transition_load(): the three valid values, else Max Only;obs_transition_load(): whether the source is looked up (a name), and the outcome of the lookup and add (keep, not found and warn, or the recursion refusal: release, none and warn); whether the old slot-A source leaves the active children (libobs: Release slot A in obs_transition_load #2584);copy_source_state(): whether the new child is stored or refused for recursion (nothing stored, inactive);obs_transition_swap_begin()and_end(): the same-transition gate.
C keeps both mutexes and their order, every obs_get_source_by_name(), obs_source_get_ref()/_release(), the active child calls, the obs_data reads, the (uint32_t) truncations of the loaded alignment and size and the mode taken as is, the fields the swap hands over, the texrender swap, recalculate_transition_size()/_matrices(), every log, and all of transition audio mixing (untouched).
Existing real-libobs tests: test_transition_load_release, test_transition_scale_type, test_transition_swap, test_transition_swap_active, test_transition_swap_cycle, test_transition_set_cycle, test_transition_start_steps. A characterization test of the moved decisions (test_transition_load_steps) lands first.
Notes
- Concurrency: each decision is its own function, asked at its own point, so no call or read moves out of its lock section or its condition.
- No SIMD, no per-OS code, no struct mirrored, no pointer crosses. The enum values cross as
intand are checked with_Static_assert. - Expected intentional differences: none.
Plan
The standard six commits:
- move (behaviour-neutral);
- characterization test;
- Tier 1 RED;
- GREEN in a
libobs.ported-source-transition-loadgroup; - Tier 3 parity;
- docs.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Oct 27, 2026
Claiming: #2595 (round 11 unit 2, transition load, scale type and swap checks).
libobs/obs-source-transition-load.c.h(hidden, declared inobs-source-transition-load.h), behaviour-neutral, checked with a harness against master's functions.test_transition_load_steps.todo!().rust/obs-sourcetransition_loadand its shims, in a newlibobs.ported-source-transition-loadgroup.Draft PR once the RED commit exists, today.
libobs: Move the transition load decisions
test: Characterize the transition load checks
obs-source: Test the transition_load port
obs-source: Port the transition load checks
obs-source: Check transition_load against the C
docs: Record the transition load port
obs-source: Port the transition load checks (obs-rust#2602)