PrismCore / API reference / Engine and session

Enumeration

StartupPhase

enum StartupPhase

Declared in Sources/PrismCore/StartupProgress.swift · PrismCore 3.5.4

The stages a session passes through on its way to a playable playlist, in the order they occur.

Deliberately not a percentage. Nobody — not the engine, not the host — knows in advance how long a probe over a slow origin takes, so a fraction would be a number invented to fill a progress bar. Stages with timestamps are things that happened; a fraction would be a claim the engine cannot measure, and this engine does not make those.

Cases

case sourceOpened

The source is open and avformat_find_stream_info has returned: the demuxer is usable. On a remote origin this is usually the long one.

A session handed a ProbedSource reaches this almost immediately — the context was opened by the routing probe and is adopted, not reopened.

case streamInfoResolved(SourceInfo)

What the source turned out to be: tracks, codecs, languages, chapters, the video's dynamic range and its declared Dolby Vision configuration.

The container's own claims. The bitstream answers that outrank them — whether an E-AC-3 track really carries JOC most of all — come later, from PrismCoreSession.objectAudio, because they need produced packets to read (see AGENTS.md on AVCodecParameters.profile).

case segmentPlanReady(origin: SegmentPlanOrigin, segments: Int)

The segmentation is decided. origin is worth surfacing rather than hiding: the three cases cost wildly different amounts of time and produce differently seekable sessions, and a host that wants to say "first play of this file is sequential" can only know it from here.

case firstVideoSegmentWritten(index: Int)

A video segment is on disk — under delay_moov this is also the cut that mints the init segment, so it is the first moment anything is fetchable at all. index is its position in the playlist; during startup that is 0, and it is reported rather than assumed.

case playlistServable(URL)

Everything the playlist references exists and start() is about to return this URL. The last checkpoint of a successful startup.

Generated from the public symbols of PrismCore 3.5.4. All types