PrismCore / API reference / Probing and input
Structure
VideoTrackInfo
struct VideoTrackInfoDeclared in Sources/PrismCore/Probe/SourceProbe.swift · PrismCore 3.5.4
No documentation comment in the source.
Initializers
init(streamIndex: Int, codecName: String, profileName: String?, profile: Int32, level: Int32, width: Int, height: Int, sampleAspectRatio: AspectRatio?, bitDepth: Int?, colorPrimariesName: String?, colorTransferName: String?, colorSpaceName: String?, isBT2020: Bool, frameRate: Double?, frameRateSource: FrameRateSource, bitRate: Int64? = nil, fieldOrder: FieldOrder, hevcConfiguration: HEVCConfigurationRecord?, avcConfiguration: AVCConfigurationRecord?, av1Configuration: AV1ConfigurationRecord?, nalUnitLengthSize: Int?, dolbyVision: DolbyVisionConfiguration?, dynamicRange: DynamicRange, copyability: StreamCopyability)Explicit, with new-field defaults — the SourceInfo rule: fields can be added without breaking the tests (or hosts) that construct fixtures.
Instance properties
let sampleAspectRatio: AspectRatio?The pixel aspect ratio the display should honor, container-level over bitstream (an MKV's DisplayWidth/Height outranks the codec's VUI — anamorphic DVD rips are usually tagged only at the container). nil when neither says — treated as square.
let bitRate: Int64?The stream's declared bit rate in bits/second (codecpar->bit_rate), nil when the container doesn't say — MKV video very often doesn't.
let fieldOrder: FieldOrderVerified scan type; see FieldOrder. Interlaced video cannot ride the native path honestly — AVPlayer does not deinterlace, so a stream-copy would play with combing — which is why copyability reflects this.
let hevcConfiguration: HEVCConfigurationRecord?No documentation comment in the source.
let avcConfiguration: AVCConfigurationRecord?The avcC bytes, for H.264 sources (nil for anything else).
let av1Configuration: AV1ConfigurationRecord?The av1C fields, for AV1 sources (nil for anything else).
let nalUnitLengthSize: Int?How many bytes each NAL unit's length prefix occupies in this stream's packets (lengthSizeMinusOne + 1), read from the configuration record.
Needed by anything that has to walk the packets' NAL units rather than pass them through — today that is the Profile 7 → 8.1 RPU conversion. nil for Annex-B sources and non-HEVC/AVC codecs, which is also exactly when that conversion can't run.
Structure
VideoTrackInfo.AspectRatio
struct AspectRatioA pixel (sample) aspect ratio, kept rational — 64/45 is exact where 1.4222… is not.
Initializers
init(numerator: Int, denominator: Int)No documentation comment in the source.
Instance properties
Enumeration
VideoTrackInfo.FieldOrder
enum FieldOrderHow the stream's pictures are scanned — after verification, not as declared. Broadcast H.264 routinely arrives flagged interlaced while carrying progressive frames ("progressive in interlaced carriage"), and trusting the flag would evict exactly those sources from the native path for no visual gain — so a declared-interlaced H.264 stream is verified against a handful of decoded frames before it is reported interlaced here.
Cases
Instance properties
Enumeration
VideoTrackInfo.FrameRateSource
enum FrameRateSourceNo documentation comment in the source.
Cases
Generated from the public symbols of PrismCore 3.5.4. All types