Skip to content

ScreenCaptureKit macOS xcode14.0 rc

Israel Soto edited this page Sep 7, 2022 · 1 revision

#ScreenCaptureKit.framework

diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCError.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCError.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCError.h	2022-08-05 12:41:26.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCError.h	2022-02-12 06:45:57.000000000 -0600
@@ -25,12 +25,7 @@
     SCStreamErrorNoWindowList = -3813,                           // Failed due to no window list
     SCStreamErrorNoDisplayList = -3814,                          // Failed due to no display list
     SCStreamErrorNoCaptureSource = -3815,                        // Failed due to no display or window list to capture
-    SCStreamErrorRemovingStream = -3816,                         // Failed to remove stream
-    SCStreamErrorUserStopped = -3817,                            // The stream was stopped by the user
-    SCStreamErrorFailedToStartAudio API_AVAILABLE(macos(13.0)) = -3818, // The stream failed to start audio
-    SCStreamErrorFailedToStopAudio API_AVAILABLE(macos(13.0)) = -3819,  // The stream failed to stop audio
-    SCStreamErrorFailedToStartAudioCapture API_AVAILABLE(macos(13.0)) = -3818, // The stream failed to start audio
-    SCStreamErrorFailedToStopAudioCapture API_AVAILABLE(macos(13.0)) = -3819   // The stream failed to stop audio
+    SCStreamErrorRemovingStream = -3816                          // Failed to remove stream
 };
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCStream.h /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCStream.h
--- /Applications/Xcode_14.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCStream.h	2022-08-05 12:41:26.000000000 -0500
+++ /Applications/Xcode_14.0.0-rc.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ScreenCaptureKit.framework/Headers/SCStream.h	2022-08-03 21:07:05.000000000 -0500
@@ -9,25 +9,10 @@
 #import <AppKit/AppKit.h>
 #import <ScreenCaptureKit/SCShareableContent.h>
 #import <CoreMedia/CMSampleBuffer.h>
-#import <CoreMedia/CMSync.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
 /*!
- @typedef SCStreamOutputType
- @constant SCStreamOutputTypeScreen screen sample output type.
- @discussion
-    SCStreamOutputTypeScreen is a screen capture sample buffer. This sample buffer that is wrapping a CMSampleBuffer that is backed by an IOSurface. The width and height of the sample buffer is what is defined in the SCStreamConfiguration for width and height. The sample buffer will be called back on the provided queue when adding a SCStreamOutput. The pixel format of the sample buffer will be what is defined in the SCStreamConfiguration. In the case of multiple window capture, the width and height will be that of the display passed in for the filter. The background color of multiwindow sample buffers will be default black and can be set through the SCStreamConfiguration.
- @constant SCStreamOutputTypeAudio audio sample output type.
- @discussion
- SCStreamOutputTypeAudio is a audio capture sample buffer. This sample buffer that is wrapping a audio buffer list. The format of the audio buffer is based on sampleRate and channelCount set in SCStreamConfiguration.
-*/
-typedef NS_ENUM(NSInteger, SCStreamOutputType) {
-    SCStreamOutputTypeScreen,
-    SCStreamOutputTypeAudio API_AVAILABLE(macos(13.0))
-};
-
-/*!
  @typedef SCFrameStatus
  @abstract SCFrameStatus denotes the status of frame sample buffer.
  @constant SCFrameStatusComplete new frame was generated.
@@ -46,6 +31,15 @@
     SCFrameStatusStopped
 };
 
+/*!
+ @typedef SCStreamOutputType
+ @constant SCStreamOutputTypeScreen screen sample output type.
+ @discussion
+    SCStreamOutputTypeScreen is a screen capture sample buffer. This sample buffer that is wrapping a CVPixelBuffer that is backed by an IOSurface. The width and height of the sample buffer is what is definied in the SCStreamConfiguration for width and height. The sample buffer will be called back on the provided queue when adding a SCStreamOutput. The pixel format of the sample buffer will be what is defined in the SCStreamConfiguration. In the case of mulitiple window capture, the width and height will be that of the display passed in for the filter. The background color of multiwindow sample buffers will be default black and can be set through the SCStreamConfiguration.
+*/
+typedef NS_ENUM(NSInteger, SCStreamOutputType) {
+    SCStreamOutputTypeScreen
+};
 
 /*!
  @abstract SCContentFilter
@@ -103,17 +97,17 @@
 API_AVAILABLE(macos(12.3))
 @interface SCStreamConfiguration : NSObject
 /*!
- @abstract SCStreamProperty for output width as measured in pixels. Default is set to 1920.
+ @abstract SCStreamProperty for output width as measured as points
  */
 @property(nonatomic, assign) size_t width;
 
 /*!
- @abstract SCStreamProperty for output height as measured in pixels. Default is set to 1080.
+ @abstract SCStreamProperty for output height as measured as points
  */
 @property(nonatomic, assign) size_t height;
 
 /*!
- @abstract SCStreamProperty that specifies the desired minimum time in seconds between frame updates, allowing you to throttle the rate at which updates are received. The default value is 0, meaning that updates are not throttled.
+ @abstract SCStreamProperty that specifies the desired minimum time in seconds between frame updates, allowing you to throttle the rate at which updates are received. 
  */
 @property(nonatomic, assign) CMTime minimumFrameInterval;
 
@@ -148,7 +142,7 @@
 @property(nonatomic, assign) CGRect sourceRect;
 
 /*!
- @abstract SCStreamProperty that specifies that the display stream outputs the frame data into a subset of the output IOSurface object.  If not set then the entire output surface is used. The rectangle is specified in pixels in the surface’s coordinate system. Not used for independent window capture
+ @abstract SCStreamProperty that specifies that the display stream outputs the frame data into a subset of the output IOSurface object.  If not set then the entire output surface is used. The rectangle is specified in points in the surface’s coordinate system. Not used for independent window capture
  */
 @property(nonatomic, assign) CGRect destinationRect;
 
@@ -167,27 +161,10 @@
  https://developer.apple.com/documentation/coregraphics/cgcolorspace/color_space_names.
  */
 @property(nonatomic, assign) CFStringRef colorSpaceName;
-
-/*!
- @abstract SCStreamProperty that specifies whether the audio will be captured.  By default audio is not captured.
- */
-@property(nonatomic, assign) BOOL capturesAudio API_AVAILABLE(macos(13.0));
-
 /*!
- @abstract SCStreamProperty to specify the sample rate for audio. Default is set to 48000.
+ @abstract Creates an SCStreamConfiguration with default values for all properties.
  */
-@property(nonatomic, assign) NSInteger sampleRate API_AVAILABLE(macos(13.0));
-
-/*!
- @abstract SCStreamProperty to specify channel count. Default is set to two.
- */
-@property(nonatomic, assign) NSInteger channelCount API_AVAILABLE(macos(13.0));
-
-/*!
- @abstract SCAudioProperty whether to exclude audio from current process. Default is set to NO.
- */
-@property(nonatomic, assign) BOOL excludesCurrentProcessAudio API_AVAILABLE(macos(13.0));
-
+- (instancetype)init;
 @end
 
 /*!
@@ -231,19 +208,13 @@
 
 /*!
  @key SCStreamFrameInfoDirtyRects
- @abstract The key for the CFDictionary attached to the CMSampleBuffer for an array of rectangles that is the union of both rectangles that were redrawn and rectangles that were moved. This is an array of CGRect in NSValue. The CGRects elements are specified in pixels.
+ @abstract The key for the CFDictionary attached to the CMSampleBuffer for an array of rectangles that is the union of both rectangles that were redrawn and rectangles that were moved. This is an array of CGRect in NSValue.
  */
 extern SCStreamFrameInfo const SCStreamFrameInfoDirtyRects API_AVAILABLE(macos(12.3));
 
 @protocol SCStreamOutput;
 API_AVAILABLE(macos(12.3))
 @interface SCStream : NSObject
-
-/*!
- @abstract Synchronization clock used for media capture.
- */
-@property(nonatomic, readonly, nullable) CMClockRef synchronizationClock API_AVAILABLE(macos(13.0));
-
 - (instancetype)init NS_UNAVAILABLE;
 + (instancetype)new NS_UNAVAILABLE;
 /*!
@@ -257,17 +228,17 @@
 
 /*!
  @abstract addStreamOutput:type:sampleHandlerQueue:error:
- @param output an object that adheres to the SCStreamOutput protocol that will receive the frames and call its delegate frame call back on its sample handler queue
+ @param output an object that adheres to the SCStreamOutput protocol that will recieved the frames and call its delegte frame call back on its sample handler queue
  @param type the SCStreamOutput type
  @param sampleHandlerQueue the return queue for the sample handler
  @param error the error pertaining to the add stream output
- @discussion An SCStreamOutput protocol object instance can only be added to a session using -addStreamOutput: Returns a BOOL denoting if the add was successful
+ @discussion An SCStreamOutput protocol object instance can only be added to a session using -addStreamOutput: Returns a BOOL denoting if the remove was successful
 */
 - (BOOL)addStreamOutput:(id<SCStreamOutput>)output type:(SCStreamOutputType)type sampleHandlerQueue:(dispatch_queue_t _Nullable)sampleHandlerQueue error:(NSError **)error NS_SWIFT_ASYNC_NAME (addStreamOutput(_:type:sampleHandlerQueue:)) NS_SWIFT_NAME (addStreamOutput(_:type:sampleHandlerQueue:));
 
 /*!
  @abstract removeStreamOutput:type:error:
- @param output an object that adheres to the SCStreamOutput protocol that will received the frames and call its delegate frame call back on its sample handler queue
+ @param output an object that adheres to the SCStreamOutput protocol that will recieved the frames and call its delegte frame call back on its sample handler queue
  @param type the SCStreamOutput type
  @param error the error pertaining to the removing stream output
  @discussion An SCStreamOutput protocol object instance can only be removed to a session using -addStreamOutput: Returns a BOOL denoting if the remove was successful
@@ -292,14 +263,14 @@
 - (void)updateConfiguration:(SCStreamConfiguration *)streamConfig completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler NS_SWIFT_ASYNC_NAME(updateConfiguration(_:)) NS_SWIFT_NAME(updateConfiguration(_:completionHandler:));
 
 /*!
- @abstract startCaptureWithCompletionHandler:
+ @abstract startCaptureWithFrameHandler:completionHandler:
  @param completionHandler the handler to be called when the function completes
  @discussion this method starts the content stream. The handler will be called when the content stream start has completed with an error denoting if the start has failed.
 */
 - (void)startCaptureWithCompletionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler;
 
 /*!
- @abstract stopCaptureWithCompletionHandler:
+ @abstract stopWithCompletionHandler:
  @param completionHandler the handler to be called when the function completes
  @discussion this method stops the content stream. The handler will be called when the content stream stop has completed with an error denoting if the stop has failed.
 */
Clone this wiki locally