i build camera app from this guide : https://developer.dji.com/mobile-sdk/documentation/ios-tutorials/index.html and write averything in swift . Can someone help to convert this to swift ?
-(void)videoFeed:(DJIVideoFeed *)videoFeed didUpdateVideoData:(NSData *)videoData {
[[DJIVideoPreviewer instance] push:(uint8_t *)videoData.bytes length:(int)videoData.length];
}
when i convert this to swift like this :
func videoFeed(_ videoFeed: DJIVideoFeed, didUpdateVideoData videoData: Data) {
DJIVideoPreviewer.instance().push(UInt8(videoData?.bytes ?? 0), length: (videoData?.count ?? 0))
}
i got errors:
Cannot convert value of type 'UInt8' to expected argument type 'UnsafeMutablePointer?' Cannot convert value of type 'UnsafeRawPointer' to expected argument type 'Int?'
Please help.