Repository navigation
Description
Unit
libobs/obs-source-transition.c.h: the transition sizing and tick move verbatim into a new libobs/obs-source-transition-size.c.h (live C in libobs.core-source), ahead of their port to rust/obs-source:
- the
add_alignmentdeclaration (81) get_cx/get_cy(83-91, static inline)recalculate_transition_matrix(93-130, static) andrecalculate_transition_matrices(132-136, static inline)recalculate_transition_size(138-159, static)obs_transition_tick(161-185), declared inobs-internal.hand called fromobs-source.c.h
The four helpers the rest of the file still calls (get_cx, get_cy, recalculate_transition_matrices, recalculate_transition_size) lose static and are declared in a private header, libobs/obs-source-transition-size.h ("private adapter, not a new public API", like the seam header), under transition_-prefixed names so they cannot clash in the unity group: transition_get_cx, transition_get_cy, transition_recalculate_matrices, transition_recalculate_size. Renaming the callers in obs-source-transition.c.h (257-258, 405-406, 578-579, 607-608, 727-728) is the only edit to them. None of them is EXPORT; the export sets do not change.
Phase and position
Phase 6 (libobs core), the "Extracting a function before porting it" step for the transition sizing and tick; tracking issue #4 (Phase 6 tracker #444, its seam item for the transition fields). It follows the child slots port (#3562), and is batched in one PR with the moves of obs_transition_load and of the transition source getters and manual controls, which are filed next to this one.
Dependencies and existing tests
- The transition field seam and the clock rules (
obs-source-transition-seam.c.h,obs-source-transition-clock.c.h), both on master. - Nothing pins the actual size, the matrices or the manual value after a tick. A characterization test,
test_source_transition_size, lands first: through the real libobs (core video, Linux under Xvfb, as the other transition tests), with a minimal transition type and fixed-size test sources, it pinstransition_actual_cx/cythroughobs_source_get_width/_heightafter a tick, the unsized case, the matrices through the drawn result, and the manual value after ticks in manual mode.
Notes
No behaviour change. The new file has its own copy of the lock macros it uses, with their #undefs (BUILD.md). The unlocked writes of transition_actual_cx / cy and transition_manual_val that #3570 reports move as they are; the fix there then applies to the new file.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Nov 3, 2026
Claiming: #3580.
Batched in one PR with #3581 (the move of
obs_transition_load, which calls these helpers) and #3582 (the move of the transition source getters and manual controls).test/cmocka/test_source_transition_size.cthrough the real libobs (core video, Linux under Xvfb): the actual size after a tick, the unsized case, the matrices through the drawn result, and the manual value after ticks in manual mode.libobs/obs-source-transition-size.hwith the four renamed helpers, and the callers renamed.libobs/obs-source-transition-size.c.h(its own copy of the lock macros, with their#undefs), included inlibobs.core-source. Checked with the move harness; the export sets stay identical.Draft PR expected within a day.
rdoupe commentedon Nov 3, 2026
Fixed by PR #3588 (merged through the merge queue), batched with #3581 and #3582.
What changed:
add_alignment,get_cx/get_cy,recalculate_transition_matrix/_matrices,recalculate_transition_sizeandobs_transition_tickmoved verbatim out oflibobs/obs-source-transition.c.hinto the newlibobs/obs-source-transition-size.c.h(live C inlibobs.core-source). The four helpers the rest of the file still calls are nowtransition_get_cx,transition_get_cy,transition_recalculate_matricesandtransition_recalculate_size, declared in the private headerlibobs/obs-source-transition-size.h. A new characterization test,test_source_transition_size, pins the behaviour, and the export sets are unchanged. No behaviour change.What is left: the Rust port of the sizing and tick into
rust/obs-source(RED then GREEN, all four test tiers). No issue is filed for it yet. The unlocked writes oftransition_actual_cx/cyandtransition_manual_valmoved as they were; their fix is #3570, which now applies to the new file.No tracking-issue checkbox exists for this unit (#4 and #444 list none).
libobs: Move transition sizing, load and getters (obs-rust#3588)