Adding focus / exposure / whiteBalance / torch to iOS Video Grabber

Hi, given I got no feedback here ( I started implementing the necessary changes to implement those features.

Now, the native grabber is wrapped under several layers inside ofVideoGrabber.
My approach is to expose it (right now it’s unreachable) through a couple of getter methods, one to be added at and the other at, and then you can get a hold of it:

//getting myself a pointer to the real device grabber  
ofPtr<ofBaseVideoGrabber> grabberP = grabber.getGrabber();  
ofiPhoneVideoGrabber * iGrabber = (ofiPhoneVideoGrabber *)grabberP.get();  
AVFoundationVideoGrabber * avGrabber = iGrabber->getAvGrabber();  
iPhoneVideoGrabber * deviceGrabber = avGrabber->getGrabber(); //finally reach native grabber  

and then the user can call methods onto it (at iPhoneVideoGrabber* level, which is Obj-C):

// focus  
-(bool)lockFocus; //at curent focus  
-(bool)touchFocusAt:(CGPoint)focusPoint; // (0,0) bottom left, (1,1) top right, calls focusOnce  
// Exposure  
-(bool)touchExposeAt:(CGPoint)autoExposeHere; // (0,0) bottom left, (1,1) top right, calls autoExposreOnce  
// Torch  
-(float)currentTorchLevel; // [0..1]  
-(bool)setAutoTorch; //adjust torch intensity depending on scene darkness   
//white balance  

But maybe they should all be exposed at ofiPhoneVideoGrabber level… I’m just not a big fan of unnecessary wrapping. What do you think?

You can see what’s been done so far here:

I also extended the iosVideoGrabber example to show all the features:

hey Oriol,
all this looks good.
give me some time to look over it properly and i’ll add it to the OF develop branch.
thx for your work.

also opened up an issue on github for this.

Has this been implemented in any other project? I would love to use auto-focus functionality on ios in my project!