NALUnitHeader

public struct NALUnitHeader : Hashable
extension H264.NALUnitHeader: Writable

Network Abstraction Layer Unit (NALU) Header

  • The H.264 specification declares a value of 1 as a syntax violation.

    Declaration

    Swift

    public var forbiddenZeroBit: Bool
  • A value of 0 indicates that the content of the NAL unit is not used to reconstruct reference pictures for inter picture prediction. Such NAL units can be discarded without risking the integrity of the reference pictures. Values greater than 0 indicate that the decoding of the NAL unit is required to maintain the integrity of the reference pictures.

    Note

    Value range is from 0 to 2 inclusive (only the first 2 bits)

    Declaration

    Swift

    public var referenceIndex: UInt8
  • Network Abstraction Layer (NAL) unit payload type

    Declaration

    Swift

    public var type: H264.NALUnitType
  • Undocumented

    Declaration

    Swift

    @inlinable
    public init(forbiddenZeroBit: Bool = false, referenceIndex: UInt8, type: H264.NALUnitType)
  • Undocumented

    Declaration

    Swift

    @inlinable
    public init<D>(from reader: inout BinaryReader<D>) throws where D : DataProtocol, D.Index == Int
  • Undocumented

    Declaration

    Swift

    @inlinable
    public func write<D>(to writer: inout BinaryWriter<D>) throws where D : MutableDataProtocol, D.Index == Int
  • Undocumented

    Declaration

    Swift

    @inlinable
    public var byte: UInt8 { get }
  • size in bytes if written to the network

    Declaration

    Swift

    @inlinable
    public var size: Int { get }