DemuxerCacheState class final

Rich snapshot of mpv's demuxer-cache-state: the parts useful to an audio UI streaming over the network. Complements the scalar NetworkState.bufferingPercentage and NetworkState.bufferDuration with the structured cache picture.

All fields are empty, false or null for directly-seekable local files (mpv only populates the cache state for network or cached sources).

Constructors

DemuxerCacheState({List<CacheRange> seekableRanges = const <CacheRange>[], double? rawInputRate, bool eofCached = false, bool bofCached = false, bool underrun = false})
Creates a cache-state snapshot; defaults model an inactive cache.
const

Properties

bofCached → bool
Whether the cache holds data back to the beginning of the stream.
final
eofCached → bool
Whether the cache holds data up to the end of the stream: a seek to the end is instant and no further network reads are needed.
final
hashCode → int
The hash code for this object.
no setteroverride
rawInputRate → double?
Actual input (download) rate in bytes per second, or null when not reading over the network. Distinct from NetworkState.cacheSpeed (the cache fill rate); this is the raw stream read rate.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seekableRanges → List<CacheRange>
Time ranges currently buffered; render these as the "downloaded" regions of a network seek bar. Empty when nothing is cached.
final
underrun → bool
Whether the demuxer is currently starved (read faster than the network delivers). Complements NetworkState.pausedForCache.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

empty → const DemuxerCacheState
The inactive cache state: no ranges, nothing cached.