Contents

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 CMAttachmentBearer whose attachment you want to retrieve.

  • key:

    Key in the form of a CFString identifying the desired attachment.

  • attachmentModeOut:

    On output, attachmentMode points to the mode of the attachment. See Cmattachmentmodefor possible values. May be NULL.

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(_:_:_:).

See Also

Processing Attachments