Expand description
Decoders for the client camera uplink.
Clients send whatever their browser can produce: H.264 (WebCodecs or the WebRTC media track),
VP8/VP9/AV1/HEVC (same sources), or MJPEG from the canvas fallback. Every codec lands in the same
I420 view so the rest of the pipeline is codec-agnostic. Inter-coded codecs go through FFmpeg’s
avcodec (already linked for VA-API); MJPEG goes through TurboJPEG, which pixelflux already uses for
its own JPEG stripes. Decoding is software here; a hardware decoder only changes which Decoder
is constructed.
Structs§
- AvDecoder
- avcodec-backed decoder for the inter-coded codecs.
- Jpeg
Decoder - TurboJPEG decoder: 4:2:0 JPEGs decode straight into I420 planes; other subsamplings take the RGB route and are converted.
Enums§
- Codec
- Input codecs, by wire id. The ids are part of the Selkies WebSocket framing and are exported to
Python as
VirtualCamera.CODEC_*. - Decode
Error
Traits§
Functions§
- new_
decoder - sniff_
keyframe - Cheap bitstream inspection for the codecs whose keyframes can be recognized without a full
parse;
Nonewhen the codec gives no such signal and the caller’s flag must be trusted.