SrtOutputSettingsCommon interface

The settings for an SRT output see: NorskOutput.srt()

Signature:

export interface SrtOutputSettingsCommon extends SinkNodeSettings<SrtOutputNode>, StreamStatisticsMixin

Events

Property Type Description

onConnection?

( streamId: string, streamIndex: number, remoteHost: string, parsed?: SrtStreamIdParsed) ⇒ void

(Optional) On connect callback, notifying that a connection has been established. In caller mode this is raised for the single outbound caller, while in listener mode this means a new caller has connected (possibly one of many) and provides the stream_id that was set on the socket

onConnectionRejected?

(rejection: { streamId: string; route: string; user?: string; remoteHost: string; reason: string; }) ⇒ void

(Optional) A consumer refused at the CRYPTO layer by this egest’s (route, user) grant table — the handshake was rejected before SrtOutputSettingsCommon.onConnection could run. Reasons: "unknown_route" | "unknown_user". A WRONG passphrase fails later in SRT’s key-material exchange and produces no event.

onConnectionStats?

(stats: SrtOutputConnectionStats) ⇒ void

(Optional) Each consumer’s SRT transport stats from the sending side — RTT, what was sent, lost and retransmitted — every SrtOutputSettingsCommon.statsPollIntervalMs (default 1 s). For a bonded consumer, each link’s figures are in bondLinks. Only requested from the engine when this is set.

Properties

Property Type Description

avDelayMs?

number

(Optional) A/V delay in milliseconds - to allow inclusion of subtitles, metadata and other ancillary data. May be set to 0 if these are not present to reduce latency

inputBandwidth?

number

(Optional) Input bandwidth (SRTO_INPUTBW)

jitterBuffer?

JitterBufferConfig

(Optional) Jitter buffer configuration

maxBandwidth?

number

(Optional) Max bandwidth (SRTO_MAXBW)

maxQueueMs?

number

(Optional) Maximum duration to hold any stream in the case that one or more are running behind. In the case the late stream is delayed rather than having a large gap, this will result in discarded input frames.

onDisconnect?

(info: { streamIndex: number; }) ⇒ void

(Optional) On disconnect callback, notifying that an individual client connection has disconnected. This will be followed by a retry in caller mode, while in listener mode is relevant to an individual client (per the provided metadata), while the remaining clients remain connected.

overheadBandwidth?

number

(Optional) Overhead bandwidth (SRTO_OHEADBW)

peerLatency?

number

(Optional) The latency value provided by the sender side as a minimum value for the receiver (SRTO_PEERLATENCY)

receiveLatency?

number

(Optional) The latency value in the receiving direction of the socket (SRTO_RCVLATENCY)

statsPollIntervalMs?

number

(Optional) Interval in milliseconds at which to sample SRT socket statistics. Stats feed metrics, so tune this to the rate at which you want metric updates. When unspecified a default is used.

statusPollIntervalMs?

number

(Optional) Interval in milliseconds at which to sample the underlying SRT socket’s connection state for the per-connection status metric (visible in the visualiser / metrics). When unspecified a default is used.

Note this does not drive SrtOutputSettingsCommon.onConnection or disconnection events: those are driven by actual connection establishment / disconnection detection (a send/receive failure or the peer idle timeout), not by this poll.

tlpktdrop?

boolean

(Optional) Whether to enable the too-late-packet-drop mechanism (SRTO_TLPKTDROP) - default true. On a sender this means dropping packets which have no chance to be delivered. Enabled by default when the receiver supports it.

ts?

TsOutputSettings

(Optional)

writeThroughFile?

WriteThroughFile

(Optional) File to write through all data to (this will be read from in order to produce the final SRT stream, useful for compliance purposes) NB: This will rollover automatically, but no expiry will take place, it is assumed that infrastructure will take care of this