PrismCore / API reference / Probing and input

Structure

HEVCConfigurationRecord

struct HEVCConfigurationRecord

Declared in Sources/PrismCore/Probe/SourceProbe.swift · PrismCore 3.5.4

The hvcC profile_tier_level fields, which are the only honest source for an HEVC CODECS string.

AVCodecParameters.profile / .level alone cannot produce one: they carry no tier flag, no profile space and — critically — no general_profile_compatibility_flags, the element AVPlayer checks the declaration against. So we read the record itself.

Initializers

init(profileSpace: UInt8, tierFlag: UInt8, profileIDC: UInt8, profileCompatibilityFlags: UInt32, constraintIndicatorFlags: UInt64, levelIDC: UInt8)

No documentation comment in the source.

Instance properties

let profileSpace: UInt8

general_profile_space, 0…3 (printed as the '', 'A', 'B', 'C' prefix).

let tierFlag: UInt8

general_tier_flag: 0 = Main tier ('L'), 1 = High tier ('H').

let profileIDC: UInt8

general_profile_idc: 1 = Main, 2 = Main10, 4 = Rext, …

let profileCompatibilityFlags: UInt32

general_profile_compatibility_flags, stored order (NOT reversed). A real Main10 record stores 0x20000000.

let constraintIndicatorFlags: UInt64

general_constraint_indicator_flags: 48 bits, right-aligned in the UInt64 (byte 0 of the 6 is the most significant of the low 48).

let levelIDC: UInt8

general_level_idc = level × 30 (L4.0 = 120, L5.1 = 153).

Type methods

static func parse(hvcC data: Data) -> HEVCConfigurationRecord?

Parses an ISO 14496-15 HEVCDecoderConfigurationRecord (the hvcC / hev1 box payload, which is what libavformat hands us as HEVC extradata for MP4- and Matroska-sourced streams).

Returns nil for anything else — most importantly Annex-B extradata (MPEG-TS sources, where the parameter sets arrive in band). Deriving a PTL from Annex-B means parsing the SPS, which phase 4 deliberately does not do: without a record we simply have no HEVC CODECS string, and the caller routes media-direct instead of guessing one.

Generated from the public symbols of PrismCore 3.5.4. All types