Contents

CMCopyDictionaryOfAttachments(allocator:target:attachmentMode:)

Returns a dictionary of all attachments for an attachment bearer object.

Declaration

func CMCopyDictionaryOfAttachments(allocator: CFAllocator?, target: CMAttachmentBearer, attachmentMode: CMAttachmentMode) -> sending CFDictionary?

Parameters

  • allocator:

    Allocator for the new dictionary; pass Kcfallocatordefault or NULL to use the default allocator.

  • target:

    Specifies the Cmattachmentbearer whose attachments you want to obtain.

  • attachmentMode:

    The mode of the attachments you want to obtain. See Cmattachmentmode for possible values.

Return Value

A Core Foundation dictionary with all attachments identified by their keys. If no attachment is present, the dictionary is empty. Returns NULL for an invalid attachment mode.

Discussion

CMCopyDictionaryOfAttachments is a convenience call that returns all attachments with their corresponding keys in a new CFDictionary. Given a CVBufferRef, CMCopyDictionaryOfAttachments is similar to CVBufferGetAttachments, except that the CFDictionary that CMCopyDictionaryOfAttachments returns isn’t updated for later changes to the attachments.

See Also

Processing Attachments