Skip to content

Commit 12671a5

Browse files
committed
fixes for build errors related to Swift 6.0 compatibility
1 parent 51bb453 commit 12671a5

File tree

5 files changed

+39
-10
lines changed

5 files changed

+39
-10
lines changed

HaishinKit.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
BC33A1292CDF526C0016EEA0 /* HaishinKit in Frameworks */ = {isa = PBXBuildFile; productRef = BC33A1282CDF526C0016EEA0 /* HaishinKit */; };
2424
BC33A12B2CDF526C0016EEA0 /* SRTHaishinKit in Frameworks */ = {isa = PBXBuildFile; productRef = BC33A12A2CDF526C0016EEA0 /* SRTHaishinKit */; };
2525
BC47FA352CE61FCF002900AE /* MoQTHaishinKit in Frameworks */ = {isa = PBXBuildFile; productRef = BC47FA342CE61FCF002900AE /* MoQTHaishinKit */; };
26+
BC9B74422D0F2808006CC351 /* libc++.1.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BC9B74412D0F27FA006CC351 /* libc++.1.tbd */; };
2627
/* End PBXBuildFile section */
2728

2829
/* Begin PBXContainerItemProxy section */
@@ -127,6 +128,8 @@
127128
29F39BE72335F8010055F9BB /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
128129
BC34DFD125EBB12C005F975A /* Logboard.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Logboard.xcframework; path = Carthage/Build/Logboard.xcframework; sourceTree = "<group>"; };
129130
BC7A0E3D2B088FA7005FB2F7 /* Example visionOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example visionOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
131+
BC9B74402D0F27CA006CC351 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/XROS.platform/Developer/SDKs/XROS2.1.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; };
132+
BC9B74412D0F27FA006CC351 /* libc++.1.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.1.tbd"; path = "Platforms/XROS.platform/Developer/SDKs/XROS2.1.sdk/usr/lib/libc++.1.tbd"; sourceTree = DEVELOPER_DIR; };
130133
BCA2E7F32C4B6C7E0012F2D4 /* SRTHaishinKit.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = SRTHaishinKit.podspec; sourceTree = "<group>"; };
131134
BCB798892CE06AEC0059DFE9 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
132135
BCCC45BC2AA28BDB0016EFE8 /* libsrt.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libsrt.xcframework; path = Vendor/SRT/libsrt.xcframework; sourceTree = "<group>"; };
@@ -323,6 +326,7 @@
323326
files = (
324327
BC33A1272CDF52630016EEA0 /* SRTHaishinKit in Frameworks */,
325328
BC33A1252CDF52600016EEA0 /* HaishinKit in Frameworks */,
329+
BC9B74422D0F2808006CC351 /* libc++.1.tbd in Frameworks */,
326330
);
327331
runOnlyForDeploymentPostprocessing = 0;
328332
};
@@ -342,7 +346,9 @@
342346
0ACC00B98D6DB33B5BE87B87 /* Frameworks */ = {
343347
isa = PBXGroup;
344348
children = (
349+
BC9B74412D0F27FA006CC351 /* libc++.1.tbd */,
345350
BCCC45C02AA28BF40016EFE8 /* libc++.tbd */,
351+
BC9B74402D0F27CA006CC351 /* libc++.tbd */,
346352
BCCC45BC2AA28BDB0016EFE8 /* libsrt.xcframework */,
347353
BC34DFD125EBB12C005F975A /* Logboard.xcframework */,
348354
2915EC531D85BDF100621092 /* ReplayKit.framework */,

HaishinKit/Sources/Mixer/MediaMixer.swift

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,23 @@ public final actor MediaMixer {
114114
) {
115115
self.useManualCapture = useManualCapture
116116
Task {
117-
await session.isMultiCamSessionEnabled = multiCamSessionEnabled
118-
await audioIO.isMultiTrackAudioMixingEnabled = multiCamSessionEnabled
119-
if !useManualCapture {
120-
await startRunning()
121-
}
117+
await _init(
118+
multiCamSessionEnabled: multiCamSessionEnabled,
119+
multiTrackAudioMixingEnabled: multiTrackAudioMixingEnabled,
120+
useManualCapture: useManualCapture
121+
)
122+
}
123+
}
124+
125+
private func _init(
126+
multiCamSessionEnabled: Bool,
127+
multiTrackAudioMixingEnabled: Bool,
128+
useManualCapture: Bool
129+
) async {
130+
await session.isMultiCamSessionEnabled = multiCamSessionEnabled
131+
await audioIO.isMultiTrackAudioMixingEnabled = multiTrackAudioMixingEnabled
132+
if !useManualCapture {
133+
await startRunning()
122134
}
123135
}
124136

@@ -134,7 +146,19 @@ public final actor MediaMixer {
134146
) {
135147
self.useManualCapture = useManualCapture
136148
Task {
137-
await audioIO.isMultiTrackAudioMixingEnabled = multiTrackAudioMixingEnabled
149+
await _init(
150+
multiTrackAudioMixingEnabled: multiTrackAudioMixingEnabled,
151+
useManualCapture: useManualCapture
152+
)
153+
}
154+
}
155+
156+
private func _init(
157+
multiTrackAudioMixingEnabled: Bool,
158+
useManualCapture: Bool
159+
) async {
160+
await audioIO.isMultiTrackAudioMixingEnabled = multiTrackAudioMixingEnabled
161+
if !useManualCapture {
138162
await startRunning()
139163
}
140164
}

HaishinKit/Sources/Screen/ScreenObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public final class VideoTrackScreenObject: ScreenObject, ChromaKeyProcessable {
244244
}
245245

246246
private var queue: TypedBlockQueue<CMSampleBuffer>?
247-
private var effects: [VideoEffect] = .init()
247+
private var effects: [any VideoEffect] = .init()
248248
private var frameTracker = FrameTracker()
249249

250250
/// Create a screen object.

MoQTHaishinKit/Sources/ControlMessage/MoQTVersionSpecificParameter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public enum MoQTVersionSpecificType: Int, Sendable {
77
}
88

99
/// 6.1.1. Version Specific Parameters
10-
public struct MoQTVersionSpecificParameter {
10+
public struct MoQTVersionSpecificParameter: Sendable {
1111
enum Error: Swift.Error {
1212
case missionSetupParameterType
1313
}

Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ let swiftSettings: [SwiftSetting] = [
99
]
1010
#else
1111
let swiftSettings: [SwiftSetting] = [
12-
.enableUpcomingFeature("ExistentialAny"),
13-
.enableUpcomingFeature("StrictConcurrency")
12+
.enableUpcomingFeature("ExistentialAny")
1413
]
1514
#endif
1615

0 commit comments

Comments
 (0)