decode method

  1. @override
YuvFrame? decode(
  1. Uint8List bytes
)
override

Decode one encoded frame and return the YUV picture, or null if the codec needs more data (e.g. the inbound stream hasn't seen a keyframe yet).

Implementation

@override
YuvFrame? decode(Uint8List bytes) {
  return YuvFrame(
    width: bytes.length,
    height: 1,
    y: Uint8List.fromList(bytes),
    u: Uint8List(0),
    v: Uint8List(0),
  );
}