One Logo Pool Ball
CoreMedia · IOS API REFERENCE

CMSampleBuffer.SamplePropertiesCollection

struct · iOS 26.0+ · SDK 27.1

struct SamplePropertiesCollection

Fixed size collection of sample information. This collection contains one element for each sample in the sample buffer. The size of collection is fixed to the number of samples in a sample buffer. Convenience static methods are available on timings & sizes to create this collection by specifying just one value.

Members (12)

get · iOS 26.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: Int { get }

The position of the first element.

get · iOS 26.0+

attachments

TypeScript
get attachments(): (Array<CMSampleBuffer_SampleAttachments>) | null
Swift declaration
var attachments: [CMSampleBuffer.SampleAttachments]? { get set }

Access sample attachments. When setting attachments array, the number of entries must match ``count``.

set · iOS 26.0+

attachments

TypeScript
set attachments(value: (Array<CMSampleBuffer_SampleAttachments>) | null)
Swift declaration
var attachments: [CMSampleBuffer.SampleAttachments]? { get set }

Access sample attachments. When setting attachments array, the number of entries must match ``count``.

init · iOS 26.0+

init

TypeScript
static initSampleCountSizesTimingsAttachments(sampleCount: number, sizes?: (CMSampleBuffer_SizePerSample) | null, timings?: (CMSampleBuffer_TimingPerSample) | null, attachments?: (Array<CMSampleBuffer_SampleAttachments>) | null): CMSampleBuffer_SamplePropertiesCollection
Swift declaration
init(sampleCount: Int, sizes: CMSampleBuffer.SizePerSample?, timings: CMSampleBuffer.TimingPerSample?, attachments: [CMSampleBuffer.SampleAttachments]? = nil)

Create a collection with specified sample information. - Parameter sampleCount: Number of samples. Must be greater than 0. - Parameter sizes: Size information of each sample. - Parameter timings: Timing information of each sample. - Parameter attachments: Attachments for each sample.

get · iOS 26.0+

count

TypeScript
get count(): number
Swift declaration
var count: Int { get }

The number of elements in the collection.

get · iOS 26.0+

sizes

TypeScript
get sizes(): (CMSampleBuffer_SizePerSample) | null
Swift declaration
var sizes: CMSampleBuffer.SizePerSample? { get set }

Access sample sizes. When setting distinct sizes, the number of entries must match ``count``.

set · iOS 26.0+

sizes

TypeScript
set sizes(value: (CMSampleBuffer_SizePerSample) | null)
Swift declaration
var sizes: CMSampleBuffer.SizePerSample? { get set }

Access sample sizes. When setting distinct sizes, the number of entries must match ``count``.

get · iOS 26.0+

timings

TypeScript
get timings(): (CMSampleBuffer_TimingPerSample) | null
Swift declaration
var timings: CMSampleBuffer.TimingPerSample? { get set }

Access sample timings. When setting distinct timings, the number of entries must match ``count``.

set · iOS 26.0+

timings

TypeScript
set timings(value: (CMSampleBuffer_TimingPerSample) | null)
Swift declaration
var timings: CMSampleBuffer.TimingPerSample? { get set }

Access sample timings. When setting distinct timings, the number of entries must match ``count``.

get · iOS 26.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: Int { get }

The position one greater than the last valid subscript argument.

init · iOS 26.0+

init

TypeScript
static init(): CMSampleBuffer_SamplePropertiesCollection
Swift declaration
init()

Creates an empty collection.

subscript · iOS 26.0+

subscript

TypeScript
subscript(position: number): CMSampleBuffer_SampleProperties
Swift declaration
subscript(position: Int) -> CMSampleBuffer.SampleProperties { get set }

Accesses the element at the specified position.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CMSampleBuffer.SamplePropertiesCollection.init(arrayLiteral:)

A variable number of Swift arguments is not supported.

CMSampleBuffer.SamplePropertiesCollection.init(_:)

This parameter hides a concrete Swift type.

All CoreMedia types →