Skip to content

rust: Port the transition source getters and manual controls (move them out of obs-source-transition.c) #3582

Closed

Description

@rdoupe

Unit

libobs/obs-source-transition.c.h: the transition source getters and manual controls move verbatim into a new libobs/obs-source-transition-access.c.h (live C in libobs.core-source), ahead of their port to rust/obs-source:

  • obs_transition_get_source (265-279)
  • obs_transition_get_active_source (281-296)
  • obs_transition_set_manual_torque (411-417)
  • obs_transition_set_manual_time (419-431), which calls obs_transition_set, still in obs-source-transition.c.h

All four are EXPORT through obs.h; the export sets do not change.

Phase and position

Phase 6 (libobs core), the "Extracting a function before porting it" step for the transition getters and manual controls; tracking issue #4 (Phase 6 tracker #444). Same PR as the moves of the transition sizing and tick (#3580) and of obs_transition_load (#3581). It needs no new header: the seam header declares transition_valid.

Dependencies and existing tests

  • The seam and the ported start rules, on master.
  • Tests use the getters along the way, but nothing pins their references, the active source while idle and while transitioning, or the manual controls. A characterization test, test_source_transition_access, lands first: through the real libobs, it pins get_source for A and B with the references before and after release, get_active_source idle and transitioning, torque and clamp seen through obs_transition_get_time after ticks in manual mode, set_manual_time with and without the reset to slot A, and a non-transition source passed to each getter.

Notes

No behaviour change. The new file has its own copy of lock_transition / unlock_transition, with their #undefs (BUILD.md). obs_transition_get_active_source logs under "obs_transition_get_source", and the two setters check no argument; the test pins the first (characterized, not endorsed) and passes the setters only valid transitions. The port fixes both.

Activity

  1. added
    enhancement
    port
    on Nov 3, 2026
  2. rdoupe commented on Nov 3, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #3582.

    Batched in one PR with #3580 (the move of the transition sizing and tick) and #3581 (the move of obs_transition_load).

    1. Characterization: test/cmocka/test_source_transition_access.c through the real libobs: the getters' references, the active source idle and transitioning, the manual torque, clamp and time through obs_transition_get_time, and a non-transition source passed to each getter.
    2. Move the four functions verbatim into libobs/obs-source-transition-access.c.h (its own copy of the lock macros, with their #undefs), included in libobs.core-source. Checked with the move harness; the export sets stay identical.

    Draft PR expected within a day.

  3. added
    ready
    on Nov 3, 2026
  4. moved this from In progress to Done in obs-rust Multiviewon Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementportready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions