---
title: "outputMediaDataWillChange(_:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avplayeritemoutputpulldelegate/outputmediadatawillchange(_:)"
---

# outputMediaDataWillChange(_:)

Tells the delegate that new samples are about to arrive.

## Declaration

```swift
optional func outputMediaDataWillChange(_ sender: AVPlayerItemOutput)
```

## Parameters

- `sender`: The output object that sent the message.

## Discussion

Discussion You can use this method to prepare for any new sample data. This method is called at some point after a call to your video output object’s requestNotificationOfMediaDataChangeWithAdvanceInterval: method.

## See Also

### Responding to pixel buffer changes

- [outputSequenceWasFlushed(_:)](avfoundation/avplayeritemoutputpulldelegate/outputsequencewasflushed(_:).md)
