mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
27 lines
662 B
Swift
27 lines
662 B
Swift
import Accelerate
|
|
import AVFoundation
|
|
import CoreMedia
|
|
|
|
package extension CMSampleBuffer {
|
|
@inlinable @inline(__always) var isNotSync: Bool {
|
|
get {
|
|
guard !sampleAttachments.isEmpty else {
|
|
return false
|
|
}
|
|
return sampleAttachments[0][.notSync] != nil
|
|
}
|
|
set {
|
|
guard !sampleAttachments.isEmpty else {
|
|
return
|
|
}
|
|
sampleAttachments[0][.notSync] = newValue ? 1 : nil
|
|
}
|
|
}
|
|
}
|
|
|
|
#if hasAttribute(retroactive)
|
|
extension CMSampleBuffer: @retroactive @unchecked Sendable {}
|
|
#else
|
|
extension CMSampleBuffer: @unchecked Sendable {}
|
|
#endif
|