---
title: AVPlannedSegmentWritingRequest
framework: avfoundation
role: symbol
role_heading: Class
path: avfoundation/avplannedsegmentwritingrequest
---

# AVPlannedSegmentWritingRequest

## Declaration

```swift
class AVPlannedSegmentWritingRequest
```

## Overview

Overview AVPlannedSegmentWritingRequest encompasses a request from the AVAssetWritingPlanner to the client code to write one incremental track segment. The client should respond to this request by writing the specified time range of data to a movie file at the specified segmentFileOutputURL, with start PTS zero.  The client’s writing work may be completed asynchronously.  If it completes successfully, clients must call the -finish or -finishWithClientState method on the request object.  If writing the segment fails, clients must call the -finishWithError: method on the request object.  If segment writing needs to be stopped before reaching the end of the segment, clients must call -cancel.

## Topics

### Inspecting the request

- [timeRange](avfoundation/avplannedsegmentwritingrequest/timerange.md)
- [segmentFileOutputURL](avfoundation/avplannedsegmentwritingrequest/segmentfileoutputurl.md)
- [progress](avfoundation/avplannedsegmentwritingrequest/progress.md)
- [assemblyTrackID](avfoundation/avplannedsegmentwritingrequest/assemblytrackid.md)

### Managing client state

- [clientStateToRestore](avfoundation/avplannedsegmentwritingrequest/clientstatetorestore.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [AVPlannedVideoSegmentWritingRequest](avfoundation/avplannedvideosegmentwritingrequest.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Planned export

- [AVAssetTrackPlan](avfoundation/avassettrackplan.md)
- [AVAssetVideoTrackPlan](avfoundation/avassetvideotrackplan.md)
- [AVPlannedSegmentConfiguration](avfoundation/avplannedsegmentconfiguration.md)
- [AVPlannedVideoSegmentConfiguration](avfoundation/avplannedvideosegmentconfiguration.md)
- [AVPlannedVideoSegmentWritingRequest](avfoundation/avplannedvideosegmentwritingrequest.md)
