We need 3 seperate operational classes:
Grabber acts like ofVideoGrabber (has all usual getters, inherits lots of things, can be drawn to screen, etc)
EventGrabber gives purely frame callbacks (no texture, no getpixels, etc). Gives event calls when frame arrives from capture thread.
BlockingGrabber is for 'wintin thread' operation (whenever you ask for frame, it blocks until new frame is ready)
Then seperately we have the Device interface which is implemented for each camera API.
Then we have DeviceControl interface which includes things like:
Device inherits interface DeviceControl.
For user at runtime:
Grabber implements DeviceControl
EventGrabber gives a DeviceControl on every callback
BlockingGrabber implements DeviceControl
The user then uses syntax like:
Grabber grabber(new ofxXimea(deviceID));
or perhaps
Grabber grabber;
grabber.init<ofxXimea>(deviceID); ///< this calls an inline templated function
We need 3 seperate operational classes:
Grabberacts like ofVideoGrabber (has all usual getters, inherits lots of things, can be drawn to screen, etc)EventGrabbergives purely frame callbacks (no texture, no getpixels, etc). Gives event calls when frame arrives from capture thread.BlockingGrabberis for 'wintin thread' operation (whenever you ask for frame, it blocks until new frame is ready)Then seperately we have the
Deviceinterface which is implemented for each camera API.Then we have
DeviceControlinterface which includes things like:Deviceinherits interfaceDeviceControl.For user at runtime:
GrabberimplementsDeviceControlEventGrabbergives aDeviceControlon every callbackBlockingGrabberimplementsDeviceControlThe user then uses syntax like:
or perhaps
Grabber grabber; grabber.init<ofxXimea>(deviceID); ///< this calls an inline templated function