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

# CMTimebaseCreateWithMasterClock(allocator:masterClock:timebaseOut:)

Creates a timebase by using a primary clock.

```
func CMTimebaseCreateWithMasterClock(allocator: CFAllocator?, masterClock: CMClock, timebaseOut: UnsafeMutablePointer<CMTimebase?>) -> OSStatus
```

## Discussion

The timebase will initially have rate zero and time zero. Pass [`CMClockGetHostTimeClock()`](/documentation/CoreMedia/CMClockGetHostTimeClock())() for masterClock to have the host time clock drive this timebase.

---

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)