Build Information
Failed to build VideoIO, reference 2.3.1 (22f7c0
), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 14:53:28 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
Build Log
========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/MetalPetal/VideoIO.git
Reference: 2.3.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/MetalPetal/VideoIO
* tag 2.3.1 -> FETCH_HEAD
HEAD is now at 22f7c00 Fix tvOS build issue
Cloned https://github.com/MetalPetal/VideoIO.git
Revision (git rev-parse @):
22f7c00083b7e16c7e15ace1adcdb90fb5ffe006
SUCCESS checkout https://github.com/MetalPetal/VideoIO.git at 2.3.1
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "videoio",
"name": "VideoIO",
"url": "https://github.com/MetalPetal/VideoIO.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/VideoIO",
"dependencies": [
]
}
]
}
Fetching https://github.com/MetalPetal/VideoIO.git
[1/877] Fetching videoio
Fetched https://github.com/MetalPetal/VideoIO.git from cache (1.17s)
Creating working copy for https://github.com/MetalPetal/VideoIO.git
Working copy of https://github.com/MetalPetal/VideoIO.git resolved at 2.3.1 (22f7c00)
warning: '.resolve-product-dependencies': dependency 'videoio' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/MetalPetal/VideoIO.git
https://github.com/MetalPetal/VideoIO.git
{
"dependencies" : [
],
"manifest_display_name" : "VideoIO",
"name" : "VideoIO",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "10.0"
},
{
"name" : "macos",
"version" : "10.13"
},
{
"name" : "tvos",
"version" : "10.0"
}
],
"products" : [
{
"name" : "VideoIO",
"targets" : [
"VideoIO"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "VideoIOTests",
"module_type" : "SwiftTarget",
"name" : "VideoIOTests",
"path" : "Tests/VideoIOTests",
"sources" : [
"VideoIOTests.swift"
],
"target_dependencies" : [
"VideoIO"
],
"type" : "test"
},
{
"c99name" : "VideoIO",
"module_type" : "SwiftTarget",
"name" : "VideoIO",
"path" : "Sources/VideoIO",
"product_memberships" : [
"VideoIO"
],
"sources" : [
"AVAsset.swift",
"AssetExportSession.swift",
"AudioQueueCaptureSession.swift",
"AudioVideoSettings.swift",
"Camera+AudioQueueCapture.swift",
"Camera+FocusExposure.swift",
"Camera+PhotoCapture.swift",
"Camera.swift",
"DeviceOrientationTracker.swift",
"MovieFileType.swift",
"MovieMerger.swift",
"MultitrackMovieRecorder.swift",
"PlayerVideoOutput.swift",
"SampleBufferUtilities.swift",
"UnfairLock.swift",
"VideoComposition.swift",
"VideoOrientationUtilities.swift"
],
"type" : "library"
}
],
"tools_version" : "5.1"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/19] Compiling VideoIO DeviceOrientationTracker.swift
[4/19] Compiling VideoIO MovieFileType.swift
[5/20] Compiling VideoIO Camera+AudioQueueCapture.swift
[6/20] Compiling VideoIO Camera+FocusExposure.swift
[7/20] Compiling VideoIO Camera+PhotoCapture.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:29:27: warning: static property 'portraitFrontMirroredVideoOutput' is not concurrency-safe because non-'Sendable' type 'Camera.Configurator' may have shared mutable state; this is an error in the Swift 6 language mode
20 | }
21 |
22 | public struct Configurator {
| `- note: consider making struct 'Configurator' conform to the 'Sendable' protocol
23 | /// Called when video connection estiblished or video device changed. Called before `captureSession.commitConfiguration`.
24 | public var videoConnectionConfigurator: (Camera, AVCaptureConnection) -> Void
:
27 | public var videoDeviceConfigurator: (Camera, AVCaptureDevice) -> Void
28 |
29 | public static let portraitFrontMirroredVideoOutput: Configurator = {
| |- warning: static property 'portraitFrontMirroredVideoOutput' is not concurrency-safe because non-'Sendable' type 'Camera.Configurator' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'portraitFrontMirroredVideoOutput' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 | var configurator = Configurator()
31 | configurator.videoConnectionConfigurator = { camera, connection in
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:389:6: error: stored properties cannot be marked unavailable with '@available'
387 | internal var photoCaptureDelegateHandlers: [AnyObject] = []
388 |
389 | @available(macOS, unavailable)
| `- error: stored properties cannot be marked unavailable with '@available'
390 | internal var audioQueueCaptureSession: AudioQueueCaptureSession?
391 | }
[8/20] Compiling VideoIO Camera.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:29:27: warning: static property 'portraitFrontMirroredVideoOutput' is not concurrency-safe because non-'Sendable' type 'Camera.Configurator' may have shared mutable state; this is an error in the Swift 6 language mode
20 | }
21 |
22 | public struct Configurator {
| `- note: consider making struct 'Configurator' conform to the 'Sendable' protocol
23 | /// Called when video connection estiblished or video device changed. Called before `captureSession.commitConfiguration`.
24 | public var videoConnectionConfigurator: (Camera, AVCaptureConnection) -> Void
:
27 | public var videoDeviceConfigurator: (Camera, AVCaptureDevice) -> Void
28 |
29 | public static let portraitFrontMirroredVideoOutput: Configurator = {
| |- warning: static property 'portraitFrontMirroredVideoOutput' is not concurrency-safe because non-'Sendable' type 'Camera.Configurator' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'portraitFrontMirroredVideoOutput' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 | var configurator = Configurator()
31 | configurator.videoConnectionConfigurator = { camera, connection in
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:389:6: error: stored properties cannot be marked unavailable with '@available'
387 | internal var photoCaptureDelegateHandlers: [AnyObject] = []
388 |
389 | @available(macOS, unavailable)
| `- error: stored properties cannot be marked unavailable with '@available'
390 | internal var audioQueueCaptureSession: AudioQueueCaptureSession?
391 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/20] Compiling VideoIO AudioQueueCaptureSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:43:24: warning: static property 'tracker' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
41 |
42 | private struct Key {
43 | static var tracker = ""
| |- warning: static property 'tracker' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tracker' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'tracker' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
44 | }
45 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:130:17: warning: capture of 'self' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
15 |
16 | @available(macOS, unavailable)
17 | public class AudioQueueCaptureSession {
| `- note: class 'AudioQueueCaptureSession' does not conform to the 'Sendable' protocol
18 |
19 | public enum Error: Swift.Error {
:
128 | self.queue.async {
129 | do {
130 | self._stopAudioRecording()
| `- warning: capture of 'self' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
131 | try self._beginAudioRecording()
132 | self.delegateQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:133:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
131 | try self._beginAudioRecording()
132 | self.delegateQueue.async {
133 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
134 | }
135 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:133:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
131 | try self._beginAudioRecording()
132 | self.delegateQueue.async {
133 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
134 | }
135 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:138:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
136 | self._stopAudioRecording()
137 | self.delegateQueue.async {
138 | completion(error)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
139 | }
140 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:196:37: warning: capture of 'session' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
15 |
16 | @available(macOS, unavailable)
17 | public class AudioQueueCaptureSession {
| `- note: class 'AudioQueueCaptureSession' does not conform to the 'Sendable' protocol
18 |
19 | public enum Error: Swift.Error {
:
194 |
195 | session.delegateQueue.async {
196 | session.delegate?.audioQueueCaptureSession(session, didOutputSampleBuffer: sampleBuffer)
| `- warning: capture of 'session' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
197 | }
198 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:196:112: warning: capture of 'sampleBuffer' with non-sendable type 'CMSampleBuffer' in a '@Sendable' closure
194 |
195 | session.delegateQueue.async {
196 | session.delegate?.audioQueueCaptureSession(session, didOutputSampleBuffer: sampleBuffer)
| `- warning: capture of 'sampleBuffer' with non-sendable type 'CMSampleBuffer' in a '@Sendable' closure
197 | }
198 | } else {
CoreMedia.CMSampleBuffer:2:14: note: class 'CMSampleBuffer' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | public class CMSampleBuffer : _CFObject {
| `- note: class 'CMSampleBuffer' does not conform to the 'Sendable' protocol
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:26:27: warning: static property 'fit' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
24 | self.init(rawValue: value)
25 | }
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
| |- warning: static property 'fit' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'fit' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:27:27: warning: static property 'resize' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
25 | }
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
| |- warning: static property 'resize' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:28:27: warning: static property 'resizeAspect' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
| |- warning: static property 'resizeAspect' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resizeAspect' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:29:27: warning: static property 'resizeAspectFill' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
| |- warning: static property 'resizeAspectFill' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resizeAspectFill' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 | }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:48:42: warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
46 | static func attach(to: AnyObject, callback: @escaping () -> Void) {
47 | let tracker = LifetimeTracker(callback: callback)
48 | objc_setAssociatedObject(to, &Key.tracker, tracker, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
| `- warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
49 | }
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:206:16: warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
204 | }
205 | AudioQueueEnqueueBuffer(inAudioQueue, bufferRef, 0, nil)
206 | }, &self.clientInfo, nil, nil, 0, &audioQueue)
| `- warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
207 |
208 | if status != 0 {
[10/20] Compiling VideoIO AudioVideoSettings.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:43:24: warning: static property 'tracker' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
41 |
42 | private struct Key {
43 | static var tracker = ""
| |- warning: static property 'tracker' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tracker' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'tracker' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
44 | }
45 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:130:17: warning: capture of 'self' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
15 |
16 | @available(macOS, unavailable)
17 | public class AudioQueueCaptureSession {
| `- note: class 'AudioQueueCaptureSession' does not conform to the 'Sendable' protocol
18 |
19 | public enum Error: Swift.Error {
:
128 | self.queue.async {
129 | do {
130 | self._stopAudioRecording()
| `- warning: capture of 'self' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
131 | try self._beginAudioRecording()
132 | self.delegateQueue.async {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:133:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
131 | try self._beginAudioRecording()
132 | self.delegateQueue.async {
133 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
134 | }
135 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:133:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
131 | try self._beginAudioRecording()
132 | self.delegateQueue.async {
133 | completion(nil)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
134 | }
135 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:138:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
136 | self._stopAudioRecording()
137 | self.delegateQueue.async {
138 | completion(error)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
139 | }
140 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:196:37: warning: capture of 'session' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
15 |
16 | @available(macOS, unavailable)
17 | public class AudioQueueCaptureSession {
| `- note: class 'AudioQueueCaptureSession' does not conform to the 'Sendable' protocol
18 |
19 | public enum Error: Swift.Error {
:
194 |
195 | session.delegateQueue.async {
196 | session.delegate?.audioQueueCaptureSession(session, didOutputSampleBuffer: sampleBuffer)
| `- warning: capture of 'session' with non-sendable type 'AudioQueueCaptureSession' in a '@Sendable' closure
197 | }
198 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:196:112: warning: capture of 'sampleBuffer' with non-sendable type 'CMSampleBuffer' in a '@Sendable' closure
194 |
195 | session.delegateQueue.async {
196 | session.delegate?.audioQueueCaptureSession(session, didOutputSampleBuffer: sampleBuffer)
| `- warning: capture of 'sampleBuffer' with non-sendable type 'CMSampleBuffer' in a '@Sendable' closure
197 | }
198 | } else {
CoreMedia.CMSampleBuffer:2:14: note: class 'CMSampleBuffer' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | public class CMSampleBuffer : _CFObject {
| `- note: class 'CMSampleBuffer' does not conform to the 'Sendable' protocol
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:26:27: warning: static property 'fit' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
24 | self.init(rawValue: value)
25 | }
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
| |- warning: static property 'fit' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'fit' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:27:27: warning: static property 'resize' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
25 | }
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
| |- warning: static property 'resize' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:28:27: warning: static property 'resizeAspect' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
| |- warning: static property 'resizeAspect' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resizeAspect' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:29:27: warning: static property 'resizeAspectFill' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
| |- warning: static property 'resizeAspectFill' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resizeAspectFill' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 | }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:48:42: warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
46 | static func attach(to: AnyObject, callback: @escaping () -> Void) {
47 | let tracker = LifetimeTracker(callback: callback)
48 | objc_setAssociatedObject(to, &Key.tracker, tracker, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
| `- warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
49 | }
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:206:16: warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
204 | }
205 | AudioQueueEnqueueBuffer(inAudioQueue, bufferRef, 0, nil)
206 | }, &self.clientInfo, nil, nil, 0, &audioQueue)
| `- warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
207 |
208 | if status != 0 {
[11/20] Compiling VideoIO AVAsset.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:216:18: warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
214 |
215 |
216 | public class ExportProgress: Progress {
| `- warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
217 | public let videoEncodingProgress: Progress?
218 | public let audioEncodingProgress: Progress?
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:304:37: warning: capture of 'sessionForVideoEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
302 | var sessionForVideoEncoder: AssetExportSession? = self
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
| `- warning: capture of 'sessionForVideoEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:305:42: warning: capture of 'videoOutput' with non-sendable type 'AVAssetReaderOutput' in a '@Sendable' closure
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
305 | if !session.encode(from: videoOutput, to: videoInput) {
| `- warning: capture of 'videoOutput' with non-sendable type 'AVAssetReaderOutput' in a '@Sendable' closure
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetReaderOutput.h:42:12: note: class 'AVAssetReaderOutput' does not conform to the 'Sendable' protocol
40 | */
41 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
42 | @interface AVAssetReaderOutput : NSObject
| `- note: class 'AVAssetReaderOutput' does not conform to the 'Sendable' protocol
43 | {
44 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
7 |
8 | import Foundation
9 | import AVFoundation
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
10 |
11 | public class AssetExportSession {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:305:59: warning: capture of 'videoInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
305 | if !session.encode(from: videoOutput, to: videoInput) {
| `- warning: capture of 'videoInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetWriterInput.h:43:12: note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
41 | */
42 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
43 | @interface AVAssetWriterInput : NSObject
| `- note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
44 | {
45 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:309:59: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
307 | sessionForVideoEncoder = nil
308 | if audioCompleted {
309 | session.finish(completionHandler: completion)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
310 | }
311 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:304:37: warning: reference to captured var 'sessionForVideoEncoder' in concurrently-executing code
302 | var sessionForVideoEncoder: AssetExportSession? = self
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
| `- warning: reference to captured var 'sessionForVideoEncoder' in concurrently-executing code
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:306:21: warning: mutation of captured var 'videoCompleted' in concurrently-executing code
304 | guard let session = sessionForVideoEncoder else { return }
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
| `- warning: mutation of captured var 'videoCompleted' in concurrently-executing code
307 | sessionForVideoEncoder = nil
308 | if audioCompleted {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:307:21: warning: mutation of captured var 'sessionForVideoEncoder' in concurrently-executing code
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
| `- warning: mutation of captured var 'sessionForVideoEncoder' in concurrently-executing code
308 | if audioCompleted {
309 | session.finish(completionHandler: completion)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:308:24: warning: reference to captured var 'audioCompleted' in concurrently-executing code
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
308 | if audioCompleted {
| `- warning: reference to captured var 'audioCompleted' in concurrently-executing code
309 | session.finish(completionHandler: completion)
310 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:320:37: warning: capture of 'sessionForAudioEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
318 | var sessionForAudioEncoder: AssetExportSession? = self
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
| `- warning: capture of 'sessionForAudioEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:321:42: warning: capture of 'audioOutput' with non-sendable type 'AVAssetReaderAudioMixOutput' in a '@Sendable' closure
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
321 | if !session.encode(from: audioOutput, to: audioInput) {
| `- warning: capture of 'audioOutput' with non-sendable type 'AVAssetReaderAudioMixOutput' in a '@Sendable' closure
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetReaderOutput.h:300:12: note: class 'AVAssetReaderAudioMixOutput' does not conform to the 'Sendable' protocol
298 | */
299 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
300 | @interface AVAssetReaderAudioMixOutput : AVAssetReaderOutput
| `- note: class 'AVAssetReaderAudioMixOutput' does not conform to the 'Sendable' protocol
301 | {
302 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:321:59: warning: capture of 'audioInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
321 | if !session.encode(from: audioOutput, to: audioInput) {
| `- warning: capture of 'audioInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetWriterInput.h:43:12: note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
41 | */
42 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
43 | @interface AVAssetWriterInput : NSObject
| `- note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
44 | {
45 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:325:59: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
323 | sessionForAudioEncoder = nil
324 | if videoCompleted {
325 | session.finish(completionHandler: completion)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
326 | }
327 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:320:37: warning: reference to captured var 'sessionForAudioEncoder' in concurrently-executing code
318 | var sessionForAudioEncoder: AssetExportSession? = self
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
| `- warning: reference to captured var 'sessionForAudioEncoder' in concurrently-executing code
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:322:21: warning: mutation of captured var 'audioCompleted' in concurrently-executing code
320 | guard let session = sessionForAudioEncoder else { return }
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
| `- warning: mutation of captured var 'audioCompleted' in concurrently-executing code
323 | sessionForAudioEncoder = nil
324 | if videoCompleted {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:323:21: warning: mutation of captured var 'sessionForAudioEncoder' in concurrently-executing code
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
| `- warning: mutation of captured var 'sessionForAudioEncoder' in concurrently-executing code
324 | if videoCompleted {
325 | session.finish(completionHandler: completion)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:324:24: warning: reference to captured var 'videoCompleted' in concurrently-executing code
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
324 | if videoCompleted {
| `- warning: reference to captured var 'videoCompleted' in concurrently-executing code
325 | session.finish(completionHandler: completion)
326 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:380:17: warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
378 | } else {
379 | self.writer.finishWriting {
380 | self.queue.async {
| `- warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
381 | if self.writer.status == .failed {
382 | try? FileManager().removeItem(at: self.outputURL)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:387:68: warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
385 | self.dispatchProgressCallback { $0.updateFinishWritingProgress(fractionCompleted: 1) }
386 | }
387 | self.dispatchCallback(with: self.writer.error, completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
388 | }
389 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:381:24: warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
379 | self.writer.finishWriting {
380 | self.queue.async {
381 | if self.writer.status == .failed {
| `- warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
382 | try? FileManager().removeItem(at: self.outputURL)
383 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:387:68: warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
385 | self.dispatchProgressCallback { $0.updateFinishWritingProgress(fractionCompleted: 1) }
386 | }
387 | self.dispatchCallback(with: self.writer.error, completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
388 | }
389 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:421:16: warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
419 | self.cancelled = true
420 | self.queue.async {
421 | if self.reader.status == .reading {
| `- warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
422 | self.reader.cancelReading()
423 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:336:31: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
334 | private func dispatchProgressCallback(with updater: @escaping (ExportProgress) -> Void) {
335 | DispatchQueue.main.async {
336 | if let progress = self.progress {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
337 | updater(progress)
338 | self.progressHandler?(progress)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:337:17: warning: sending 'updater' risks causing data races; this is an error in the Swift 6 language mode
335 | DispatchQueue.main.async {
336 | if let progress = self.progress {
337 | updater(progress)
| |- warning: sending 'updater' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'updater' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
338 | self.progressHandler?(progress)
339 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:265:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
263 | if self.status != .idle || self.cancelled {
264 | DispatchQueue.main.async {
265 | completion(Error.invalidStatus)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
266 | }
267 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:287:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
285 | } catch {
286 | DispatchQueue.main.async {
287 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
288 | }
289 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:345:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
343 | private func dispatchCallback(with error: Swift.Error?, _ completionHandler: @escaping (Swift.Error?) -> Void) {
344 | DispatchQueue.main.async {
345 | self.progressHandler = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
346 | self.status = .completed
347 | completionHandler(error)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:347:13: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
345 | self.progressHandler = nil
346 | self.status = .completed
347 | completionHandler(error)
| |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
348 | }
349 | }
[12/20] Compiling VideoIO AssetExportSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:216:18: warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
214 |
215 |
216 | public class ExportProgress: Progress {
| `- warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
217 | public let videoEncodingProgress: Progress?
218 | public let audioEncodingProgress: Progress?
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:304:37: warning: capture of 'sessionForVideoEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
302 | var sessionForVideoEncoder: AssetExportSession? = self
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
| `- warning: capture of 'sessionForVideoEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:305:42: warning: capture of 'videoOutput' with non-sendable type 'AVAssetReaderOutput' in a '@Sendable' closure
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
305 | if !session.encode(from: videoOutput, to: videoInput) {
| `- warning: capture of 'videoOutput' with non-sendable type 'AVAssetReaderOutput' in a '@Sendable' closure
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetReaderOutput.h:42:12: note: class 'AVAssetReaderOutput' does not conform to the 'Sendable' protocol
40 | */
41 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
42 | @interface AVAssetReaderOutput : NSObject
| `- note: class 'AVAssetReaderOutput' does not conform to the 'Sendable' protocol
43 | {
44 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
7 |
8 | import Foundation
9 | import AVFoundation
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'AVFoundation'
10 |
11 | public class AssetExportSession {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:305:59: warning: capture of 'videoInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
305 | if !session.encode(from: videoOutput, to: videoInput) {
| `- warning: capture of 'videoInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetWriterInput.h:43:12: note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
41 | */
42 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
43 | @interface AVAssetWriterInput : NSObject
| `- note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
44 | {
45 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:309:59: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
307 | sessionForVideoEncoder = nil
308 | if audioCompleted {
309 | session.finish(completionHandler: completion)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
310 | }
311 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:304:37: warning: reference to captured var 'sessionForVideoEncoder' in concurrently-executing code
302 | var sessionForVideoEncoder: AssetExportSession? = self
303 | videoInput.requestMediaDataWhenReady(on: self.queue) { [unowned videoInput] in
304 | guard let session = sessionForVideoEncoder else { return }
| `- warning: reference to captured var 'sessionForVideoEncoder' in concurrently-executing code
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:306:21: warning: mutation of captured var 'videoCompleted' in concurrently-executing code
304 | guard let session = sessionForVideoEncoder else { return }
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
| `- warning: mutation of captured var 'videoCompleted' in concurrently-executing code
307 | sessionForVideoEncoder = nil
308 | if audioCompleted {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:307:21: warning: mutation of captured var 'sessionForVideoEncoder' in concurrently-executing code
305 | if !session.encode(from: videoOutput, to: videoInput) {
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
| `- warning: mutation of captured var 'sessionForVideoEncoder' in concurrently-executing code
308 | if audioCompleted {
309 | session.finish(completionHandler: completion)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:308:24: warning: reference to captured var 'audioCompleted' in concurrently-executing code
306 | videoCompleted = true
307 | sessionForVideoEncoder = nil
308 | if audioCompleted {
| `- warning: reference to captured var 'audioCompleted' in concurrently-executing code
309 | session.finish(completionHandler: completion)
310 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:320:37: warning: capture of 'sessionForAudioEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
318 | var sessionForAudioEncoder: AssetExportSession? = self
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
| `- warning: capture of 'sessionForAudioEncoder' with non-sendable type 'AssetExportSession?' in a '@Sendable' closure
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:321:42: warning: capture of 'audioOutput' with non-sendable type 'AVAssetReaderAudioMixOutput' in a '@Sendable' closure
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
321 | if !session.encode(from: audioOutput, to: audioInput) {
| `- warning: capture of 'audioOutput' with non-sendable type 'AVAssetReaderAudioMixOutput' in a '@Sendable' closure
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetReaderOutput.h:300:12: note: class 'AVAssetReaderAudioMixOutput' does not conform to the 'Sendable' protocol
298 | */
299 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
300 | @interface AVAssetReaderAudioMixOutput : AVAssetReaderOutput
| `- note: class 'AVAssetReaderAudioMixOutput' does not conform to the 'Sendable' protocol
301 | {
302 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:321:59: warning: capture of 'audioInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
321 | if !session.encode(from: audioOutput, to: audioInput) {
| `- warning: capture of 'audioInput' with non-sendable type 'AVAssetWriterInput' in a '@Sendable' closure
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetWriterInput.h:43:12: note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
41 | */
42 | API_AVAILABLE(macos(10.7), ios(4.1), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
43 | @interface AVAssetWriterInput : NSObject
| `- note: class 'AVAssetWriterInput' does not conform to the 'Sendable' protocol
44 | {
45 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:325:59: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
323 | sessionForAudioEncoder = nil
324 | if videoCompleted {
325 | session.finish(completionHandler: completion)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
326 | }
327 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:320:37: warning: reference to captured var 'sessionForAudioEncoder' in concurrently-executing code
318 | var sessionForAudioEncoder: AssetExportSession? = self
319 | audioInput.requestMediaDataWhenReady(on: self.queue) { [unowned audioInput] in
320 | guard let session = sessionForAudioEncoder else { return }
| `- warning: reference to captured var 'sessionForAudioEncoder' in concurrently-executing code
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:322:21: warning: mutation of captured var 'audioCompleted' in concurrently-executing code
320 | guard let session = sessionForAudioEncoder else { return }
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
| `- warning: mutation of captured var 'audioCompleted' in concurrently-executing code
323 | sessionForAudioEncoder = nil
324 | if videoCompleted {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:323:21: warning: mutation of captured var 'sessionForAudioEncoder' in concurrently-executing code
321 | if !session.encode(from: audioOutput, to: audioInput) {
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
| `- warning: mutation of captured var 'sessionForAudioEncoder' in concurrently-executing code
324 | if videoCompleted {
325 | session.finish(completionHandler: completion)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:324:24: warning: reference to captured var 'videoCompleted' in concurrently-executing code
322 | audioCompleted = true
323 | sessionForAudioEncoder = nil
324 | if videoCompleted {
| `- warning: reference to captured var 'videoCompleted' in concurrently-executing code
325 | session.finish(completionHandler: completion)
326 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:380:17: warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
378 | } else {
379 | self.writer.finishWriting {
380 | self.queue.async {
| `- warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
381 | if self.writer.status == .failed {
382 | try? FileManager().removeItem(at: self.outputURL)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:387:68: warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
385 | self.dispatchProgressCallback { $0.updateFinishWritingProgress(fractionCompleted: 1) }
386 | }
387 | self.dispatchCallback(with: self.writer.error, completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
388 | }
389 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:381:24: warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
379 | self.writer.finishWriting {
380 | self.queue.async {
381 | if self.writer.status == .failed {
| `- warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
382 | try? FileManager().removeItem(at: self.outputURL)
383 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:387:68: warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
385 | self.dispatchProgressCallback { $0.updateFinishWritingProgress(fractionCompleted: 1) }
386 | }
387 | self.dispatchCallback(with: self.writer.error, completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
388 | }
389 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:421:16: warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
9 | import AVFoundation
10 |
11 | public class AssetExportSession {
| `- note: class 'AssetExportSession' does not conform to the 'Sendable' protocol
12 |
13 | public struct Configuration {
:
419 | self.cancelled = true
420 | self.queue.async {
421 | if self.reader.status == .reading {
| `- warning: capture of 'self' with non-sendable type 'AssetExportSession' in a '@Sendable' closure
422 | self.reader.cancelReading()
423 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:336:31: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
334 | private func dispatchProgressCallback(with updater: @escaping (ExportProgress) -> Void) {
335 | DispatchQueue.main.async {
336 | if let progress = self.progress {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
337 | updater(progress)
338 | self.progressHandler?(progress)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:337:17: warning: sending 'updater' risks causing data races; this is an error in the Swift 6 language mode
335 | DispatchQueue.main.async {
336 | if let progress = self.progress {
337 | updater(progress)
| |- warning: sending 'updater' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'updater' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
338 | self.progressHandler?(progress)
339 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:265:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
263 | if self.status != .idle || self.cancelled {
264 | DispatchQueue.main.async {
265 | completion(Error.invalidStatus)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
266 | }
267 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:287:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
285 | } catch {
286 | DispatchQueue.main.async {
287 | completion(error)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
288 | }
289 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:345:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
343 | private func dispatchCallback(with error: Swift.Error?, _ completionHandler: @escaping (Swift.Error?) -> Void) {
344 | DispatchQueue.main.async {
345 | self.progressHandler = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
346 | self.status = .completed
347 | completionHandler(error)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:347:13: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
345 | self.progressHandler = nil
346 | self.status = .completed
347 | completionHandler(error)
| |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
348 | }
349 | }
[13/20] Emitting module VideoIO
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:216:18: warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
214 |
215 |
216 | public class ExportProgress: Progress {
| `- warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
217 | public let videoEncodingProgress: Progress?
218 | public let audioEncodingProgress: Progress?
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:43:24: warning: static property 'tracker' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
41 |
42 | private struct Key {
43 | static var tracker = ""
| |- warning: static property 'tracker' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'tracker' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'tracker' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
44 | }
45 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:26:27: warning: static property 'fit' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
24 | self.init(rawValue: value)
25 | }
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
| |- warning: static property 'fit' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'fit' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:27:27: warning: static property 'resize' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
25 | }
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
| |- warning: static property 'resize' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:28:27: warning: static property 'resizeAspect' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
26 | public static let fit = ScalingMode(AVVideoScalingModeFit)
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
| |- warning: static property 'resizeAspect' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resizeAspect' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
30 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioVideoSettings.swift:29:27: warning: static property 'resizeAspectFill' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
16 | public struct VideoSettings: Codable {
17 |
18 | public struct ScalingMode: RawRepresentable {
| `- note: consider making struct 'ScalingMode' conform to the 'Sendable' protocol
19 | public let rawValue: String
20 | public init(rawValue: String) {
:
27 | public static let resize = ScalingMode(AVVideoScalingModeResize)
28 | public static let resizeAspect = ScalingMode(AVVideoScalingModeResizeAspect)
29 | public static let resizeAspectFill = ScalingMode(AVVideoScalingModeResizeAspectFill)
| |- warning: static property 'resizeAspectFill' is not concurrency-safe because non-'Sendable' type 'VideoSettings.ScalingMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'resizeAspectFill' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 | }
31 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:29:27: warning: static property 'portraitFrontMirroredVideoOutput' is not concurrency-safe because non-'Sendable' type 'Camera.Configurator' may have shared mutable state; this is an error in the Swift 6 language mode
20 | }
21 |
22 | public struct Configurator {
| `- note: consider making struct 'Configurator' conform to the 'Sendable' protocol
23 | /// Called when video connection estiblished or video device changed. Called before `captureSession.commitConfiguration`.
24 | public var videoConnectionConfigurator: (Camera, AVCaptureConnection) -> Void
:
27 | public var videoDeviceConfigurator: (Camera, AVCaptureDevice) -> Void
28 |
29 | public static let portraitFrontMirroredVideoOutput: Configurator = {
| |- warning: static property 'portraitFrontMirroredVideoOutput' is not concurrency-safe because non-'Sendable' type 'Camera.Configurator' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'portraitFrontMirroredVideoOutput' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 | var configurator = Configurator()
31 | configurator.videoConnectionConfigurator = { camera, connection in
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:389:6: error: stored properties cannot be marked unavailable with '@available'
387 | internal var photoCaptureDelegateHandlers: [AnyObject] = []
388 |
389 | @available(macOS, unavailable)
| `- error: stored properties cannot be marked unavailable with '@available'
390 | internal var audioQueueCaptureSession: AudioQueueCaptureSession?
391 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:17:27: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'PlayerVideoOutput.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
12 | public class PlayerVideoOutput: NSObject {
13 |
14 | public struct Configuration {
| `- note: consider making struct 'Configuration' conform to the 'Sendable' protocol
15 | public var sourcePixelBufferAttributes: [String: Any]?
16 | public var preferredFramesPerSecond: Int = 30
17 | public static let `default` = Configuration()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'PlayerVideoOutput.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public init() {
19 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:15:14: warning: non-final class 'BlockBasedVideoCompositor' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
13 | }
14 |
15 | public class BlockBasedVideoCompositor: NSObject, VideoCompositorProtocol {
| `- warning: non-final class 'BlockBasedVideoCompositor' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
16 |
17 | public enum Error: Swift.Error {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:48:16: warning: stored property 'sourcePixelBufferAttributes' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
46 | }
47 |
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
| `- warning: stored property 'sourcePixelBufferAttributes' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:50:16: warning: stored property 'requiredPixelBufferAttributesForRenderContext' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
| `- warning: stored property 'requiredPixelBufferAttributesForRenderContext' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
51 |
52 | public func renderContextChanged(_ newRenderContext: AVVideoCompositionRenderContext) {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:15:14: error: type 'BlockBasedVideoCompositor' does not conform to protocol 'AVVideoCompositing'
13 | }
14 |
15 | public class BlockBasedVideoCompositor: NSObject, VideoCompositorProtocol {
| |- error: type 'BlockBasedVideoCompositor' does not conform to protocol 'AVVideoCompositing'
| `- note: add stubs for conformance
16 |
17 | public enum Error: Swift.Error {
:
46 | }
47 |
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
| `- note: candidate has non-matching type '[String : Any]?'
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
| `- note: candidate has non-matching type '[String : Any]'
51 |
52 | public func renderContextChanged(_ newRenderContext: AVVideoCompositionRenderContext) {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVVideoCompositing.h:141:91: note: protocol requires property 'sourcePixelBufferAttributes' with type '[String : any Sendable]?'
139 | source buffer attributes afterwards is not supported.
140 | */
141 | @property (nonatomic, readonly, nullable) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *sourcePixelBufferAttributes;
| `- note: protocol requires property 'sourcePixelBufferAttributes' with type '[String : any Sendable]?'
142 |
143 | /* Indicates the pixel buffer attributes required by the video compositor for new buffers that it creates
:
149 | required buffer attributes afterwards is not supported.
150 | */
151 | @property (nonatomic, readonly) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *requiredPixelBufferAttributesForRenderContext;
| `- note: protocol requires property 'requiredPixelBufferAttributesForRenderContext' with type '[String : any Sendable]'
152 |
153 | /*!
[14/20] Compiling VideoIO UnfairLock.swift
[15/20] Compiling VideoIO MovieMerger.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MovieMerger.swift:73:20: warning: capture of 'exportSession' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
71 | exportSession.timeRange = CMTimeRange(start: .zero, duration: composition.duration)
72 | exportSession.exportAsynchronously {
73 | switch exportSession.status {
| `- warning: capture of 'exportSession' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
74 | case .failed:
75 | if let error = exportSession.error {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MovieMerger.swift:76:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
74 | case .failed:
75 | if let error = exportSession.error {
76 | completion(error)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
77 | } else {
78 | assertionFailure()
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:167:19: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
165 | self.queue.async {
166 | //no `errorLock` is required here because the `error` can only be assigned on `self.queue`
167 | guard self.stopped == false, self.error == nil else {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
168 | return
169 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:174:41: warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
172 | do {
173 | var videoInputs: [AVAssetWriterInput] = []
174 | for sampleBuffer in sampleBuffers {
| `- warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
175 | guard let formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer) else {
176 | throw RecorderError.cannotSetupVideoInputs
Swift.Array:1:23: note: generic struct 'Array' does not conform to the 'Sendable' protocol
1 | @frozen public struct Array<Element> : _DestructorSafeContainer {
| `- note: generic struct 'Array' does not conform to the 'Sendable' protocol
2 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:207:87: warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
205 | }
206 |
207 | guard self.videoInputs.count == self.configuration.numberOfVideoTracks && self.audioInputs.count == self.configuration.numberOfAudioTracks else {
| `- warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
208 | return
209 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:277:19: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
275 | self.queue.async {
276 | //no `errorLock` is required here because the `error` can only be assigned on `self.queue`
277 | guard self.stopped == false, self.error == nil else {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
278 | return
279 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:284:41: warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
282 | do {
283 | var audioInputs: [AVAssetWriterInput] = []
284 | for sampleBuffer in sampleBuffers {
| `- warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
285 | guard let formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer) else {
286 | throw RecorderError.cannotSetupAudioInputs
Swift.Array:1:23: note: generic struct 'Array' does not conform to the 'Sendable' protocol
1 | @frozen public struct Array<Element> : _DestructorSafeContainer {
| `- note: generic struct 'Array' does not conform to the 'Sendable' protocol
2 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:328:87: warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
326 | }
327 |
328 | guard self.videoInputs.count == self.configuration.numberOfVideoTracks && self.audioInputs.count == self.configuration.numberOfAudioTracks else {
| `- warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
329 | return
330 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:346:16: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
344 | public func cancelRecording(completion: @escaping () -> Void) {
345 | self.queue.async {
346 | if self.stopped {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
347 | DispatchQueue.main.async {
348 | completion()
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:348:21: warning: capture of 'completion' with non-sendable type '() -> Void' in a '@Sendable' closure
346 | if self.stopped {
347 | DispatchQueue.main.async {
348 | completion()
| |- warning: capture of 'completion' with non-sendable type '() -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
349 | }
350 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:371:16: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
369 | public func stopRecording(completion: @escaping (Error?) -> Void) {
370 | self.queue.async {
371 | if self.stopped {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
372 | DispatchQueue.main.async {
373 | completion(RecorderError.alreadyStopped)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:373:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
371 | if self.stopped {
372 | DispatchQueue.main.async {
373 | completion(RecorderError.alreadyStopped)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
374 | }
375 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:398:36: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
396 | if self.assetWriter.status == .writing {
397 | self.assetWriter.finishWriting {
398 | if let error = self.assetWriter.error {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
399 | DispatchQueue.main.async {
400 | completion(error)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:400:29: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
398 | if let error = self.assetWriter.error {
399 | DispatchQueue.main.async {
400 | completion(error)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
401 | }
402 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:223:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
221 | self.lastVideoSampleTime = presentationTime
222 | DispatchQueue.main.async {
223 | self.sampleWritingSessionStartedHandler?(presentationTime)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
224 | }
225 | }
226 |
227 | if self.assetWriter.status == .writing {
| `- note: access can happen concurrently
228 | if self.videoInputs.map(\.isReadyForMoreMediaData).reduce(true, { $0 && $1 }) {
229 | for (index, sampleBuffer) in sampleBuffers.enumerated() {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:236:33: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
233 | let duration = presentationTime - startTime
234 | self._duration = duration
235 | DispatchQueue.main.async {
| `- note: access can happen concurrently
236 | self.durationChangedHandler?(duration)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
237 | }
238 | } else {
[16/20] Compiling VideoIO MultitrackMovieRecorder.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MovieMerger.swift:73:20: warning: capture of 'exportSession' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
71 | exportSession.timeRange = CMTimeRange(start: .zero, duration: composition.duration)
72 | exportSession.exportAsynchronously {
73 | switch exportSession.status {
| `- warning: capture of 'exportSession' with non-sendable type 'AVAssetExportSession' in a '@Sendable' closure
74 | case .failed:
75 | if let error = exportSession.error {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetExportSession.h:156:12: note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
154 | NS_SWIFT_NONSENDABLE
155 | API_AVAILABLE(macos(10.7), ios(4.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
156 | @interface AVAssetExportSession : NSObject
| `- note: class 'AVAssetExportSession' does not conform to the 'Sendable' protocol
157 | {
158 | @private
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MovieMerger.swift:76:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
74 | case .failed:
75 | if let error = exportSession.error {
76 | completion(error)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
77 | } else {
78 | assertionFailure()
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:167:19: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
165 | self.queue.async {
166 | //no `errorLock` is required here because the `error` can only be assigned on `self.queue`
167 | guard self.stopped == false, self.error == nil else {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
168 | return
169 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:174:41: warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
172 | do {
173 | var videoInputs: [AVAssetWriterInput] = []
174 | for sampleBuffer in sampleBuffers {
| `- warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
175 | guard let formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer) else {
176 | throw RecorderError.cannotSetupVideoInputs
Swift.Array:1:23: note: generic struct 'Array' does not conform to the 'Sendable' protocol
1 | @frozen public struct Array<Element> : _DestructorSafeContainer {
| `- note: generic struct 'Array' does not conform to the 'Sendable' protocol
2 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:207:87: warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
205 | }
206 |
207 | guard self.videoInputs.count == self.configuration.numberOfVideoTracks && self.audioInputs.count == self.configuration.numberOfAudioTracks else {
| `- warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
208 | return
209 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:277:19: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
275 | self.queue.async {
276 | //no `errorLock` is required here because the `error` can only be assigned on `self.queue`
277 | guard self.stopped == false, self.error == nil else {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
278 | return
279 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:284:41: warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
282 | do {
283 | var audioInputs: [AVAssetWriterInput] = []
284 | for sampleBuffer in sampleBuffers {
| `- warning: capture of 'sampleBuffers' with non-sendable type '[CMSampleBuffer]' in a '@Sendable' closure
285 | guard let formatDescription = CMSampleBufferGetFormatDescription(sampleBuffer) else {
286 | throw RecorderError.cannotSetupAudioInputs
Swift.Array:1:23: note: generic struct 'Array' does not conform to the 'Sendable' protocol
1 | @frozen public struct Array<Element> : _DestructorSafeContainer {
| `- note: generic struct 'Array' does not conform to the 'Sendable' protocol
2 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:328:87: warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
326 | }
327 |
328 | guard self.videoInputs.count == self.configuration.numberOfVideoTracks && self.audioInputs.count == self.configuration.numberOfAudioTracks else {
| `- warning: implicit capture of 'self' requires that 'MultitrackMovieRecorder' conforms to 'Sendable'; this is an error in the Swift 6 language mode
329 | return
330 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:346:16: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
344 | public func cancelRecording(completion: @escaping () -> Void) {
345 | self.queue.async {
346 | if self.stopped {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
347 | DispatchQueue.main.async {
348 | completion()
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:348:21: warning: capture of 'completion' with non-sendable type '() -> Void' in a '@Sendable' closure
346 | if self.stopped {
347 | DispatchQueue.main.async {
348 | completion()
| |- warning: capture of 'completion' with non-sendable type '() -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
349 | }
350 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:371:16: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
369 | public func stopRecording(completion: @escaping (Error?) -> Void) {
370 | self.queue.async {
371 | if self.stopped {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
372 | DispatchQueue.main.async {
373 | completion(RecorderError.alreadyStopped)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:373:21: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
371 | if self.stopped {
372 | DispatchQueue.main.async {
373 | completion(RecorderError.alreadyStopped)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
374 | }
375 | return
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:398:36: warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
2 | import CoreImage
3 |
4 | public final class MultitrackMovieRecorder {
| `- note: class 'MultitrackMovieRecorder' does not conform to the 'Sendable' protocol
5 |
6 | public enum RecorderError: LocalizedError {
:
396 | if self.assetWriter.status == .writing {
397 | self.assetWriter.finishWriting {
398 | if let error = self.assetWriter.error {
| `- warning: capture of 'self' with non-sendable type 'MultitrackMovieRecorder' in a '@Sendable' closure
399 | DispatchQueue.main.async {
400 | completion(error)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:400:29: warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
398 | if let error = self.assetWriter.error {
399 | DispatchQueue.main.async {
400 | completion(error)
| |- warning: capture of 'completion' with non-sendable type '((any Error)?) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
401 | }
402 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:223:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
221 | self.lastVideoSampleTime = presentationTime
222 | DispatchQueue.main.async {
223 | self.sampleWritingSessionStartedHandler?(presentationTime)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
224 | }
225 | }
226 |
227 | if self.assetWriter.status == .writing {
| `- note: access can happen concurrently
228 | if self.videoInputs.map(\.isReadyForMoreMediaData).reduce(true, { $0 && $1 }) {
229 | for (index, sampleBuffer) in sampleBuffers.enumerated() {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/MultitrackMovieRecorder.swift:236:33: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
233 | let duration = presentationTime - startTime
234 | self._duration = duration
235 | DispatchQueue.main.async {
| `- note: access can happen concurrently
236 | self.durationChangedHandler?(duration)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
237 | }
238 | } else {
[17/20] Compiling VideoIO VideoComposition.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:15:14: warning: non-final class 'BlockBasedVideoCompositor' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
13 | }
14 |
15 | public class BlockBasedVideoCompositor: NSObject, VideoCompositorProtocol {
| `- warning: non-final class 'BlockBasedVideoCompositor' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
16 |
17 | public enum Error: Swift.Error {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:48:16: warning: stored property 'sourcePixelBufferAttributes' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
46 | }
47 |
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
| `- warning: stored property 'sourcePixelBufferAttributes' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:50:16: warning: stored property 'requiredPixelBufferAttributesForRenderContext' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
| `- warning: stored property 'requiredPixelBufferAttributesForRenderContext' of 'Sendable'-conforming class 'BlockBasedVideoCompositor' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
51 |
52 | public func renderContextChanged(_ newRenderContext: AVVideoCompositionRenderContext) {
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:15:14: error: type 'BlockBasedVideoCompositor' does not conform to protocol 'AVVideoCompositing'
13 | }
14 |
15 | public class BlockBasedVideoCompositor: NSObject, VideoCompositorProtocol {
| |- error: type 'BlockBasedVideoCompositor' does not conform to protocol 'AVVideoCompositing'
| `- note: add stubs for conformance
16 |
17 | public enum Error: Swift.Error {
:
46 | }
47 |
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
| `- note: candidate has non-matching type '[String : Any]?'
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
| `- note: candidate has non-matching type '[String : Any]'
51 |
52 | public func renderContextChanged(_ newRenderContext: AVVideoCompositionRenderContext) {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVVideoCompositing.h:141:91: note: protocol requires property 'sourcePixelBufferAttributes' with type '[String : any Sendable]?'
139 | source buffer attributes afterwards is not supported.
140 | */
141 | @property (nonatomic, readonly, nullable) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *sourcePixelBufferAttributes;
| `- note: protocol requires property 'sourcePixelBufferAttributes' with type '[String : any Sendable]?'
142 |
143 | /* Indicates the pixel buffer attributes required by the video compositor for new buffers that it creates
:
149 | required buffer attributes afterwards is not supported.
150 | */
151 | @property (nonatomic, readonly) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *requiredPixelBufferAttributesForRenderContext;
| `- note: protocol requires property 'requiredPixelBufferAttributesForRenderContext' with type '[String : any Sendable]'
152 |
153 | /*!
[18/20] Compiling VideoIO PlayerVideoOutput.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:17:27: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'PlayerVideoOutput.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
12 | public class PlayerVideoOutput: NSObject {
13 |
14 | public struct Configuration {
| `- note: consider making struct 'Configuration' conform to the 'Sendable' protocol
15 | public var sourcePixelBufferAttributes: [String: Any]?
16 | public var preferredFramesPerSecond: Int = 30
17 | public static let `default` = Configuration()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'PlayerVideoOutput.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public init() {
19 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:100:36: warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
98 | private func attachCurrentPlayer() {
99 | self.playerItemObservation = self.player?.observe(\.currentItem, options: [.initial, .new], changeHandler: { [weak self] (player, change) in
100 | guard let strongSelf = self, strongSelf.player == player else {
| `- warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
101 | return
102 | }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:111:21: warning: main actor-isolated property 'outputs' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | }
106 |
107 | private func updatePlayerItem(_ playerItem: AVPlayerItem?) {
| `- note: add '@MainActor' to make instance method 'updatePlayerItem' part of global actor 'MainActor'
108 | self.displayLink?.invalidate()
109 | self.displayLink = nil
110 | if let output = self.playerItemOutput, let item = self.playerItem {
111 | if item.outputs.contains(output) {
| `- warning: main actor-isolated property 'outputs' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
112 | item.remove(output)
113 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:856:64: note: property declared here
854 | */
855 |
856 | @property (nonatomic, readonly) NSArray<AVPlayerItemOutput *> *outputs API_AVAILABLE(macos(10.8), ios(6.0), tvos(9.0), watchos(1.0), visionos(1.0));
| `- note: property declared here
857 |
858 | @end
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:112:22: warning: call to main actor-isolated instance method 'remove' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 | }
106 |
107 | private func updatePlayerItem(_ playerItem: AVPlayerItem?) {
| `- note: add '@MainActor' to make instance method 'updatePlayerItem' part of global actor 'MainActor'
108 | self.displayLink?.invalidate()
109 | self.displayLink = nil
110 | if let output = self.playerItemOutput, let item = self.playerItem {
111 | if item.outputs.contains(output) {
112 | item.remove(output)
| `- warning: call to main actor-isolated instance method 'remove' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
113 | }
114 | }
AVFoundation.AVPlayerItem.remove:3:24: note: calls to instance method 'remove' from outside of its actor context are implicitly asynchronous
1 | class AVPlayerItem {
2 | @available(macOS 10.8, *)
3 | @MainActor open func remove(_ output: AVPlayerItemOutput)}
| `- note: calls to instance method 'remove' from outside of its actor context are implicitly asynchronous
4 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:121:36: warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
119 | self.playerItem = playerItem
120 | self.playerItemStatusObservation = self.playerItem?.observe(\.status, options: [.initial,.new], changeHandler: { [weak self] item, change in
121 | guard let strongSelf = self else {
| `- warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
122 | return
123 | }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:136:33: warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
128 | }
129 |
130 | private func handleReadyToPlay() {
| `- note: add '@MainActor' to make instance method 'handleReadyToPlay()' part of global actor 'MainActor'
131 | guard let _ = self.player, let playerItem = self.playerItem else {
132 | return
:
134 |
135 | var hasVideoTrack: Bool = false
136 | for track in playerItem.asset.tracks {
| `- warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
137 | if track.mediaType == .video {
138 | hasVideoTrack = true
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:218:42: note: property declared here
216 | @abstract Accessor for underlying AVAsset.
217 | */
218 | @property (nonatomic, readonly) AVAsset *asset;
| `- note: property declared here
219 |
220 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:150:20: warning: call to main actor-isolated instance method 'add' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
128 | }
129 |
130 | private func handleReadyToPlay() {
| `- note: add '@MainActor' to make instance method 'handleReadyToPlay()' part of global actor 'MainActor'
131 | guard let _ = self.player, let playerItem = self.playerItem else {
132 | return
:
148 | let output = AVPlayerItemVideoOutput(pixelBufferAttributes: self.configuration.sourcePixelBufferAttributes)
149 | output.setDelegate(self, queue: .main)
150 | playerItem.add(output)
| `- warning: call to main actor-isolated instance method 'add' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
151 | self.playerItemOutput = output
152 |
AVFoundation.AVPlayerItem.add:3:24: note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
1 | class AVPlayerItem {
2 | @available(macOS 10.8, *)
3 | @MainActor open func add(_ output: AVPlayerItemOutput)}
| `- note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
4 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:161:31: error: 'CADisplayLink' is only available in macOS 14.0 or newer
154 | }
155 |
156 | private func setupDisplayLink() {
| `- note: add @available attribute to enclosing instance method
157 | self.displayLink?.invalidate()
158 | self.displayLink = nil
159 |
160 | if self.playerItemOutput != nil {
161 | let displayLink = CADisplayLink(target: DisplayLinkTarget({ [weak self] in
| |- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
162 | self?.handleUpdate()
163 | }), selector: #selector(DisplayLinkTarget.handleDisplayLinkUpdate(sender:)))
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:171:45: warning: main actor-isolated property 'rate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
168 | }
169 |
170 | private func handleUpdate() {
| `- note: add '@MainActor' to make instance method 'handleUpdate()' part of global actor 'MainActor'
171 | if let player = self.player, player.rate != 0 {
| `- warning: main actor-isolated property 'rate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
172 | self.forceUpdate = true
173 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayer.h:184:17: note: property declared here
182 | Before macOS 13, iOS 16, tvOS 16, and watchOS 9, this property must be accessed on the main thread/queue.
183 | */
184 | @property float rate
| `- note: property declared here
185 | #if AVF_DEPLOYING_TO_2022_RELEASES_AND_LATER
186 | NS_SWIFT_NONISOLATED
[19/20] Compiling VideoIO SampleBufferUtilities.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:17:27: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'PlayerVideoOutput.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
12 | public class PlayerVideoOutput: NSObject {
13 |
14 | public struct Configuration {
| `- note: consider making struct 'Configuration' conform to the 'Sendable' protocol
15 | public var sourcePixelBufferAttributes: [String: Any]?
16 | public var preferredFramesPerSecond: Int = 30
17 | public static let `default` = Configuration()
| |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'PlayerVideoOutput.Configuration' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public init() {
19 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:100:36: warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
98 | private func attachCurrentPlayer() {
99 | self.playerItemObservation = self.player?.observe(\.currentItem, options: [.initial, .new], changeHandler: { [weak self] (player, change) in
100 | guard let strongSelf = self, strongSelf.player == player else {
| `- warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
101 | return
102 | }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:111:21: warning: main actor-isolated property 'outputs' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
105 | }
106 |
107 | private func updatePlayerItem(_ playerItem: AVPlayerItem?) {
| `- note: add '@MainActor' to make instance method 'updatePlayerItem' part of global actor 'MainActor'
108 | self.displayLink?.invalidate()
109 | self.displayLink = nil
110 | if let output = self.playerItemOutput, let item = self.playerItem {
111 | if item.outputs.contains(output) {
| `- warning: main actor-isolated property 'outputs' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
112 | item.remove(output)
113 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:856:64: note: property declared here
854 | */
855 |
856 | @property (nonatomic, readonly) NSArray<AVPlayerItemOutput *> *outputs API_AVAILABLE(macos(10.8), ios(6.0), tvos(9.0), watchos(1.0), visionos(1.0));
| `- note: property declared here
857 |
858 | @end
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:112:22: warning: call to main actor-isolated instance method 'remove' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
105 | }
106 |
107 | private func updatePlayerItem(_ playerItem: AVPlayerItem?) {
| `- note: add '@MainActor' to make instance method 'updatePlayerItem' part of global actor 'MainActor'
108 | self.displayLink?.invalidate()
109 | self.displayLink = nil
110 | if let output = self.playerItemOutput, let item = self.playerItem {
111 | if item.outputs.contains(output) {
112 | item.remove(output)
| `- warning: call to main actor-isolated instance method 'remove' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
113 | }
114 | }
AVFoundation.AVPlayerItem.remove:3:24: note: calls to instance method 'remove' from outside of its actor context are implicitly asynchronous
1 | class AVPlayerItem {
2 | @available(macOS 10.8, *)
3 | @MainActor open func remove(_ output: AVPlayerItemOutput)}
| `- note: calls to instance method 'remove' from outside of its actor context are implicitly asynchronous
4 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:121:36: warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
119 | self.playerItem = playerItem
120 | self.playerItemStatusObservation = self.playerItem?.observe(\.status, options: [.initial,.new], changeHandler: { [weak self] item, change in
121 | guard let strongSelf = self else {
| `- warning: capture of 'self' with non-sendable type 'PlayerVideoOutput?' in a '@Sendable' closure
122 | return
123 | }
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
| `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 | case none
3 | case some(Wrapped)
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:136:33: warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
128 | }
129 |
130 | private func handleReadyToPlay() {
| `- note: add '@MainActor' to make instance method 'handleReadyToPlay()' part of global actor 'MainActor'
131 | guard let _ = self.player, let playerItem = self.playerItem else {
132 | return
:
134 |
135 | var hasVideoTrack: Bool = false
136 | for track in playerItem.asset.tracks {
| `- warning: main actor-isolated property 'asset' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
137 | if track.mediaType == .video {
138 | hasVideoTrack = true
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayerItem.h:218:42: note: property declared here
216 | @abstract Accessor for underlying AVAsset.
217 | */
218 | @property (nonatomic, readonly) AVAsset *asset;
| `- note: property declared here
219 |
220 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:150:20: warning: call to main actor-isolated instance method 'add' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
128 | }
129 |
130 | private func handleReadyToPlay() {
| `- note: add '@MainActor' to make instance method 'handleReadyToPlay()' part of global actor 'MainActor'
131 | guard let _ = self.player, let playerItem = self.playerItem else {
132 | return
:
148 | let output = AVPlayerItemVideoOutput(pixelBufferAttributes: self.configuration.sourcePixelBufferAttributes)
149 | output.setDelegate(self, queue: .main)
150 | playerItem.add(output)
| `- warning: call to main actor-isolated instance method 'add' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
151 | self.playerItemOutput = output
152 |
AVFoundation.AVPlayerItem.add:3:24: note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
1 | class AVPlayerItem {
2 | @available(macOS 10.8, *)
3 | @MainActor open func add(_ output: AVPlayerItemOutput)}
| `- note: calls to instance method 'add' from outside of its actor context are implicitly asynchronous
4 |
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:161:31: error: 'CADisplayLink' is only available in macOS 14.0 or newer
154 | }
155 |
156 | private func setupDisplayLink() {
| `- note: add @available attribute to enclosing instance method
157 | self.displayLink?.invalidate()
158 | self.displayLink = nil
159 |
160 | if self.playerItemOutput != nil {
161 | let displayLink = CADisplayLink(target: DisplayLinkTarget({ [weak self] in
| |- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
162 | self?.handleUpdate()
163 | }), selector: #selector(DisplayLinkTarget.handleDisplayLinkUpdate(sender:)))
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:171:45: warning: main actor-isolated property 'rate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
168 | }
169 |
170 | private func handleUpdate() {
| `- note: add '@MainActor' to make instance method 'handleUpdate()' part of global actor 'MainActor'
171 | if let player = self.player, player.rate != 0 {
| `- warning: main actor-isolated property 'rate' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
172 | self.forceUpdate = true
173 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVPlayer.h:184:17: note: property declared here
182 | Before macOS 13, iOS 16, tvOS 16, and watchOS 9, this property must be accessed on the main thread/queue.
183 | */
184 | @property float rate
| `- note: property declared here
185 | #if AVF_DEPLOYING_TO_2022_RELEASES_AND_LATER
186 | NS_SWIFT_NONISOLATED
[20/20] Compiling VideoIO VideoOrientationUtilities.swift
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
[2/18] Compiling VideoIO UnfairLock.swift
[3/19] Compiling VideoIO VideoComposition.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:48:16: warning: sendability of function types in property 'sourcePixelBufferAttributes' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
46 | }
47 |
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
| `- warning: sendability of function types in property 'sourcePixelBufferAttributes' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVVideoCompositing.h:141:91: note: expected sendability to match requirement here
139 | source buffer attributes afterwards is not supported.
140 | */
141 | @property (nonatomic, readonly, nullable) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *sourcePixelBufferAttributes;
| `- note: expected sendability to match requirement here
142 |
143 | /* Indicates the pixel buffer attributes required by the video compositor for new buffers that it creates
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:50:16: warning: sendability of function types in property 'requiredPixelBufferAttributesForRenderContext' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
| `- warning: sendability of function types in property 'requiredPixelBufferAttributesForRenderContext' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
51 |
52 | public func renderContextChanged(_ newRenderContext: AVVideoCompositionRenderContext) {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVVideoCompositing.h:151:81: note: expected sendability to match requirement here
149 | required buffer attributes afterwards is not supported.
150 | */
151 | @property (nonatomic, readonly) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *requiredPixelBufferAttributesForRenderContext;
| `- note: expected sendability to match requirement here
152 |
153 | /*!
[4/19] Compiling VideoIO DeviceOrientationTracker.swift
[5/19] Compiling VideoIO MovieFileType.swift
[6/19] Compiling VideoIO Camera+PhotoCapture.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:389:6: error: stored properties cannot be marked unavailable with '@available'
387 | internal var photoCaptureDelegateHandlers: [AnyObject] = []
388 |
389 | @available(macOS, unavailable)
| `- error: stored properties cannot be marked unavailable with '@available'
390 | internal var audioQueueCaptureSession: AudioQueueCaptureSession?
391 | }
[7/19] Compiling VideoIO Camera.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:389:6: error: stored properties cannot be marked unavailable with '@available'
387 | internal var photoCaptureDelegateHandlers: [AnyObject] = []
388 |
389 | @available(macOS, unavailable)
| `- error: stored properties cannot be marked unavailable with '@available'
390 | internal var audioQueueCaptureSession: AudioQueueCaptureSession?
391 | }
[8/19] Compiling VideoIO PlayerVideoOutput.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:161:31: error: 'CADisplayLink' is only available in macOS 14.0 or newer
154 | }
155 |
156 | private func setupDisplayLink() {
| `- note: add @available attribute to enclosing instance method
157 | self.displayLink?.invalidate()
158 | self.displayLink = nil
159 |
160 | if self.playerItemOutput != nil {
161 | let displayLink = CADisplayLink(target: DisplayLinkTarget({ [weak self] in
| |- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
162 | self?.handleUpdate()
163 | }), selector: #selector(DisplayLinkTarget.handleDisplayLinkUpdate(sender:)))
[9/19] Compiling VideoIO SampleBufferUtilities.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/PlayerVideoOutput.swift:161:31: error: 'CADisplayLink' is only available in macOS 14.0 or newer
154 | }
155 |
156 | private func setupDisplayLink() {
| `- note: add @available attribute to enclosing instance method
157 | self.displayLink?.invalidate()
158 | self.displayLink = nil
159 |
160 | if self.playerItemOutput != nil {
161 | let displayLink = CADisplayLink(target: DisplayLinkTarget({ [weak self] in
| |- error: 'CADisplayLink' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
162 | self?.handleUpdate()
163 | }), selector: #selector(DisplayLinkTarget.handleDisplayLinkUpdate(sender:)))
[10/19] Compiling VideoIO VideoOrientationUtilities.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[11/19] Compiling VideoIO Camera+AudioQueueCapture.swift
[12/19] Compiling VideoIO Camera+FocusExposure.swift
[13/19] Compiling VideoIO AVAsset.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:216:18: warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
214 |
215 |
216 | public class ExportProgress: Progress {
| `- warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
217 | public let videoEncodingProgress: Progress?
218 | public let audioEncodingProgress: Progress?
[14/19] Compiling VideoIO AssetExportSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:216:18: warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
214 |
215 |
216 | public class ExportProgress: Progress {
| `- warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
217 | public let videoEncodingProgress: Progress?
218 | public let audioEncodingProgress: Progress?
[15/19] Compiling VideoIO MovieMerger.swift
[16/19] Compiling VideoIO MultitrackMovieRecorder.swift
[17/19] Emitting module VideoIO
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AssetExportSession.swift:216:18: warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
214 |
215 |
216 | public class ExportProgress: Progress {
| `- warning: class 'ExportProgress' must restate inherited '@unchecked Sendable' conformance
217 | public let videoEncodingProgress: Progress?
218 | public let audioEncodingProgress: Progress?
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/Camera.swift:389:6: error: stored properties cannot be marked unavailable with '@available'
387 | internal var photoCaptureDelegateHandlers: [AnyObject] = []
388 |
389 | @available(macOS, unavailable)
| `- error: stored properties cannot be marked unavailable with '@available'
390 | internal var audioQueueCaptureSession: AudioQueueCaptureSession?
391 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:48:16: warning: sendability of function types in property 'sourcePixelBufferAttributes' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
46 | }
47 |
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
| `- warning: sendability of function types in property 'sourcePixelBufferAttributes' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVVideoCompositing.h:141:91: note: expected sendability to match requirement here
139 | source buffer attributes afterwards is not supported.
140 | */
141 | @property (nonatomic, readonly, nullable) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *sourcePixelBufferAttributes;
| `- note: expected sendability to match requirement here
142 |
143 | /* Indicates the pixel buffer attributes required by the video compositor for new buffers that it creates
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/VideoComposition.swift:50:16: warning: sendability of function types in property 'requiredPixelBufferAttributesForRenderContext' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
48 | public let sourcePixelBufferAttributes: [String : Any]? = [kCVPixelBufferPixelFormatTypeKey as String: [kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange]]
49 |
50 | public let requiredPixelBufferAttributesForRenderContext: [String : Any] = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA]
| `- warning: sendability of function types in property 'requiredPixelBufferAttributesForRenderContext' does not match requirement in protocol 'AVVideoCompositing'; this is an error in the Swift 6 language mode
51 |
52 | public func renderContextChanged(_ newRenderContext: AVVideoCompositionRenderContext) {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVVideoCompositing.h:151:81: note: expected sendability to match requirement here
149 | required buffer attributes afterwards is not supported.
150 | */
151 | @property (nonatomic, readonly) NSDictionary<NSString *, id> NS_SWIFT_SENDABLE *requiredPixelBufferAttributesForRenderContext;
| `- note: expected sendability to match requirement here
152 |
153 | /*!
[18/19] Compiling VideoIO AudioQueueCaptureSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:48:42: warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
46 | static func attach(to: AnyObject, callback: @escaping () -> Void) {
47 | let tracker = LifetimeTracker(callback: callback)
48 | objc_setAssociatedObject(to, &Key.tracker, tracker, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
| `- warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
49 | }
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:206:16: warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
204 | }
205 | AudioQueueEnqueueBuffer(inAudioQueue, bufferRef, 0, nil)
206 | }, &self.clientInfo, nil, nil, 0, &audioQueue)
| `- warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
207 |
208 | if status != 0 {
[19/19] Compiling VideoIO AudioVideoSettings.swift
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:48:42: warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
46 | static func attach(to: AnyObject, callback: @escaping () -> Void) {
47 | let tracker = LifetimeTracker(callback: callback)
48 | objc_setAssociatedObject(to, &Key.tracker, tracker, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
| `- warning: forming 'UnsafeRawPointer' to an inout variable of type String exposes the internal representation rather than the string contents.
49 | }
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/VideoIO/AudioQueueCaptureSession.swift:206:16: warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
204 | }
205 | AudioQueueEnqueueBuffer(inAudioQueue, bufferRef, 0, nil)
206 | }, &self.clientInfo, nil, nil, 0, &audioQueue)
| `- warning: forming 'UnsafeMutableRawPointer' to a variable of type 'Optional<AudioQueueCaptureSession.ClientInfo>'; this is likely incorrect because 'Optional<AudioQueueCaptureSession.ClientInfo>' may contain an object reference.
207 |
208 | if status != 0 {
BUILD FAILURE 6.1 macosSpm