PrismCore / API reference / Probing and input

Structure

VideoTrackInfo

struct VideoTrackInfo

Declared 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 streamIndex: Int

No documentation comment in the source.

let codecName: String

No documentation comment in the source.

let profileName: String?

No documentation comment in the source.

let profile: Int32

AVCodecParameters.profile / .level as libavcodec reports them.

let level: Int32

No documentation comment in the source.

let width: Int

No documentation comment in the source.

let height: Int

No documentation comment in the source.

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 bitDepth: Int?

Luma bit depth from the pixel format, nil if the format is unknown.

let colorPrimariesName: String?

No documentation comment in the source.

let colorTransferName: String?

No documentation comment in the source.

let colorSpaceName: String?

No documentation comment in the source.

let isBT2020: Bool

No documentation comment in the source.

let frameRate: Double?

No documentation comment in the source.

let frameRateSource: FrameRateSource

No documentation comment in the source.

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: FieldOrder

Verified 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.

let dolbyVision: DolbyVisionConfiguration?

No documentation comment in the source.

let dynamicRange: DynamicRange

No documentation comment in the source.

let copyability: StreamCopyability

No documentation comment in the source.

Structure

VideoTrackInfo.AspectRatio

struct AspectRatio

A 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

let numerator: Int

No documentation comment in the source.

let denominator: Int

No documentation comment in the source.

Enumeration

VideoTrackInfo.FieldOrder

enum FieldOrder

How 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

case progressive

No documentation comment in the source.

case topFieldFirst

No documentation comment in the source.

case bottomFieldFirst

No documentation comment in the source.

case unknown

The container didn't say and no verification ran — treated as progressive by routing (never evict on a guess).

Instance properties

var isInterlaced: Bool { get }

No documentation comment in the source.

Enumeration

VideoTrackInfo.FrameRateSource

enum FrameRateSource

No documentation comment in the source.

Cases

case averageFrameRate

No documentation comment in the source.

case realFrameRate

No documentation comment in the source.

case unknown

No documentation comment in the source.

Generated from the public symbols of PrismCore 3.5.4. All types