sip/video/video_codec library

Pluggable video codec for VideoSession.

Two implementations ship in this UA:

  • PassthroughVideoCodec — used by tests and any caller that wants to feed pre-encoded bytestream frames straight onto the wire (e.g. server-recorded VP8 files, file-based loopback).
  • PureDartVpxAdapter — a placeholder that hooks a future package:pure_dart_vpx build into the same interface. As of this writing the upstream package only contains skeleton code, so the adapter throws UnimplementedError. Replace the body once the real encoder/decoder ships.

The shape of the interface is deliberately minimal so it can target hardware codecs (FFI, plugin) too — encoders accept a YUV420p frame and return one or more compressed frames; decoders accept a single compressed frame and return zero or one decoded YUV420p frames.

Classes

EncodedVideoFrame
Encoded compressed-video frame plus a hint of whether it's a key frame.
PassthroughVideoCodec
Pretends to encode by handing the input bytes back out unchanged. Useful for tests and for piping pre-encoded frames through the RTP transport.
PureDartVpxAdapter
Adapter slot for package:pure_dart_vpx.
VideoDecoder
VideoEncoder
YuvFrame
I420 (YUV 4:2:0) frame.