Skip to content

fix: align static external_pads with computed defaults#492

Merged
srperens merged 4 commits intomainfrom
fix/block-static-pad-mismatches
Apr 17, 2026
Merged

fix: align static external_pads with computed defaults#492
srperens merged 4 commits intomainfrom
fix/block-static-pad-mismatches

Conversation

@srperens
Copy link
Copy Markdown
Collaborator

Summary

  • MPEG-TS/SRT Input: static pads showed only video, but default config includes 1 audio track — audio port appeared after save
  • MPEG-TS/SRT Output: same issue, audio input port appeared after save
  • WHEP Output: static pads showed audio+video, but default mode is video-only — audio port disappeared after save
  • Vision Mixer: static pads showed MAX inputs (10 video + 4 DSK), but defaults are 4 video + 0 DSK — ports collapsed after save

Static external_pads in each block definition now match what get_external_pads() produces with default property values, so blocks look correct immediately when dragged into the editor.

Test plan

  • Drag each of the 4 blocks into the editor, verify ports match expectations
  • Save the flow, verify no ports appear or disappear
  • Change properties (e.g. add audio tracks), save, verify ports update correctly
  • cargo test --test openapi_test passes

🤖 Generated with Claude Code

Per Enstedt and others added 4 commits April 13, 2026 17:01
When dragging a block into the editor, the frontend renders the static
external_pads from the block definition (computed_external_pads is None).
After saving, the backend computes pads via get_external_pads() which
could differ, causing ports to appear or disappear unexpectedly.

Blocks fixed:
- MPEG-TS/SRT Input: was missing audio port (A0 appeared after save)
- MPEG-TS/SRT Output: was missing audio port (A0 appeared after save)
- WHEP Output: showed audio+video but default mode is video-only
  (A0 disappeared after save)
- Vision Mixer: showed MAX (10+4 DSK) inputs instead of DEFAULT (4+0)
  (10 inputs collapsed to 4 after save)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Aligns with all other audio/video blocks which default to 1 video + 1 audio.
Updates the enum default, property default value, and static external_pads.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@srperens srperens marked this pull request as draft April 14, 2026 08:43
@srperens
Copy link
Copy Markdown
Collaborator Author

wait a bit with this. it changes default behavior for whep output ports; it adds a default audio port, which is more correct, but it's a change without proper migration for now.

@srperens srperens marked this pull request as ready for review April 17, 2026 08:09
@srperens srperens merged commit 5210475 into main Apr 17, 2026
7 checks passed
@srperens srperens deleted the fix/block-static-pad-mismatches branch April 17, 2026 08:09
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