<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItemVideoOutput/setDelegate(_:queue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItemVideoOutput(im)setDelegate:queue:"
  },
  "title" : "setDelegate(_:queue:)"
}
-->

# setDelegate(_:queue:)

Sets the delegate and dispatch queue for the receiver.

```
func setDelegate(_ delegate: (any AVPlayerItemOutputPullDelegate)?, queue delegateQueue: dispatch_queue_t?)
```

## Parameters

`delegate`

The delegate object for the receiver. You may specify `nil` for this parameter.

`delegateQueue`

The dispatch queue on which to call delegate methods. If you specify `nil` for this parameter, the video output object calls the delegate on the dispatch queue for your app’s main thread.

## Discussion

---

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)