was causing the writer to fail unexpectedly after writing the first frame. By using a PixelBufferPool the writer runs without issue.
func append(pixel buffer:CVPixelBuffer, with time: CMTime) {
var appendSucceeded = false
autoreleasepool {
if let _ = pixelBufferInput.pixelBufferPool {
appendSucceeded = pixelBufferInput.append(
buffer,
withPresentationTime: time
)
}
}
logAR.message("append to pixel buffer: \(appendSucceeded)")
}
after resolving buffer pool, pixel format started causing writer to fail, so updated sourcePixelBufferAttributes to:
let attributes : [String:Any] = [
kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_32ARGB),
kCVPixelBufferCGImageCompatibilityKey as String : true,
kCVPixelBufferCGBitmapContextCompatibilityKey as String : true
]
Other:
Latest version of Xcode was throwing errors and warning for renamed enums, types, etc. Resolved all errors and warnings. Builds for iOS 12 (hopefully this resolves #92)
Appending directly to
AVAssetWriterInputPixelBufferAdaptor
using:was causing the writer to fail unexpectedly after writing the first frame. By using a PixelBufferPool the writer runs without issue.
after resolving buffer pool, pixel format started causing writer to fail, so updated
sourcePixelBufferAttributes
to:Other: Latest version of Xcode was throwing errors and warning for renamed enums, types, etc. Resolved all errors and warnings. Builds for iOS 12 (hopefully this resolves #92)