PrismCore / API reference / Remux and audio

Structure

SourceCacheIdentity

struct SourceCacheIdentity

Declared in Sources/PrismCore/Remux/KeyframeIndexCache.swift · PrismCore 3.5.4

The host's own name for one version of one source, keying the keyframe sidecar (keyframeIndexCacheDirectory) instead of the address the engine was handed.

The URL-based identity cannot survive an address that changes between launches while the bytes stay put — a host's localhost range proxy on a fresh port with a fresh token is exactly that, so every app restart was a cache miss. A host that knows which item it is playing, and holds a strong validator for it from its own server's metadata, says so here, and the sidecar then binds to that: the address, the transport and its ETag stop mattering, so it works over FFmpeg's own HTTP and a host input as well as the coordinated reader.

  • namespace: whose item it is — a server ID, so two servers' item numbers never meet.
  • item: the item (or media part) on that server.
  • etag: a strong validator of the item's bytes, as the server reports it. A weak one (W/…) or an empty one is no proof of the same bytes, so it turns the sidecar off for the source — never back to the URL, which is the key the host is replacing.

The host vouches for it, so it must change whenever the bytes do: a map trusted on a stale tag plans segment cuts on keyframes the new file does not have. The byte size and container duration of the open still go into the key beside it.

Initializers

init(namespace: String, item: String, etag: String)

No documentation comment in the source.

Instance properties

var namespace: String

No documentation comment in the source.

var item: String

No documentation comment in the source.

var etag: String

No documentation comment in the source.

Generated from the public symbols of PrismCore 3.5.4. All types