<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMTimeMappingMake(source:target:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMTimeMappingMake"
  },
  "title" : "CMTimeMappingMake(source:target:)"
}
-->

# CMTimeMappingMake(source:target:)

Creates a time mapping with a source and target time range.

```
func CMTimeMappingMake(source: CMTimeRange, target: CMTimeRange) -> CMTimeMapping
```

## Parameters

`source`

A time range on the source timeline.

`target`

A time range on the target timeline.

## Return Value

A new time mapping.

## Discussion

The source and target parameters must have durations whose epoch is `0`, otherwise the system returns an invalid time mapping.

---

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)