We have very simple Objective-C code that uses AVFoundation to capture sample buffers from camera in real-time. Captured buffers are delivered using AVCaptureVideoDataOutputSampleBufferDelegate and converted to Core Image buffers (CIImage). Requirement is to add code that converts CIImage to Metal Texture and draws the texture to screen by adding a subview to our main UIView.
* Code must use CIContext method
to render CIImage to texture
* Code must compile on Xcode 10.3 without any warnings
* Code must be implemented using Objective-C
* Code must work on iOS 9 and later (on devices with Metal support)
* Code must not produce any warnings or errors when Metal API validation is enabled
* Code must not perform any unnecessary data copies or add internal buffering of frames before displaying
Please find attached Xcode project zip-file to start with.