Contents

CMSampleBufferCreateForImageBufferWithMakeDataReadyHandler(_:_:_:_:_:_:_:)

Creates a sample buffer with an image buffer and a handler to make the data ready for use.

Declaration

func CMSampleBufferCreateForImageBufferWithMakeDataReadyHandler(_ allocator: CFAllocator?, _ imageBuffer: CVImageBuffer, _ dataReady: Bool, _ formatDescription: CMVideoFormatDescription, _ sampleTiming: UnsafePointer<CMSampleTimingInfo>, _ sampleBufferOut: UnsafeMutablePointer<CMSampleBuffer?>, _ makeDataReadyHandler: CMSampleBufferMakeDataReadyHandler?) -> OSStatus

Parameters

  • allocator:

    The allocator to use to create a sample buffer object. Pass Kcfallocatordefault to use the default allocator.

  • imageBuffer:

    An image buffer that contains the media data. Must not be NULL.

  • dataReady:

    A Boolean value that indicates whether the buffer already contains the data.

  • formatDescription:

    A description of the media data’s format. Must not be NULL.

  • sampleTiming:

    A Cmsampletiminginfo structure that provides the timing information for the media contained in imageBuffer.

  • sampleBufferOut:

    On return, a new Cmsamplebuffer object.

  • makeDataReadyHandler:

    A block for the system to call to make the data ready for use. This argument can be NULL.

Topics

Handlers

See Also

Creating Sample Buffers