Skip to content

Antoine/swift6#11

Merged
muukii merged 7 commits into
mainfrom
antoine/swift6
Jun 30, 2025
Merged

Antoine/swift6#11
muukii merged 7 commits into
mainfrom
antoine/swift6

Conversation

@ntnmrndn

Copy link
Copy Markdown
Collaborator

No description provided.

@@ -400,7 +400,6 @@
4B2D586A25346C730080E958 /* Frameworks */,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically just apply recommended changes and swift 6

import AVFoundation
import Foundation

public actor CaptureBody {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's illegal to perform start/stop running in between session configurations. Session is also non sendable. Ensure all access is done sequentially.
It also should happen in background (previously could be performed on main thread).
Technically it can still hop on different threads, which could be an issue ?

import Foundation
import os

public final class EventBusCancellable: Hashable {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any potential for concurrency issue here

}
}

/// [non-atomic]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure all array operations are non concurrent, which could be an issue with the previous design.

}

public func setUp(sessionInConfiguring: AVCaptureSession) {
// Are those actually thread safe ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: no particular mention in the documentation.

Comment thread Podfile

pod 'MondrianLayout'
pod 'Reveal-SDK'
# pod 'Reveal-SDK'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks unused, and was causing issue (I think due to new Xcode settings around sandboxing).

Comment thread Capturer/Basic/CaptureBody.swift Outdated
Comment on lines +47 to +51
private lazy var session: AVCaptureSession = {
backgroundExecutionQueue.sync {
.init()
}
}()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be let, not lazy?

import Foundation
import AVFoundation

public protocol OutputNodeType: AnyObject {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it should be keep because AnyObject means this protocol requires as reference type. what do you think?
@ntnmrndn

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. No issue leaving it, I reverted it

@muukii muukii left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's go

@muukii muukii merged commit 3648af9 into main Jun 30, 2025
1 check failed
@muukii muukii deleted the antoine/swift6 branch June 30, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants