ThumbnailRequest

class ThumbnailRequest(val composition: EditComposition, val position: Duration, val heightPx: Int?, val effectsRevision: Long, val precise: Boolean, val exportSpec: ExportSpec = ExportSpec())(source)

What one thumbnail was asked for.

Throws

when heightPx is zero or less.

Constructors

Link copied to clipboard
constructor(composition: EditComposition, position: Duration, heightPx: Int?, effectsRevision: Long, precise: Boolean, exportSpec: ExportSpec = ExportSpec())

Properties

Link copied to clipboard

The composition to render, so the strip shows effect-applied frames rather than raw source frames.

Link copied to clipboard

An opaque token over everything that would change a rendered frame, and part of the cache key so stale pre-crop thumbnails do not survive an edit. Compare it for equality only. It changes on a structural edit and on the commit of a crop or rotation drag, and holds during the drag, but it does not increase and carries no ordering.

Link copied to clipboard

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

Link copied to clipboard

Target height in pixels. The width follows from the composition's output aspect. Null renders at the composition's own output height, and so does a height at or above it, since a frame is never scaled up.

Link copied to clipboard

The composition time to render.

Link copied to clipboard

Whether the frame has to be the one covering position. False lets a source answer from the nearest sync sample instead, taking the faster read where it has one, which is what a strip wants. ThumbnailResult.Success.presentationTime says which frame came back either way.