isoBoxesToBytes function

Future<Uint8List> isoBoxesToBytes(
  1. RandomAccessSource src,
  2. List<ISOBox> boxes
)

Write a list of boxes to bytes.

Implementation

Future<Uint8List> isoBoxesToBytes(
    RandomAccessSource src, List<ISOBox> boxes) async {
  final bb = BytesBuilder();
  for (final box in boxes) {
    bb.add(await box.toBytes(src));
  }
  return bb.toBytes();
}