---
title: "setDelegate(_:queue:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avplayeritemvideooutput/setdelegate(_:queue:)"
---

# setDelegate(_:queue:)

Sets the delegate and dispatch queue for the receiver.

## Declaration

```swift
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.

## See Also

### Configuring the delegate

- [delegate](avfoundation/avplayeritemvideooutput/delegate.md)
- [AVPlayerItemOutputPullDelegate](avfoundation/avplayeritemoutputpulldelegate.md)
- [delegateQueue](avfoundation/avplayeritemvideooutput/delegatequeue.md)
