<!--
{
  "documentType" : "article",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/cmtaggedbuffergroup",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "CMTaggedBufferGroup"
}
-->

# CMTaggedBufferGroup

Objective-C types and interfaces for working with Core Media tagged buffer groups.

## Topics

### Creating Tagged Buffer Groups

[`extern OSStatus CMTaggedBufferGroupCreate(CFAllocatorRef allocator, CFArrayRef tagCollections, CFArrayRef buffers, CMTaggedBufferGroupRef*groupOut);`](/documentation/CoreMedia/CMTaggedBufferGroupCreate)

Creates a new tagged buffer group from a pair of buffers and the tags to associate with them.

[`extern OSStatus CMTaggedBufferGroupCreateCombined(CFAllocatorRef allocator, CFArrayRef taggedBufferGroups, CMTaggedBufferGroupRef*groupOut);`](/documentation/CoreMedia/CMTaggedBufferGroupCreateCombined)

Creates a new tagged buffer group from an array of existing tagged buffer groups.

### Inspecting Tagged Buffer Groups

[`extern CMItemCount CMTaggedBufferGroupGetCount(CMTaggedBufferGroupRef group);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCount)

Gets the number of buffers contained within a tagged buffer group.

[`extern CMItemCount CMTaggedBufferGroupGetNumberOfMatchesForTagCollection(CMTaggedBufferGroupRef group, CMTagCollectionRef tagCollection);`](/documentation/CoreMedia/CMTaggedBufferGroupGetNumberOfMatchesForTagCollection)

Gets the number of buffers in the group associated with a given tag collection.

[`extern CMTagCollectionRefCMTaggedBufferGroupGetTagCollectionAtIndex(CMTaggedBufferGroupRef group, CFIndex index);`](/documentation/CoreMedia/CMTaggedBufferGroupGetTagCollectionAtIndex)

Gets the collection of tags for a buffer at a given index in the group.

[`extern CFTypeID CMTaggedBufferGroupGetTypeID();`](/documentation/CoreMedia/CMTaggedBufferGroupGetTypeID)

Gets the internal type ID for a tagged buffer group.

### Accessing Sample Buffers

[`extern CMSampleBufferRefCMTaggedBufferGroupGetCMSampleBufferAtIndex(CMTaggedBufferGroupRef group, CFIndex index);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCMSampleBufferAtIndex)

Gets the sample buffer at a given index in the buffer group.

[`extern CMSampleBufferRefCMTaggedBufferGroupGetCMSampleBufferForTag(CMTaggedBufferGroupRef group, CMTag tag, CFIndex *indexOut);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCMSampleBufferForTag)

Gets the single sample buffer in a group which contains a given tag, if present.

[`extern CMSampleBufferRefCMTaggedBufferGroupGetCMSampleBufferForTagCollection(CMTaggedBufferGroupRef group, CMTagCollectionRef tagCollection, CFIndex *indexOut);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCMSampleBufferForTagCollection)

Gets the single sample buffer in a group which contains a given tag collection, if present.

### Accessing Pixel Buffers

[`extern CVPixelBufferRefCMTaggedBufferGroupGetCVPixelBufferAtIndex(CMTaggedBufferGroupRef group, CFIndex index);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCVPixelBufferAtIndex)

Gets the pixel buffer at a given index in the buffer group.

[`extern CVPixelBufferRefCMTaggedBufferGroupGetCVPixelBufferForTag(CMTaggedBufferGroupRef group, CMTag tag, CFIndex *indexOut);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCVPixelBufferForTag)

Gets the single pixel buffer in a group which contains a given tag, if present.

[`extern CVPixelBufferRefCMTaggedBufferGroupGetCVPixelBufferForTagCollection(CMTaggedBufferGroupRef group, CMTagCollectionRef tagCollection, CFIndex *indexOut);`](/documentation/CoreMedia/CMTaggedBufferGroupGetCVPixelBufferForTagCollection)

Gets the single pixel buffer in a group which contains a given tag collection, if present.

### Inspecting Buffer Format

[`extern OSStatus CMTaggedBufferGroupFormatDescriptionCreateForTaggedBufferGroup(CFAllocatorRef allocator, CMTaggedBufferGroupRef taggedBufferGroup, CMTaggedBufferGroupFormatDescriptionRef*formatDescriptionOut);`](/documentation/CoreMedia/CMTaggedBufferGroupFormatDescriptionCreateForTaggedBufferGroup)

Creates a new format description for a tagged buffer group.

[`extern Boolean CMTaggedBufferGroupFormatDescriptionMatchesTaggedBufferGroup(CMTaggedBufferGroupFormatDescriptionRef desc, CMTaggedBufferGroupRef taggedBufferGroup);`](/documentation/CoreMedia/CMTaggedBufferGroupFormatDescriptionMatchesTaggedBufferGroup)

Checks to see if a tagged buffer group’s format matches an existing format description.

### Types

[`typedef struct OpaqueCMTaggedBufferGroup * CMTaggedBufferGroupRef;`](/documentation/CoreMedia/CMTaggedBufferGroupRef)

A reference to a tagged buffer group instance.

[`typealias CMTaggedBufferGroupFormatDescription`](/documentation/CoreMedia/CMTaggedBufferGroupFormatDescription)

A type for tagged buffer format descriptions.

[`typealias CMTaggedBufferGroupFormatType`](/documentation/CoreMedia/CMTaggedBufferGroupFormatType)

A type for tagged buffer format information.

### Errors

[`enum CMTaggedBufferGroupError : OSStatus;`](/documentation/CoreMedia/CMTaggedBufferGroupError)

Error codes returned by Core Media when working with tagged buffer groups.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)