CMGetAttachment(_:key:attachmentModeOut:)
Returns an attachment from an attachment bearer object.
Declaration
func CMGetAttachment(_ target: CMAttachmentBearer, key: CFString, attachmentModeOut: UnsafeMutablePointer<CMAttachmentMode>?) -> CFTypeRef?Parameters
- target:
Specifies the
CMAttachmentBearerwhose attachment you want to retrieve. - key:
Key in the form of a
CFStringidentifying the desired attachment. - attachmentModeOut:
On output,
attachmentModepoints to the mode of the attachment. See Cmattachmentmodefor possible values. May beNULL.
Return Value
The requested attachment object or NULL if not found.
Discussion
You can attach any Core Foundation object to a CMAttachmentBearer to store additional information. CMGetAttachment retrieves an attachment identified by a key. Given a CVBuffer, CMGetAttachment is equivalent to CVBufferCopyAttachment(_:_:_:).