I have a helper method I use to set up video inputs and outputs. Within the helper method I need to set the delegate, but would prefer to have the delegate method in the calling class. My current line of code is:
[captureOutput setSampleBufferDelegate:self queue:queue];
How would I specify the calling class MyAVViewController as the delegate?
Thanks!
You need to have an instance of your MyAVViewController, which you can pass in as the delegate:
You’ll have to pass your avViewController as a parameter to your helper method to achieve this:
Make sure that your avViewController (or whatever you choose to pass in) conforms to the AVCaptureVideoDataOutputSampleBufferDelegate protocol.