|
Ocean
|
This class implements a frame provider interface specialization using a movie frame provider object. More...
#include <MovieFrameProviderInterface.h>
Public Member Functions | |
| MovieFrameProviderInterface (const MovieFrameProviderRef &movieFrameProvider) | |
| Creates a new media frame provider interface. | |
| ~MovieFrameProviderInterface () override | |
| Destructs this frame provider interface. | |
| bool | isInitialized () override |
| Returns whether the internal information of this interface has been initialized already and whether request functions can be handled. | |
| bool | setPreferredFrameType (const FrameType::PixelFormat pixelFormat, const FrameType::PixelOrigin pixelOrigin) override |
| Sets a preferred frame type pixel format and pixel origin for this interface. | |
| void | asynchronFrameRequest (const unsigned int index, const bool priority) override |
| Invokes an asynchronous frame request. | |
| FrameRef | synchronFrameRequest (const unsigned int index, const double timeout, bool *abort=nullptr) override |
| Invokes a synchronous frame request. | |
| 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. | |
| void | asynchronFrameNumberRequest () override |
| Invokes an asynchronous frame number request. | |
| unsigned int | synchronFrameNumberRequest (const double timeout, bool *abort=nullptr) override |
| Invokes a synchronous frame number request. | |
| void | asynchronFrameTypeRequest () override |
| Invokes an asynchronous frame type request. | |
| FrameType | synchronFrameTypeRequest (const double timeout, bool *abort=nullptr) override |
| Invokes a synchronous frame type request. | |
| void | release () override |
| Releases all associated resources. | |
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. | |
| void | registerFrameCallback (const FrameCallback &callback) |
| Registers a new callback function for asynchronous frame requests. | |
| void | unregisterFrameCallback (const FrameCallback &callback) |
| Unregisters an already registered callback function for frame requests. | |
| void | registerFrameNumberCallback (const FrameNumberCallback &callback) |
| Registers a new callback function for asynchronous frame number requests. | |
| void | unregisterFrameNumberCallback (const FrameNumberCallback &callback) |
| Unregisters an already registered callback function for frame number requests. | |
| 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. | |
Private Types | |
| using | FramePair = std::pair< unsigned int, FrameRef > |
| Definition of pair combining a frame index with a frame reference. | |
| using | FrameQueue = std::queue< FramePair > |
| Definition of a queue storing frame pairs. | |
Private Member Functions | |
| void | onScheduler () |
| Scheduler event function. | |
| void | onFrame (const unsigned int frameIndex, const bool frameRequested) |
| Internal callback function for frame requests arriving from the internal media frame provider. | |
Private Attributes | |
| MovieFrameProviderRef | movieFrameProvider_ |
| The movie frame provider that provides the individual frames for this interface. | |
| FrameQueue | frameQueue_ |
| Frame queue for asynchronous frame requests. | |
| bool | asynchronousFrameNumber_ = false |
| True, if an asynchronous frame number request has been invoked. | |
| bool | asynchronousFrameType_ = false |
| True, if an asynchronous frame type request has been invoked. | |
| Lock | lock_ |
| Interface lock. | |
Additional Inherited Members | |
Public Types inherited from Ocean::CV::FrameProviderInterface | |
| using | FrameCallback = Callback< void, FrameRef, const unsigned int > |
| Definition of a frame request callback function. | |
| using | FrameNumberCallback = Callback< void, unsigned int > |
| Definition of a frame number request callback function. | |
| using | FrameTypeCallback = Callback< void, const FrameType & > |
| Definition of a frame type request callback function. | |
Protected Types inherited from Ocean::CV::FrameProviderInterface | |
| using | FrameCallbacks = ConcurrentCallbacks< FrameCallback > |
| Definition of a list that stores frame request callbacks. | |
| using | FrameNumberCallbacks = ConcurrentCallbacks< FrameNumberCallback > |
| Definition of a list that stores frame number request callbacks. | |
| using | FrameTypeCallbacks = ConcurrentCallbacks< FrameTypeCallback > |
| Definition of a list that stores frame type request callbacks. | |
Protected Member Functions inherited from Ocean::CV::FrameProviderInterface | |
| FrameProviderInterface ()=default | |
| Protected default constructor. | |
| FrameProviderInterface (const FrameProviderInterface &frameProviderInterface)=delete | |
| Disabled copy constructor. | |
| virtual | ~FrameProviderInterface () |
| Releases the interface. | |
| FrameProviderInterface & | operator= (const FrameProviderInterface &frameProviderInterface)=delete |
| Disabled copy constructor. | |
Protected Attributes inherited from Ocean::CV::FrameProviderInterface | |
| FrameCallbacks | frameCallbacks_ |
| A list of frame request callbacks. | |
| FrameNumberCallbacks | frameNumberCallbacks_ |
| A list of frame number request callbacks. | |
| FrameTypeCallbacks | frameTypeCallbacks_ |
| A list of frame type request callbacks. | |
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.