I am trying to monitor a stream of video output from a FireWire camera. I have created an Interface Builder interface with buttons and an NSImageView
. While image monitoring is occurring within an endless loop, I want to:
- change some camera parameters on the fly (gain, gamma, etc.)
- tell the monitoring to stop so I can save an image to a file (set a flag that stops the while loop)
Using the button features, I have been unable to loop the video frame monitor, while still looking for a button press (much like using the keypressed feature from C.) Two options present themselves:
- Initiate a new run loop (for which I cannot get an autoreleasepool to function ...)
- Initiate an
NSOperation
- how do I do this in a way which allows me to connect with an Xcode button push?
The documentation is very obtuse about the creation of such objects. If I create an NSOperation
as per the examples I've found, there seems to be no way to communicate with it with an object from Interface Builder. When I create an NSRunLoop
, I get an object leak error, and I can find no example of how to create an autoreleasepool that actually responds to the RunLoop I've created. Nevermind that I haven't even attempted to choose which objects get sampled by the secondary run loop ...
Because Objective C is (obviously!) not my native tongue, I am looking for solutions with baby steps, sorry to say ... Thanks in advance