CVBufferCopyAttachment(_:_:_:)
Returns a copy of an attachment from a Core Video buffer.
Declaration
func CVBufferCopyAttachment(_ buffer: CVBuffer, _ key: CFString, _ attachmentMode: UnsafeMutablePointer<CVAttachmentMode>?) -> CFTypeRef?Parameters
- buffer:
A buffer with an attachment to copy.
- key:
A string that identifies the attachment, which can be of any Cftyperef. See Cvbuffer Attachment Keys and Image Buffer Attachment Keys for predefined values.
- attachmentMode:
On output, this value points to the mode of the attachment. See Cvattachmentmode for possible values. This value is Nil 227m0 if the buffer doesn’t define an attachment mode.
Return Value
The requested attachment, or nil if no attachment for the specified key exists.
Discussion
This function returns a retained attachment value, which you need to release when you’re done with it.