encode method
In passthrough mode encode accepts raw bitstream wrapped as a
fake YuvFrame whose y plane carries the bytestream. Caller
should keep width/height populated for upper layers but the
chroma planes are unused.
Implementation
@override
List<EncodedVideoFrame> encode(YuvFrame frame, {bool forceKeyframe = false}) {
return [
EncodedVideoFrame(
bytes: Uint8List.fromList(frame.y),
keyFrame: forceKeyframe,
timestamp: 0,
),
];
}