---
title: "addStreamOutput(_:type:sampleHandlerQueue:)"
framework: screencapturekit
role: symbol
role_heading: Instance Method
path: "screencapturekit/scstream/addstreamoutput(_:type:samplehandlerqueue:)"
---

# addStreamOutput(_:type:sampleHandlerQueue:)

Adds a destination that receives the stream output.

## Declaration

```swift
func addStreamOutput(_ output: any SCStreamOutput, type: SCStreamOutputType, sampleHandlerQueue: dispatch_queue_t?) throws
```

## Parameters

- `output`: The object that conforms to the stream output protocol.
- `type`: The stream output type.
- `sampleHandlerQueue`: The queue that receives the stream output.

## Discussion

Discussion Use this method to attach an object that conforms to SCStreamOutput to receive stream content. Optionally, provide a DispatchQueue to send output to a queue that’s responsible for processing the output.

## See Also

### Adding and removing stream output

- [removeStreamOutput(_:type:)](screencapturekit/scstream/removestreamoutput(_:type:).md)
