【发布时间】:2020-02-02 19:17:17
【问题描述】:
我正在使用 .frameProcessor 处理 PHLivePhoto 以修改每一帧。这些帧似乎是按顺序处理的,这很慢。我可以让 PHLivePhotoEditingContext.frameProcessor 使用多个内核吗?
func processLivePhoto(input: PHContentEditingInput) {
guard let context = PHLivePhotoEditingContext(livePhotoEditingInput: input)
else { fatalError("not a Live Photo editing input") }
context.frameProcessor = { frame, _ in
let renderedFrame = expensiveOperation(using: frame.image)
return renderedFrame
}
// ...logic for saving
}
【问题讨论】:
标签: swift core-image phlivephoto