CVPixelBufferReleasePlanarBytesCallback
Defines a pointer to a pixel buffer release callback function, which is called when a pixel buffer created by Cvpixelbuffercreatewithplanarbytes(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) is released.
Declaration
typealias CVPixelBufferReleasePlanarBytesCallback = (UnsafeMutableRawPointer?, UnsafeRawPointer?, Int, Int, UnsafeMutablePointer<UnsafeRawPointer?>?) -> VoidParameters
- releaseRefCon:
A pointer to application-defined data. This pointer is the same as that passed in the
releaseRefConparameter of Cvpixelbuffercreatewithplanarbytes(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:). - dataPtr:
A pointer to a plane descriptor block. This is the same pointer you passed to Cvpixelbuffercreatewithplanarbytes(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) in the
dataPtrparameter. - dataSize:
The size value you passed to Cvpixelbuffercreatewithplanarbytes(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) in the
dataSizeparameter. - numberOfPlanes:
The number of planes value you passed to Cvpixelbuffercreatewithplanarbytes(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) in the
numberOfPlanesparameter. - planeAddresses:
A pointer to the base plane address you passed to Cvpixelbuffercreatewithplanarbytes(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) in the
basePlaneAddressparameter.
Discussion
You would declare a callback named MyPixelBufferReleasePlanarBytes like this:
Discussion
You use this callback to release the pixels and perform any other cleanup when a pixel buffer is released.