extractFrames method

  1. @override
Future<List<Uint8List>> extractFrames(
  1. String srcPath,
  2. List<Duration> times,
  3. ThumbSize size
)
override

Extracts one frame per entry in times, each scaled to fit size.

photo_manager thumbnails have no timestamp parameter, which is why the trim filmstrip and the cover picker call this instead (spec §6.3).

Not implemented in 0.1.0 — throws UnimplementedError.

Implementation

@override
Future<List<Uint8List>> extractFrames(
  String srcPath,
  List<Duration> times,
  ThumbSize size,
) async {
  frameRequests.add(List<Duration>.unmodifiable(times));
  frameExtractions.add(
    (srcPath: srcPath, times: List<Duration>.unmodifiable(times), size: size),
  );
  await _settle();
  return <Uint8List>[
    for (int index = 0; index < times.length; index++)
      Uint8List.fromList(frameBytes ?? fileBytes),
  ];
}