frames

abstract fun frames(composition: EditComposition, at: List<Duration>, heightPx: Int? = null, exportSpec: ExportSpec = ExportSpec()): Flow<FrameResult>(source)

Renders several frames, emitting each as it is ready.

For a timeline strip, which reads as a run of frames rather than as a set of exact instants. Each frame may therefore come from the nearest sync sample rather than the one covering its entry in at, where that is the faster read. FrameResult.Success.presentationTime says where a frame actually landed. Use frame when a position has to be exact.

Return

A flow of frames, one per entry in at. The caller owns each and must close it.

Parameters

composition

The edit to render from.

at

Where in the composition to render each frame.

heightPx

The height to render at, in pixels. Null renders at the composition's own output height, and so does a height at or above it. Zero or less fails with dev.jordond.filmstrip.FilmstripError.InvalidComposition.

exportSpec

The export this frame stands in for, which renders it at the HDR grade that export resolves to.