Skip to content

refactor(pipeline): split effects.rs into focused sub-modules#624

Merged
srperens merged 1 commit into
mainfrom
refactor/effects-split
Jun 3, 2026
Merged

refactor(pipeline): split effects.rs into focused sub-modules#624
srperens merged 1 commit into
mainfrom
refactor/effects-split

Conversation

@srperens
Copy link
Copy Markdown
Collaborator

@srperens srperens commented Jun 3, 2026

Summary

effects.rs grew past the 1500-line guideline (1,756 lines) with the crop/zoom work in #622. This splits it into focused sub-modules following the builder/ pattern — a pure move with only import/visibility adjustments, no logic changes:

Module Responsibility Lines
effects/take.rs The PGM take engine (trigger_transition, PiP-aware + classic paths) ~420
effects/mixer_ops.rs Vision mixer runtime ops (bus selection, DSK, FTB, overlay alpha, PiP config, input resolutions) ~930
effects/mixer_layout.rs Pad geometry/crop appliers shared by the take engine, mixer ops and the reactive geometry probe ~280
effects/misc.rs Block-generic effects (animate input, loudness reset, recorder split, thumbnail capture) ~150
effects/mod.rs Shared dist_canvas_size + crate-facing re-exports ~45

Crate-facing paths are unchanged (crate::gst::pipeline::effects::{find_pad, apply_*} re-exported from mod.rs), so geometry.rs and other consumers compile untouched.

Test plan

  • cargo check clean, zero unused-import warnings
  • vision mixer unit tests (28 + 32) green
  • pipeline_lifecycle_test (leak regression) green

🤖 Generated with Claude Code

effects.rs had grown past the 1500-line guideline (1756 lines) with the
crop/zoom work. Split it following the builder/ pattern — a pure move
with only import/visibility adjustments, no logic changes:

- effects/take.rs — the PGM take engine (trigger_transition)
- effects/mixer_ops.rs — vision mixer runtime ops (bus selection, DSK,
  FTB, overlay alpha, PiP config, input resolutions)
- effects/mixer_layout.rs — pad geometry/crop appliers shared by the
  take engine, mixer ops and the reactive geometry probe
- effects/misc.rs — block-generic effects (animate input, loudness
  reset, recorder split, thumbnail capture)
- effects/mod.rs — shared dist_canvas_size + crate-facing re-exports

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@srperens srperens merged commit 5c434c4 into main Jun 3, 2026
7 checks passed
@srperens srperens deleted the refactor/effects-split branch June 3, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant