gpt4 book ai didi

ios - 无法调用类型 'UnsafeMutablePointer' ' with an argument list of type '(UnsafeMuatableRawpointer?)的初始值设定项'

转载 作者:搜寻专家 更新时间:2023-11-01 06:37:41 25 4
gpt4 key购买 nike

<分区>

我正在尝试将我的项目更新到 swift 3.0,但我在 UnsafeMutablePointer 中遇到了问题。

这是我的错误

Cannot invoke initializer for type 'UnsafeMutablePointer<uint8>' with an argument list of type '(UnsafeMuatableRawpointer?)'

代码:

let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer)
let src_buff = CVPixelBufferGetBaseAddress(imageBuffer!)
let dataBuffer = UnsafeMutablePointer<UInt8>(src_buff) //error here

为什么?如何解决?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com