Posts

Post not yet marked as solved
0 Replies
300 Views
why I can`t read the file in FileHandle? Mac OS 11 swift 5 file = try FileHandle(forReadingFrom: url)         fileQueue = DispatchQueue(label: "model.source.opt.\(url.lastPathComponent)")         var jsonData = Data()         fileQueue.sync {             if let lenthData = try? self.file.read(upToCount: 8) {                 var lenth = UInt64(lenthData[0])                 for i in 1 ..< lenthData.count {                     lenth = lenth & (UInt64(lenthData[i] << (8 * i)))                 }                 print(lenth)/*print the 0*/                 self.file.waitForDataInBackgroundAndNotify()                 if let j = try? self.file.read(upToCount: Int(lenth)) {                     jsonData = j                 }                 print(jsonData)/*print the 0 bytes*/                 self.firstFrameOffset = try! self.file.offset()             }         }
Posted
by dacheng.
Last updated
.
Post not yet marked as solved
0 Replies
276 Views
Under what condition is kCVPixelFormatTypeDepthFloat32 and kCVPixelFormatTypeDisparityFloat32 supported?
Posted
by dacheng.
Last updated
.