---
title: "CMSimpleQueueGetHead(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmsimplequeuegethead(_:)"
---

# CMSimpleQueueGetHead(_:)

Returns the element at the head of the queue.

## Declaration

```swift
func CMSimpleQueueGetHead(_ queue: CMSimpleQueue) -> UnsafeRawPointer?
```

## Parameters

- `queue`: The queue from which to get the head element. Must not be NULL.

## Return Value

Return Value The head element.  NULL if the queue was empty, or if there was some other error.

## Discussion

Discussion If the queue is empty, the function returns NULL.

## See Also

### Inspecting Queues

- [CMSimpleQueueGetCapacity(_:)](coremedia/cmsimplequeuegetcapacity(_:).md)
- [CMSimpleQueueGetCount(_:)](coremedia/cmsimplequeuegetcount(_:).md)
