I understand this is an old question, but ...
[dataOutput setSampleBufferDelegate:self queue:dispatch_get_main_queue()]
this line calls your video in the main stream (UI).
If you change it to something like:
[dataOutput setSampleBufferDelegate:self queue:dispatch_queue_create("cQ", DISPATCH_QUEUE_SERIAL)];
Then in your callback, if you need to update your interface, you should do:
dispatch_async(dispatch_get_main_queue(), ^{ [coreImageContext drawImage:image atPoint:CGPointZero fromRect:[image extent] ]; [self.context presentRenderbuffer:GL_RENDERBUFFER]; });
This will help a lot since computationally expensive things will run in the background thread, and drawing the image will not affect the capture.
Side note:
Blindly, using sample code that you find on the Internet without reading about how the technology works is not a good way to develop applications (many of them are guilty of this)
source share