StreamSourceSequenceNode.endCurrentSource() method

End the currently active source immediately. The engine fires a synthetic PreloadEnded for the active pin, which surfaces as the existing onAdvance callback with lastSeenPts set to the source’s last rebased output PTS (engine’s state.latestOutputPts captured atomically at the synthetic-end moment).

After this call, no further frames from the just-ended pin flow downstream — the engine inserts the tag into its trimmedSources map so any in-flight upstream frames are silently dropped at processInput.

Useful for cross-node manual cuts where the caller wants to anchor the next node’s releasePreloaded at the just-ended source’s PTS (mirrors SSS’s endCurrentSource — symmetric API).

If a releasePreloaded(pin, ...) was previously queued via pendingRelease, the Advance callback fires for that pin; otherwise it fires for the sequence-next pin.

Idempotent — calling a second time while the tag is already ended is a silent no-op (logged engine-side, no callback re-fires). No-op when there is no active source.

Signature:

endCurrentSource(): Promise<void>;

Returns:

Promise<void>