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

# CMSimpleQueueEnqueue(_:element:)

Enqueues an element in the queue.

```
func CMSimpleQueueEnqueue(_ queue: CMSimpleQueue, element: UnsafeRawPointer) -> OSStatus
```

## Parameters

`queue`

The queue on which to enqueue the element. Must not be `NULL`.

`element`

Element to enqueue. Must not be `NULL` (`CMSimpleQueueDequeue` returns `NULL` to indicate an empty queue).

## Return Value

Returns `noErr` if the call succeeds or `kCMSimpleQueueError_QueueIsFull` if the queue is full.

## Discussion

If the queue is full, this operation fails.

---

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)