---
title: CMBufferCallbacks
framework: coremedia
role: symbol
role_heading: Structure
path: coremedia/cmbuffercallbacks
---

# CMBufferCallbacks

A structure that stores the callbacks that perform buffer operations.

## Declaration

```swift
struct CMBufferCallbacks
```

## Overview

Overview With the exception of isDataReady, all these callbacks must always return the same result for the same arguments. A buffer’s duration, timestamps, or position relative to other buffers must not appear to change while it is in the queue. Once isDataReady has returned true for a given CMBuffer, it must always return true for that CMBuffer. Durations must always be positive.

## Topics

### Properties

- [compare](coremedia/cmbuffercallbacks/compare.md)
- [CMBufferCompareCallback](coremedia/cmbuffercomparecallback.md)
- [CMBufferGetBooleanCallback](coremedia/cmbuffergetbooleancallback.md)
- [CMBufferGetTimeCallback](coremedia/cmbuffergettimecallback.md)
- [dataBecameReadyNotification](coremedia/cmbuffercallbacks/databecamereadynotification.md)
- [getDecodeTimeStamp](coremedia/cmbuffercallbacks/getdecodetimestamp.md)
- [getDuration](coremedia/cmbuffercallbacks/getduration.md)
- [getPresentationTimeStamp](coremedia/cmbuffercallbacks/getpresentationtimestamp.md)
- [getSize](coremedia/cmbuffercallbacks/getsize.md)
- [isDataReady](coremedia/cmbuffercallbacks/isdataready.md)
- [refcon](coremedia/cmbuffercallbacks/refcon.md)
- [version](coremedia/cmbuffercallbacks/version.md)

### Initializers

- [init(version:refcon:getDecodeTimeStamp:getPresentationTimeStamp:getDuration:isDataReady:compare:dataBecameReadyNotification:getSize:)](coremedia/cmbuffercallbacks/init(version:refcon:getdecodetimestamp:getpresentationtimestamp:getduration:isdataready:compare:databecamereadynotification:getsize:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)

## See Also

### Creating a Queue

- [CMBufferQueueCreateWithHandlers(_:_:_:_:)](coremedia/cmbufferqueuecreatewithhandlers(_:_:_:_:).md)
- [CMBufferQueueCreate(allocator:capacity:callbacks:queueOut:)](coremedia/cmbufferqueuecreate(allocator:capacity:callbacks:queueout:).md)
