PrismCore / API reference / Software playback
Structure
SoftwareDecoderAvailability
struct SoftwareDecoderAvailabilityDeclared in Sources/PrismCore/Software/SoftwareDecoderAvailability.swift · PrismCore 3.5.4
What the linked FFmpeg can decode on the software path.
Phase 7 exists for codecs AVPlayer's HLS-fMP4 pipeline refuses, so the first question any routing decision asks is "does this build even have a decoder for it". That answer belongs to the binary, not to a table in our source: PrismCore links MPVKit's FFmpeg, Aether links its own MPVKit fork, and a configure flag either side of that line changes the answer. Hardcoding a codec list is how a router ends up promising a decode that fails at open.
So this is a runtime read of avcodec_find_decoder plus avcodec_get_hw_config, over the codec set phase 7 cares about. It is also what the availability test prints, which is the only honest way to document "what MPVKit ships" in a repo that doesn't own the FFmpeg build.
Hardware note: several of these codecs (VP9, MPEG-2, MPEG-4 ASP, H.264, HEVC) carry a videotoolbox hwaccel config in MPVKit's build, so "software path" is a routing name, not a promise about where the decode happens — SoftwareVideoDecoder takes the VideoToolbox route when it exists (see its docs) and only falls back to CPU decoding.
Instance properties
Instance methods
func isAvailable(_ codecName: String) -> BoolNo documentation comment in the source.
Type methods
Structure
SoftwareDecoderAvailability.Entry
struct EntryNo documentation comment in the source.
Instance properties
let decoderName: String?The decoder avcodec_find_decoder picks, or nil when this build has none. Not always the codec name: AV1 resolves to libdav1d.
let supportsVideoToolbox: BoolWhether that decoder advertises a VideoToolbox hwaccel config, i.e. whether SoftwareVideoDecoder can hand it to the GPU and get CVPixelBuffers back without a pixel copy.
Enumeration
SoftwareDecoderAvailability.MediaType
enum MediaTypeNo documentation comment in the source.
Cases
Generated from the public symbols of PrismCore 3.5.4. All types