---
title: "CMBufferQueueGetTotalSize(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmbufferqueuegettotalsize(_:)"
---

# CMBufferQueueGetTotalSize(_:)

Gets the total size of all sample buffers of a buffer queue.

## Declaration

```swift
func CMBufferQueueGetTotalSize(_ queue: CMBufferQueue) -> Int
```

## Discussion

Discussion The total size of the CMBufferQueue is the sum of all the individual buffer sizes, as reported by the getTotalSize callback (provided to CMBufferQueueCreate(allocator:capacity:callbacks:queueOut:)). This function returns 0 if there are no buffers in the queue.

## See Also

### Inspecting a Queue

- [CMBufferQueueIsEmpty(_:)](coremedia/cmbufferqueueisempty(_:).md)
- [CMBufferQueueGetBufferCount(_:)](coremedia/cmbufferqueuegetbuffercount(_:).md)
- [CMBufferQueueGetHead(_:)](coremedia/cmbufferqueuegethead(_:).md)
- [CMBufferQueueContainsEndOfData(_:)](coremedia/cmbufferqueuecontainsendofdata(_:).md)
- [CMBufferQueueIsAtEndOfData(_:)](coremedia/cmbufferqueueisatendofdata(_:).md)
