Skip to content

Cinematic macOS xcode27.0 b1

Alex Soto edited this page Jun 9, 2026 · 1 revision

#Cinematic.framework

diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNAssetInfo.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNAssetInfo.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNAssetInfo.h	2026-04-18 23:29:52
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNAssetInfo.h	2026-06-03 23:35:00
@@ -10,6 +10,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
+
 NS_REFINED_FOR_SWIFT
 API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
 /// Information associated with an AVAsset for a cinematic video.
@@ -67,6 +68,7 @@
 @property (strong, readonly) NSArray<NSNumber *> *sampleDataTrackIDs;
 
 @end
+
 
 NS_REFINED_FOR_SWIFT
 API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNCinematicError.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNCinematicError.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNCinematicError.h	2026-04-18 23:29:52
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNCinematicError.h	2026-06-04 00:04:07
@@ -34,6 +34,8 @@
 
     // operation was cancelled
     CNCinematicErrorCodeCancelled       = 7,
+    
+
 } API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNDetection.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNDetection.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNDetection.h	2026-04-18 21:02:27
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNDetection.h	2026-06-03 23:35:00
@@ -90,6 +90,7 @@
 /// For example, the face/torso detections of the same person are assigned the same detectionGroupID.
 @property (readonly) CNDetectionGroupID detectionGroupID;
 
+
 /// Determine whether a given detectionID is valid
 + (BOOL)isValidDetectionID:(CNDetectionID)detectionID;
 
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNImageRenderingSession.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNImageRenderingSession.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNImageRenderingSession.h	1969-12-31 19:00:00
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNImageRenderingSession.h	2026-06-03 23:35:01
@@ -0,0 +1,124 @@
+//
+//  CNImageRenderingSession.h
+//  Cinematic
+//
+//  Copyright © 2022-2025 Apple Inc. All rights reserved.
+//
+
+
+#pragma once
+#import <AVFoundation/AVFoundation.h>
+#import <Metal/Metal.h>
+#import <Cinematic/CNRenderingSession.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// Configuration for a CNImageRenderingSession, specifying the rendering quality and algorithm version.
+API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), visionos(27.0)) API_UNAVAILABLE(watchos)
+@interface CNImageRenderingSessionConfiguration : NSObject
+
+-(instancetype)init NS_UNAVAILABLE;
+
+/// Initialize with the latest rendering version
+/// - Parameters:
+///      - quality: The quality level for the rendering session.
+-(instancetype)initWithQuality:(CNRenderingQuality)quality;
+
+/// Initialize with a specific rendering version.
+/// - Parameters:
+///      - quality: The quality level for the rendering session.
+///      - renderingVersion: Should be obtained from `latestRenderingVersion`. Pinning a version
+///   from a prior build ensures rendering output is stable across OS updates. Use `isRenderingVersionSupported:` to verify the version is still supported before using it.
+-(instancetype _Nullable)initWithQuality:(CNRenderingQuality)quality
+                        renderingVersion:(NSInteger)renderingVersion;
+
+@property (readonly) CNRenderingQuality quality;
+
+/// Rendering version used to render
+@property (readonly) NSInteger renderingVersion;
+
+/// The version of the newest rendering algorithm
+@property (class, readonly) NSInteger latestRenderingVersion;
+
+/// Checks if a given rendering version is supported on the current build
++(BOOL)isRenderingVersionSupported:(NSInteger)renderingVersion;
+
+@end
+
+/// A session for rendering a shallow depth-of-field (SDoF) effect onto still images using Metal.
+///
+/// Use CNImageRenderingSession to apply a cinematic, lens-simulated bokeh effect to an image given
+/// a disparity map. For large images, prefer the tiled API to avoid excessive GPU memory usage.
+///
+/// A single session may be reused across multiple render calls. It is not thread-safe.
+API_AVAILABLE(macos(27.0), ios(27.0), tvos(27.0), visionos(27.0)) API_UNAVAILABLE(watchos)
+@interface CNImageRenderingSession : NSObject
+
+@property (readonly, strong) CNImageRenderingSessionConfiguration *configuration;
+
+-(instancetype)init NS_UNAVAILABLE;
+
+-(instancetype)initWithConfiguration:(CNImageRenderingSessionConfiguration *)configuration;
+
+/// Encode a command to render a shallow depth of field (SDoF) image to a metal texture
+/// - Parameters:
+///   - commandBuffer: The Metal command buffer on which to encode the command
+///   - sourceRGBA: A color texture to which the effect should be applied. Texture must be in linear color space. The width and height must match those of destinationRGBA.
+///   - sourceDisparity: The texture with the disparity
+///   - destinationRGBA: The texture to which the SDoF image is rendered. Texture must be in linear color space. Must have the same dimensions as sourceRGBA.
+///   - fNumber: The f-stop value which inversely affects the aperture used to render the image. A smaller f/ number results in larger bokeh and a shallower depth of field in the rendered image.
+///   - focusDisparity: The disparity value which represents the focus plane at which the rendered image should be in focus. A larger disparity results in the focus plane being closer to the camera. The scale and offset of disparity is not defined. It is best practice to obtain disparity values from detections or by interpolation between known disparity values.
+/// - Returns: YES if encoding succeeded; NO if required resources are unavailable or if
+///   the provided textures are incompatible.
+- (BOOL)encodeRenderToCommandBuffer:(id<MTLCommandBuffer>)commandBuffer
+                         sourceRGBA:(id<MTLTexture>)sourceRGBA
+                    sourceDisparity:(id<MTLTexture>)sourceDisparity
+                    destinationRGBA:(id<MTLTexture>)destinationRGBA
+                            fNumber:(float)fNumber
+                     focusDisparity:(float)focusDisparity;
+
+/// Encode a command to render a shallow depth of field (SDoF) image to a metal texture
+///
+/// Tiled rendering avoids allocating a full-resolution texture for large images. The source tile must
+/// be larger than the destination tile (the "extend" region) so the renderer has enough surrounding
+/// pixel context to correctly compute bokeh near tile edges. Use `minimumTileExtendRectForTileRect:sourceRGBASize:`
+/// to compute the required extended source rect.
+///
+/// - Parameters:
+///   - commandBuffer: The Metal command buffer on which to encode the command
+///   - sourceTileRGBA: A color texture to which the effect should be applied. Texture must be in linear color space. Its origin in the full image is given by tileExtendOffset.
+///   - sourceDisparity: The texture with the disparity. This texture is not tiled.
+///   - destinationTileRGBA: The texture to which the SDoF image is rendered. Texture must be in linear color space. Its dimensions define the tile size. Its origin in the full image is given by `tileOffset`.
+///   - fNumber: The f-stop value which inversely affects the aperture used to render the image. A smaller f/ number results in larger bokeh and a shallower depth of field in the rendered image.
+///   - focusDisparity: The disparity value which represents the focus plane at which the rendered image should be in focus. A larger disparity results in the focus plane being closer to the camera. The scale and offset of disparity is not defined. It is best practice to obtain disparity values from detections or by interpolation between known disparity values.
+///   - sourceRGBASize: The width and height of the full (un-tiled) source image.
+///   - tileOffset: The pixel-coordinate origin of the destination tile within the full image.
+///   - tileExtendOffset: The pixel-coordinate origin of the extended source tile within the full image.
+/// - Returns: YES if encoding succeeded; NO if required resources are unavailable or if the provided parameters are incompatible.
+- (BOOL)encodeTileRenderToCommandBuffer:(id<MTLCommandBuffer>)commandBuffer
+                         sourceTileRGBA:(id<MTLTexture>)sourceTileRGBA
+                        sourceDisparity:(id<MTLTexture>)sourceDisparity
+                    destinationTileRGBA:(id<MTLTexture>)destinationTileRGBA
+                                fNumber:(float)fNumber
+                         focusDisparity:(float)focusDisparity
+                         sourceRGBASize:(CGSize)sourceRGBASize
+                             tileOffset:(CGPoint)tileOffset
+                       tileExtendOffset:(CGPoint)tileExtendOffset
+NS_SWIFT_NAME(encodeTileRender(to:sourceTileRGBA:sourceDisparity:destinationTileRGBA:fNumber:focusDisparity:sourceRGBASize:tileOffset:tileExtendOffset:));
+
+/// Returns the minimum source rect that must be sampled to render tileRect without edge artifacts.
+///
+/// When applying a bokeh blur near a tile boundary, the renderer needs pixels from outside the
+/// destination tile. This method computes how far that border region extends. Pass the returned rect's origin as tileExtendOffset
+/// and allocate sourceTileRGBA with the returned rect's size.
+///
+/// - Parameters:
+///   - tileRect: The destination tile rect in full-image pixel coordinates.
+///   - sourceRGBASize: The dimensions of the full (un-tiled) source image.
+/// - Returns: A rect (in full-image pixel coordinates) covering the minimum required source region,
+///   clamped to the image bounds.
++(CGRect)minimumTileExtendRectForTileRect:(CGRect)tileRect sourceRGBASize:(CGSize)sourceRGBASize;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNObjectTracker.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNObjectTracker.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNObjectTracker.h	2026-04-18 23:29:52
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNObjectTracker.h	2026-06-04 00:04:08
@@ -46,6 +46,7 @@
 /// - Returns: A prediction, which includes bounds that can be used to start tracking, or `nil` if no discernible object is detected.
 - (nullable CNBoundsPrediction *)findObjectAtPoint:(CGPoint)point sourceImage:(CVPixelBufferRef)sourceImage;
 
+
 /// Start creating a detection track to track an object within the given bounds.
 /// - Parameters:
 ///   - time: the presentation time of the first frame in the detection track
@@ -59,6 +60,8 @@
 /// Continue tracking an object for which tracking has started, and add a new detection to the detection track being built.
 /// - Parameters:
 ///   - time: the presentation time of the frame to be added to the detection track
+///   - sourceImage: image buffer containing the image
+///   - sourceDisparity: disparity buffer containing depth information
 /// - Returns: a prediction of where the object is in the source image
 - (nullable CNBoundsPrediction *)continueTrackingAt:(CMTime)time sourceImage:(CVPixelBufferRef)sourceImage sourceDisparity:(CVPixelBufferRef)sourceDisparity;
 
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNScript.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNScript.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNScript.h	2026-04-18 23:28:18
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/CNScript.h	2026-06-04 00:08:58
@@ -13,6 +13,7 @@
 @class CNScriptChanges;
 @class CNScriptFrame;
 
+
 NS_REFINED_FOR_SWIFT NS_SWIFT_SENDABLE
 API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos)
 /// Database of focus decisions with methods to change them.
@@ -51,6 +52,7 @@
 
 /// Changes trimmed and time range shifted to start at zero — for use with a similarly trimmed cinematic asset.
 - (CNScriptChanges *)changesTrimmedByTimeRange:(CMTimeRange)timeRange;
+
 
 #pragma mark - frames
 
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/Cinematic.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/Cinematic.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/Cinematic.h	2026-04-18 23:29:52
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cinematic.framework/Headers/Cinematic.h	2026-06-04 00:04:07
@@ -14,6 +14,7 @@
 #import <Cinematic/CNSpatialAudio.h>
 
 #import <Cinematic/CNRenderingSession.h>
+#import <Cinematic/CNImageRenderingSession.h>
 
 #import <Cinematic/CNDecision.h>
 #import <Cinematic/CNDetection.h>
@@ -21,3 +22,4 @@
 #import <Cinematic/CNScript.h>
 
 #import <Cinematic/CNObjectTracker.h>
+

Clone this wiki locally