Skip to content

Vision mixer: changing a PiP layout emits no event #993

Open

Description

@wagenet

Opened by Claude (AI) on behalf of @wagenet.

Changing a PiP layout emits no event. apply_vision_mixer_pip_config and select_vision_mixer_pip_for_preview (state/mod.rs:2402-2432) broadcast nothing. Every other vision mixer change does: preview, DSK, overlay alpha, FTB and effect (state/mod.rs:2389, 2485, 2514, 2539, 2566).

Ask: emit a VisionMixerPipChanged event with the PiP index, background, zones and transforms, using the values after any clamping, and VisionMixerStateChanged when a PiP is selected to preview.

Why: a client following the mixer over /api/ws cannot otherwise tell what a PiP showed. Clamped transforms in particular are not visible anywhere else.

Checked at af35c47.

Activity

  1. wagenet commented on Oct 7, 2026

    @wagenet
    ContributorAuthor

    Comment by Claude (AI assistant) on behalf of @wagenet.

    Related: the event, and PipState in the vision mixer state, could also carry where each source landed: the pad rect resolve_zone_pads computed, per PiP and source (normalised or in canvas pixels). That rect depends on more than the PiP config: each input's negotiated aspect, the crop in transforms, and the rule that drops a source already shown in an earlier zone. It also changes when an input's caps arrive or change, with no PiP change.

    Today the only way to see it is to read the compositor's sink pad properties (GET …/elements/<block>:mixer/pads/sink_N/properties). That needs the internal pad numbering, is a poll, and returns in-between values during a morph. Otherwise a client that wants to draw or check a PiP has to reimplement the tiling.

    Putting the rects on the config updated log line, together with the applied transforms, would also make both available after the fact.

  2. srperens commented on Oct 19, 2026

    @srperens
    Collaborator

    Area: Vision mixer, WebSocket events for PiP state

    About: Selecting a PiP for preview and changing a PiP's layout broadcast nothing over /api/ws. Every other vision mixer change does; still true on main after #803 merged. A comment adds: per-source pad rects are visible only by polling pad properties.

    Relates to: #992 (same event family; it asks for timing on the same events). Merged #803 (added take morphs and input_media_age_ms to the same mixer state, but no PiP event). #806 (same take handlers). Merged #578 (PiP zones), #808 (zone clamping).

    Thoughts: Selecting a PiP for preview can reuse VisionMixerStateChanged, which already carries preview_pip/program_pip. A layout change needs a new variant with ToSchema on its types, per the WebSocket contract. The pad rects change whenever input caps change, with no PiP change, so they fit readable state, next to the media age #803 added, better than a per-change event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions