<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaExtension",
  "identifier" : "/documentation/MediaExtension/MESampleCursorChunk/init(byteSource:chunkStorageRange:chunkInfo:sampleIndexWithinChunk:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "MediaExtension"
    ],
    "preciseIdentifier" : "c:objc(cs)MESampleCursorChunk(im)initWithByteSource:chunkStorageRange:chunkInfo:sampleIndexWithinChunk:"
  },
  "title" : "init(byteSource:chunkStorageRange:chunkInfo:sampleIndexWithinChunk:)"
}
-->

# init(byteSource:chunkStorageRange:chunkInfo:sampleIndexWithinChunk:)

Creates a new sample cursor chunk with byte source and chunk data that you provide.

```
init(byteSource: MEByteSource, chunkStorageRange: AVSampleCursorStorageRange, chunkInfo: AVSampleCursorChunkInfo, sampleIndexWithinChunk: CFIndex)
```

## Parameters

`byteSource`

The byte source to use to read the data for the sample.

`chunkStorageRange`

The offset location and length of the sample’s chunk within the byte source.

`chunkInfo`

An object that provides details about the chunk in the media.

`sampleIndexWithinChunk`

The offset index of the sample within the chunk, in samples.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)