RenderService class final

Drives the deterministic capture pipeline: pre-resolve media, loop the frames (cache → pump → capture → append), then write the manifest last as the completion signal.

The frame loop is the only clock: every frame is explicitly pumped via the injected FramePump before its pixels are read, media is pre-resolved before the first frame, and frames whose render digest is already cached replay from disk without pumping at all.

Constructors

RenderService({required FrameCaptureService capture, MediaResolver media = const NoMediaResolver(), FrameCache? cache, VideoEncoderService encoder = const VideoEncoderService()})
Creates a render service over the injected seams.

Properties

encoder → VideoEncoderService
Plans the encode arguments embedded in the manifest.
final
hashCode int
The hash code for this object.
no setterinherited
media MediaResolver
Resolves media before the frame loop and serves it synchronously during.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

captureToDirectory({required RenderConfig config, required Directory outDir, required FramePump pump, required GlobalKey<State<StatefulWidget>> boundaryKey, required String compositionKey, Iterable<MediaSource> mediaSources = const [], Iterable<AudioSource> audioSources = const [], AudioMixStager? stageAudio, Export? export, int? posterFrame, ProgressCallback? onProgress}) Future<RenderManifest>
Captures config.frameCount frames into outDir/frames.rgba and writes outDir/manifest.json last, returning the parsed manifest.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render({required RenderConfig config, required Directory outDir, required FramePump pump, required GlobalKey<State<StatefulWidget>> boundaryKey, required String compositionKey, required FfmpegRunner runner, Iterable<MediaSource> mediaSources = const [], Iterable<AudioSource> audioSources = const [], AudioMixStager? stageAudio, Export? export, int? posterFrame, ProgressCallback? onProgress}) Future<File>
captureToDirectory followed by an in-process encode through runner, returning the encoded outDir/out.mp4.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited