CVPixelBufferCreateResolvedAttributesDictionary(_:_:_:)
Resolves an array of CFDictionary objects describing various pixel buffer attributes into a single dictionary.
Declaration
func CVPixelBufferCreateResolvedAttributesDictionary(_ allocator: CFAllocator?, _ attributes: CFArray?, _ resolvedDictionaryOut: UnsafeMutablePointer<CFDictionary?>) -> CVReturnParameters
- allocator:
The allocator to use to create the pixel buffer. Pass
NULLto specify the default allocator. - attributes:
An array of Core Foundation dictionaries containing pixel buffer attribute key-value pairs.
- resolvedDictionaryOut:
On output, the consolidated dictionary. Ownership follows the 20001148 103029.
Return Value
A Core Video result code. See Core Video Constants for possible values.
Discussion
This call is useful when you need to resolve requirements between several potential clients of a buffer.
If two or more dictionaries contain the same key but different values, this function adjusts values where possible so that the output dictionary contains a mutually compatible set of values. For example, if the attributes parameter contains dictionaries whose bytes-per-row attributes differ, the rowBytes value in the output dictionary is the least common multiple of the input values.
Some mismatched attributes cannot be resolved. Calling this function results in an error if the widths, heights, pixel format allocators, or callbacks in the input dictionaries do not match.
See Also
Inspecting Pixel Buffers
CVPixelBufferGetBaseAddress(_:)CVPixelBufferGetBaseAddressOfPlane(_:_:)CVPixelBufferGetBytesPerRow(_:)CVPixelBufferGetBytesPerRowOfPlane(_:_:)CVPixelBufferGetHeight(_:)CVPixelBufferGetHeightOfPlane(_:_:)CVPixelBufferGetWidth(_:)CVPixelBufferGetWidthOfPlane(_:_:)CVPixelBufferIsPlanar(_:)CVPixelBufferGetPlaneCount(_:)CVPixelBufferGetDataSize(_:)CVPixelBufferGetPixelFormatType(_:)CVPixelBufferGetExtendedPixels(_:_:_:_:_:)CVPixelBufferGetIOSurface(_:)CVPixelBufferGetTypeID()