Skip to content

Instantly share code, notes, and snippets.

@jknthn
Created July 19, 2018 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jknthn/cc670fca4b79546e29764440a2ea8a45 to your computer and use it in GitHub Desktop.
Save jknthn/cc670fca4b79546e29764440a2ea8a45 to your computer and use it in GitHub Desktop.
extension MapViewController: DJIVideoFeedListener {
func videoFeed(_ videoFeed: DJIVideoFeed, didUpdateVideoData videoData: Data) {
let data = NSData(data: videoData)
var video = videoData
video.withUnsafeMutableBytes { (pointer: UnsafeMutablePointer<UInt8>) in
VideoPreviewer.instance().push(pointer, length: Int32(data.length))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment