Skip to main content

Module link

Module link 

Source
Expand description

The link between the media engine and whatever captures, encodes, decodes and paints video (a webview over a loopback socket, or an in-process port). Binary messages, the first byte says what follows.

Enums§

FromLink
Received from the encoder side of the link.
LinkMsg
What one link message is.
ToLink
Sent to the encoder side of the link.

Constants§

KIND_CONTROL
A JSON control message.
KIND_FRAME
A video frame: the 16-byte wire header, then the encoded bytes. The same bytes go on the QUIC stream, so nothing is re-framed in between.
KIND_PCM
Raw audio from a screen share: a 5-byte header (sample rate u32, channels u8) and interleaved little-endian f32 samples. Cancelled and encoded on the other side.
PCM_HEADER_LEN

Functions§

control
A control message ready to send to the encoder side.
parse
Parses a message from the encoder side. frame is the header plus payload, the exact bytes to put on the wire.