MediaResolver class abstract interface

Pre-resolves every media source before the frame loop and serves the resolved bytes (and decoded images) synchronously during it.

The shape is the determinism guarantee: all IO (downloads, disk reads, decodes) happens in preResolveAll before the first frame is pumped, and both resolvedFor and decodedImageFor are pure synchronous lookups — no frame can ever await media. The contract keys on MediaSource (not Uri) because asset/memory sources have no honest URL. The real resolver (the MediaRepository) is the library default; NoMediaResolver stays exported as the media-less choice and tests run against a canned fake.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bandTableFor(AudioSource source) → BandTable
The analysed BandTable for audio source — synchronous by contract, so the ReactiveScope can serve it down to the reactive effects.
beatGridFor(AudioSource source) → BeatGrid
The detected BeatGrid for audio source — synchronous by contract, so Trigger.beat resolves against it during timing resolution.
clipMetadataFor(MediaSource source) ClipMetadata
The probed ClipMetadata of clip source — synchronous by contract, so the resampler can read its source fps and frame count during the frame loop.
cuesFor(CaptionSource source) List<CaptionCue>
The parsed CaptionCues for caption source — synchronous by contract, so the caption layer can pick the active cue at the current frame.
decodedClipFrame(MediaSource source, int sourceFrame) Image
The pre-decoded image of clip source at sourceFrame — synchronous by contract, so paint hands it straight to a RawImage.
decodedImageFor(MediaSource source) Image
The pre-decoded image for source — synchronous by contract, so paint can hand it straight to a RawImage with no async-in-frame.
decodedSnapshotFor(SnapshotSource source) Image
The pre-decoded image for snapshot source — synchronous by contract, so paint hands it straight to a RawImage with no async-in-frame.
materializedAudioPathFor(AudioSource source) String
The materialized local file path for audio source — synchronous by contract, so the encode-plan builder can hand it to an audio track node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preResolveAll(Iterable<MediaSource> sources) Future<void>
Resolves every source in sources (download, read, decode) so that resolvedFor and decodedImageFor can answer synchronously during the frame loop.
preResolveAudio(Iterable<AudioSource> sources) Future<void>
Materializes every audio source in sources into a sandbox file the encoder can -i, validating and allowlisting each one first.
preResolveCaptions(CaptionSource source) Future<void>
Reads and parses caption source into CaptionCues before the frame loop, so cuesFor can serve them synchronously during it.
preResolveClip(MediaSource source, Iterable<int> sourceFrames) Future<void>
Probes source and extracts every source frame in sourceFrames, decoding each to a ui.Image cached by (source, frame) so paint can read it synchronously.
preResolveReactive(Iterable<AudioSource> sources, {required BeatDetectionService beatDetector, required FrequencyAnalyzer analyzer, required int fps, required int totalFrames}) Future<void>
Analyses every reactive audio source in sources into a BeatGrid and a BandTable before the frame loop.
preResolveSnapshots(Iterable<SnapshotSource> sources, SnapshotService service) Future<void>
Rasterizes every snapshot in sources through service and decodes each raster to a ui.Image cached by content hash, so decodedSnapshotFor can answer synchronously during the frame loop.
probeClip(MediaSource source) Future<ClipMetadata>
Probes clip source for its ClipMetadata (fps, frame count, size) and caches it, so the render's clip pre-pass can plan which source frames to extract before calling preResolveClip.
resolvedFor(MediaSource source) ResolvedMedia
The pre-resolved bytes and content hash for source — synchronous by contract.
toString() String
A string representation of this object.
inherited

Operators

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