Skip to content

Layer Seeding

app.application.services.helpers.layer_seeding

View source code

Compatibility seeding shared by editable-layer reads and track mutations.

seed_layer_frame_from_layer(source: VideoDataLayer, target: VideoDataLayer, session: Session, frame_index: int) -> None

Seed an absent editable frame with filtered clones of its source boxes.

PARAMETER DESCRIPTION
source

Immutable source A or C.

TYPE: VideoDataLayer

target

Corresponding editable layer B or D.

TYPE: VideoDataLayer

session

Session whose data is read and updated.

TYPE: Session

frame_index

Frame to initialize if its source contains boxes.

TYPE: int

Side Effects

Acquires the session's reentrant data lock across the check and write. Existing target frames, including intentionally empty frames, remain untouched. Missing or empty source frames do not create target entries.