Ocean
|
This class implements a frame provider interface specialization using a movie frame provider object. More...
Public Member Functions | |
MovieFrameProviderInterface (const MovieFrameProviderRef &movieFrameProvider) | |
Creates a new media frame provider interface. More... | |
~MovieFrameProviderInterface () override | |
Destructs this frame provider interface. More... | |
bool | isInitialized () override |
Returns whether the internal information of this interface has been initialized already and whether request functions can be handled. More... | |
bool | setPreferredFrameType (const FrameType::PixelFormat pixelFormat, const FrameType::PixelOrigin pixelOrigin) override |
Sets a preferred frame type pixel format and pixel origin for this interface. More... | |
void | asynchronFrameRequest (const unsigned int index, const bool priority) override |
Invokes an asynchronous frame request. More... | |
FrameRef | synchronFrameRequest (const unsigned int index, const double timeout, bool *abort=nullptr) override |
Invokes a synchronous frame request. More... | |
void | frameCacheRequest (const unsigned int index, const int range) override |
Invokes a suggestion to pre-load or to cache some frames that might be requested soon. More... | |
void | asynchronFrameNumberRequest () override |
Invokes an asynchronous frame number request. More... | |
unsigned int | synchronFrameNumberRequest (const double timeout, bool *abort=nullptr) override |
Invokes a synchronous frame number request. More... | |
void | asynchronFrameTypeRequest () override |
Invokes an asynchronous frame type request. More... | |
FrameType | synchronFrameTypeRequest (const double timeout, bool *abort=nullptr) override |
Invokes a synchronous frame type request. More... | |
void | release () override |
Releases all associated resources. More... | |
Public Member Functions inherited from Ocean::CV::FrameProviderInterface | |
virtual bool | synchronInitializationRequest (const double timeout=120.0, bool *abort=nullptr) |
Waits until this interface has been initialized. More... | |
void | registerFrameCallback (const FrameCallback &callback) |
Registers a new callback function for asynchronous frame requests. More... | |
void | unregisterFrameCallback (const FrameCallback &callback) |
Unregisters an already registered callback function for frame requests. More... | |
void | registerFrameNumberCallback (const FrameNumberCallback &callback) |
Registers a new callback function for asynchronous frame number requests. More... | |
void | unregisterFrameNumberCallback (const FrameNumberCallback &callback) |
Unregisters an already registered callback function for frame number requests. More... | |
void | registerFrameTypeCallback (const FrameTypeCallback &callback) |
Registers a new callback function for asynchronous frame type requests. More... | |
void | unregisterFrameTypeCallback (const FrameTypeCallback &callback) |
Unregisters an already registered callback function for frame type requests. More... | |
Private Types | |
typedef std::pair< unsigned int, FrameRef > | FramePair |
Definition of pair combining a frame index with a frame reference. More... | |
typedef std::queue< FramePair > | FrameQueue |
Definition of a queue storing frame pairs. More... | |
Private Member Functions | |
void | onScheduler () |
Scheduler event function. More... | |
void | onFrame (const unsigned int frameIndex, const bool frameRequested) |
Internal callback function for frame requests arriving from the internal media frame provider. More... | |
Private Attributes | |
MovieFrameProviderRef | movieFrameProvider_ |
The movie frame provider that provides the individual frames for this interface. More... | |
FrameQueue | frameQueue_ |
Frame queue for asynchronous frame requests. More... | |
bool | asynchronousFrameNumber_ = false |
True, if an asynchronous frame number request has been invoked. More... | |
bool | asynchronousFrameType_ = false |
True, if an asynchronous frame type request has been invoked. More... | |
Lock | lock_ |
Interface lock. More... | |
Additional Inherited Members | |
Public Types inherited from Ocean::CV::FrameProviderInterface | |
typedef Callback< void, FrameRef, const unsigned int > | FrameCallback |
Definition of a frame request callback function. More... | |
typedef Callback< void, unsigned int > | FrameNumberCallback |
Definition of a frame number request callback function. More... | |
typedef Callback< void, const FrameType & > | FrameTypeCallback |
Definition of a frame type request callback function. More... | |
Protected Types inherited from Ocean::CV::FrameProviderInterface | |
typedef ConcurrentCallbacks< FrameCallback > | FrameCallbacks |
Definition of a list that stores frame request callbacks. More... | |
typedef ConcurrentCallbacks< FrameNumberCallback > | FrameNumberCallbacks |
Definition of a list that stores frame number request callbacks. More... | |
typedef ConcurrentCallbacks< FrameTypeCallback > | FrameTypeCallbacks |
Definition of a list that stores frame type request callbacks. More... | |
Protected Member Functions inherited from Ocean::CV::FrameProviderInterface | |
FrameProviderInterface ()=default | |
Protected default constructor. More... | |
FrameProviderInterface (const FrameProviderInterface &frameProviderInterface)=delete | |
Disabled copy constructor. More... | |
virtual | ~FrameProviderInterface () |
Releases the interface. More... | |
FrameProviderInterface & | operator= (const FrameProviderInterface &frameProviderInterface)=delete |
Disabled copy constructor. More... | |
Protected Attributes inherited from Ocean::CV::FrameProviderInterface | |
FrameCallbacks | frameCallbacks_ |
A list of frame request callbacks. More... | |
FrameNumberCallbacks | frameNumberCallbacks_ |
A list of frame number request callbacks. More... | |
FrameTypeCallbacks | frameTypeCallbacks_ |
A list of frame type request callbacks. More... | |
This class implements a frame provider interface specialization using a movie frame provider object.
Actually, this function is nothing else but a wrapper for a MovieFrameProvider object.
We should investigate whether we really need an own MovideFrameProvider class anymore.
However, the MovieFrameProvider is able to deliver preview images, which is not part of this interface.
|
private |
Definition of pair combining a frame index with a frame reference.
|
private |
Definition of a queue storing frame pairs.
Ocean::Media::MovieFrameProviderInterface::MovieFrameProviderInterface | ( | const MovieFrameProviderRef & | movieFrameProvider | ) |
Creates a new media frame provider interface.
movieFrameProvider | Movie frame provider object that is connected with this interface and that provides the individual frames |
|
override |
Destructs this frame provider interface.
|
overridevirtual |
Invokes an asynchronous frame number request.
Implements Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Invokes an asynchronous frame request.
Implements Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Invokes an asynchronous frame type request.
Implements Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Invokes a suggestion to pre-load or to cache some frames that might be requested soon.
Reimplemented from Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Returns whether the internal information of this interface has been initialized already and whether request functions can be handled.
Implements Ocean::CV::FrameProviderInterface.
|
private |
Internal callback function for frame requests arriving from the internal media frame provider.
frameIndex | Index of the frame that recently has been encoded by the media frame provider |
frameRequested | True, if the frame has been requested, false if the frame just has been encoded without explicit request |
|
private |
Scheduler event function.
|
overridevirtual |
Releases all associated resources.
Reimplemented from Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Sets a preferred frame type pixel format and pixel origin for this interface.
Implements Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Invokes a synchronous frame number request.
Implements Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Invokes a synchronous frame request.
Implements Ocean::CV::FrameProviderInterface.
|
overridevirtual |
Invokes a synchronous frame type request.
Implements Ocean::CV::FrameProviderInterface.
|
private |
True, if an asynchronous frame number request has been invoked.
|
private |
True, if an asynchronous frame type request has been invoked.
|
private |
Frame queue for asynchronous frame requests.
|
private |
Interface lock.
|
private |
The movie frame provider that provides the individual frames for this interface.