mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 14:28:38 +00:00
chore: sync pending changes
This commit is contained in:
@@ -68,9 +68,13 @@ final class ScreenRecordService: @unchecked Sendable {
|
||||
try? FileManager.default.removeItem(at: outURL)
|
||||
|
||||
let state = CaptureState()
|
||||
let recordQueue = DispatchQueue(label: "com.steipete.clawdis.screenrecord")
|
||||
|
||||
try await withCheckedThrowingContinuation { (cont: CheckedContinuation<Void, Error>) in
|
||||
let handler: @Sendable (CMSampleBuffer, RPSampleBufferType, Error?) -> Void = { sample, type, error in
|
||||
// ReplayKit can call the capture handler on a background queue.
|
||||
// Serialize writes to avoid queue asserts.
|
||||
recordQueue.async {
|
||||
if let error {
|
||||
state.withLock { state in
|
||||
if state.handlerError == nil { state.handlerError = error }
|
||||
@@ -178,6 +182,7 @@ final class ScreenRecordService: @unchecked Sendable {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let completion: @Sendable (Error?) -> Void = { error in
|
||||
if let error { cont.resume(throwing: error) } else { cont.resume() }
|
||||
|
||||
Reference in New Issue
Block a user