8 #ifndef META_OCEAN_CV_FRAME_PROVIDER_INTERFACE_H
9 #define META_OCEAN_CV_FRAME_PROVIDER_INTERFACE_H
24 class FrameProviderInterface;
This class defines an abstract interface allowing to request frames from any kind of frame provider.
Definition: FrameProviderInterface.h:38
FrameProviderInterface & operator=(const FrameProviderInterface &frameProviderInterface)=delete
Disabled copy constructor.
virtual bool isInitialized()=0
Returns whether the internal information of this interface has been initialized already and whether r...
virtual ~FrameProviderInterface()
Releases the interface.
void registerFrameTypeCallback(const FrameTypeCallback &callback)
Registers a new callback function for asynchronous frame type requests.
void unregisterFrameTypeCallback(const FrameTypeCallback &callback)
Unregisters an already registered callback function for frame type requests.
void registerFrameNumberCallback(const FrameNumberCallback &callback)
Registers a new callback function for asynchronous frame number requests.
FrameCallbacks frameCallbacks_
A list of frame request callbacks.
Definition: FrameProviderInterface.h:255
ConcurrentCallbacks< FrameCallback > FrameCallbacks
Definition of a list that stores frame request callbacks.
Definition: FrameProviderInterface.h:64
Callback< void, FrameRef, const unsigned int > FrameCallback
Definition of a frame request callback function.
Definition: FrameProviderInterface.h:47
FrameProviderInterface(const FrameProviderInterface &frameProviderInterface)=delete
Disabled copy constructor.
ConcurrentCallbacks< FrameTypeCallback > FrameTypeCallbacks
Definition of a list that stores frame type request callbacks.
Definition: FrameProviderInterface.h:74
Callback< void, unsigned int > FrameNumberCallback
Definition of a frame number request callback function.
Definition: FrameProviderInterface.h:52
virtual bool setPreferredFrameType(const FrameType::PixelFormat pixelFormat, const FrameType::PixelOrigin pixelOrigin)=0
Sets a preferred frame type pixel format and pixel origin for this interface.
virtual unsigned int synchronFrameNumberRequest(const double timeout=10.0, bool *abort=nullptr)=0
Invokes a synchronous frame number request.
void registerFrameCallback(const FrameCallback &callback)
Registers a new callback function for asynchronous frame requests.
virtual FrameType synchronFrameTypeRequest(const double timeout=10.0, bool *abort=nullptr)=0
Invokes a synchronous frame type request.
Callback< void, const FrameType & > FrameTypeCallback
Definition of a frame type request callback function.
Definition: FrameProviderInterface.h:57
FrameTypeCallbacks frameTypeCallbacks_
A list of frame type request callbacks.
Definition: FrameProviderInterface.h:261
virtual bool synchronInitializationRequest(const double timeout=120.0, bool *abort=nullptr)
Waits until this interface has been initialized.
FrameNumberCallbacks frameNumberCallbacks_
A list of frame number request callbacks.
Definition: FrameProviderInterface.h:258
void unregisterFrameCallback(const FrameCallback &callback)
Unregisters an already registered callback function for frame requests.
void unregisterFrameNumberCallback(const FrameNumberCallback &callback)
Unregisters an already registered callback function for frame number requests.
virtual void asynchronFrameRequest(const unsigned int index, const bool priority=false)=0
Invokes an asynchronous frame request.
ConcurrentCallbacks< FrameNumberCallback > FrameNumberCallbacks
Definition of a list that stores frame number request callbacks.
Definition: FrameProviderInterface.h:69
FrameProviderInterface()=default
Protected default constructor.
virtual void asynchronFrameTypeRequest()=0
Invokes an asynchronous frame type request.
virtual void frameCacheRequest(const unsigned int index, const int range)
Invokes a suggestion to pre-load or to cache some frames that might be requested soon.
virtual void asynchronFrameNumberRequest()=0
Invokes an asynchronous frame number request.
virtual void release()
Releases all associated resources.
virtual FrameRef synchronFrameRequest(const unsigned int index, const double timeout=10.0, bool *abort=nullptr)=0
Invokes a synchronous frame request.
This class implements a container for callback functions.
Definition: Callback.h:3456
Definition of a frame type composed by the frame dimension, pixel format and pixel origin.
Definition: Frame.h:30
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition: Frame.h:183
PixelOrigin
Defines different types of frame origin positions.
Definition: Frame.h:1046
ObjectRef< FrameProviderInterface > FrameProviderInterfaceRef
Definition of an object reference holding a frame provider interface.
Definition: FrameProviderInterface.h:24
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15