---
title: currentSampleDuration
framework: MediaExtension
role: symbol
role_heading: Instance Property
platforms: [macOS 14.0+]
path: mediaextension/mesamplecursor/currentsampleduration
---

# currentSampleDuration

The decode duration of the sample at the current position.

## Declaration

```swift
var currentSampleDuration: CMTime { get }
```

## Discussion

Discussion This value is indefinite if the system needs to advance the sample past its current position to determine the decode duration. This can occur with streaming formats such as MPEG-2 transport streams.

## See Also

### Inspecting a sample cursor

- [presentationTimeStamp](mediaextension/mesamplecursor/presentationtimestamp.md)
- [decodeTimeStamp](mediaextension/mesamplecursor/decodetimestamp.md)
- [currentSampleFormatDescription](mediaextension/mesamplecursor/currentsampleformatdescription.md)
- [syncInfo](mediaextension/mesamplecursor/syncinfo.md)
- [dependencyInfo](mediaextension/mesamplecursor/dependencyinfo.md)
- [hevcDependencyInfo](mediaextension/mesamplecursor/hevcdependencyinfo.md)
- [decodeTimeOfLastSampleReachableByForwardSteppingThatIsAlreadyLoadedByByteSource](mediaextension/mesamplecursor/decodetimeoflastsamplereachablebyforwardsteppingthatisalreadyloadedbybytesource.md)
