PrismCore / API reference / Probing and input
Structure
SourceStructure
struct SourceStructureDeclared in Sources/PrismCore/Probe/SourceStructure.swift · PrismCore 3.5.4
What a probe can say about a container's layout and index — the half of an open that SourceInfo has never described.
SourceInfo answers "what streams are in here"; this answers "where does the header end, where does the media start, and is there an index". A server that has already analysed a file can hand these two scalars to a client about to read the same bytes over a network, which turns the client's first open-ended request into a bounded one.
Every field is optional or has an unknown case, and nothing here is ever inferred. A value that was not measured is absent; a question that was not asked is unknown. The cost of a wrong scalar is paid by the host that trusts it, at a distance, on a file this process will never see again — so the export refuses to guess in the one direction that would be convenient.
Initializers
init(headerBytes: Int?, firstClusterOffset: Int64?, indexLocation: IndexLocation, index: IndexSummary?, byteSize: Int64?)No documentation comment in the source.
Instance properties
let headerBytes: Int?The length of the initial metadata region, from byte 0 of the source.
A sizing hint and nothing more: a consumer reads these bytes and parses them exactly as it does today, so a wrong value costs an extra read, never a wrong parse.
let firstClusterOffset: Int64?The offset of the first top-level media element — for Matroska the first byte of the first Cluster element's ID, for ISO-BMFF the first byte of the mdat box. Same coordinates as headerBytes.
let index: IndexSummary?The index, when one was actually read. nil when no index load was requested, or when it was requested and did not fit its budget.
Type properties
static let unknown: SourceStructureNothing measured. The resting state of a probe that was not asked for a structure export, and the only shape that costs no I/O at all.
static let maxExportedKeyframes: IntThe ceiling on how many timestamps an export will carry.
The consumer of this export is a helper with a 1 MiB output limit, and a timestamp costs roughly eight bytes as JSON text. Twenty thousand entries is a three-hour film at a half-second keyframe cadence — well past any real VOD encode — and still leaves the rest of the document room. Past the cap entryCount and completeness are still reported: a poorer document, on time, rather than a complete one that overruns.
Generated from the public symbols of PrismCore 3.5.4. All types