<!--
{
  "availability" : [
    "iOS: 4.0.0 - 18.0.0",
    "iPadOS: 4.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.7.0 - 15.0.0",
    "tvOS: 9.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 6.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMBufferQueueGetHead(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMBufferQueueGetHead"
  },
  "title" : "CMBufferQueueGetHead(_:)"
}
-->

# CMBufferQueueGetHead(_:)

Retrieves the next buffer from a queue, but doesn’t remove it.

```
func CMBufferQueueGetHead(_ queue: CMBufferQueue) -> CMBuffer?
```

## Parameters

`queue`

The CMBufferQueue from which to retrieve a buffer.

## Return Value

The buffer. Will be `NULL` if the queue is empty.

## Discussion

This follows Core Foundation “Get” semantics – it does not retain the returned buffer. Note that with non-FIFO queues it’s not guaranteed that the next dequeue will return this particular buffer (if an intervening Enqueue adds a buffer that will dequeue next).

---

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)