Contents

CVPixelBufferReleaseBytesCallback

A type that defines a release callback function.

Declaration

typealias CVPixelBufferReleaseBytesCallback = (UnsafeMutableRawPointer?, UnsafeRawPointer?) -> Void

Parameters

Discussion

When you create a pixel buffer using CVPixelBufferCreateWithBytes(_:_:_:_:_:_:_:_:_:_:), you can optionally pass a callback function that’s invoked when the system frees the pixel buffer. Use this callback function to release the pixel data and perform any other cleanup needed when the buffer is released.

You define a callback function as shown below:

See Also

Callbacks