Contents

init(pixelBuffer:formatDescription:presentationTimeStamp:duration:)

Creates a sample buffer carrying image buffer.

Declaration

init(pixelBuffer content: Content, formatDescription: CMVideoFormatDescription? = nil, presentationTimeStamp: CMTime, duration: CMTime = .invalid)

Parameters

  • formatDescription:

    Format description of the content. If provided, the format must be have video media type. If not provided, one will be created using CMVideoFormatDescription.init(pixelBuffer:).

  • presentationTimeStamp:

    The time at which sample will be presented. Must be valid numeric time.

  • duration:

    Duration of the sample. Set to CMTime/invalid if not present.