Ocean
Ocean::Media::ImageSequenceFrameProviderInterface Class Reference

This class implements a frame provider interface specialization using an image sequence medium object. More...

Inheritance diagram for Ocean::Media::ImageSequenceFrameProviderInterface:

Public Member Functions

 ImageSequenceFrameProviderInterface (const ImageSequenceRef &imageSequence)
 Creates a new image sequence provider interface. More...
 
 ~ImageSequenceFrameProviderInterface () override
 Destructs this image sequence provider and waits until all asynchronous requests have been processed. 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=false) override
 Invokes an asynchronous frame request. More...
 
FrameRef synchronFrameRequest (const unsigned int index, const double timeout=10.0, bool *abort=nullptr) override
 Invokes a synchronous frame request. More...
 
void asynchronFrameNumberRequest () override
 Invokes an asynchronous frame number request. More...
 
unsigned int synchronFrameNumberRequest (const double timeout=10.0, 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=10.0, bool *abort=nullptr) override
 Invokes a synchronous frame type request. 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...
 
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. 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...
 
virtual void release ()
 Releases all associated resources. More...
 

Protected Member Functions

void handleAsynchronFrameRequest (const unsigned int index)
 Internal function to handle asynchronous frame requests. More...
 
void handleAsynchronFrameNumberRequest ()
 Internal function to handle asynchronous frame number requests. More...
 
void handleAsynchronFrameTypeRequest ()
 Internal function to handle asynchronous frame type requests. 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...
 
FrameProviderInterfaceoperator= (const FrameProviderInterface &frameProviderInterface)=delete
 Disabled copy constructor. More...
 

Protected Attributes

ImageSequenceRef imageSequence_
 Image sequence used as frame source. More...
 
unsigned int pendingAsynchronousRequests_ = 0u
 The number of pending asynchronous requests. More...
 
FrameType::PixelFormat preferredPixelFormat_ = FrameType::FORMAT_UNDEFINED
 The preferred pixel format of the resulting images, if any. More...
 
FrameType::PixelOrigin preferredPixelOrigin_ = FrameType::ORIGIN_INVALID
 The preferred pixel origin of the resulting images, if any. More...
 
Lock lock_
 Interface lock. 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...
 

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< FrameCallbackFrameCallbacks
 Definition of a list that stores frame request callbacks. More...
 
typedef ConcurrentCallbacks< FrameNumberCallbackFrameNumberCallbacks
 Definition of a list that stores frame number request callbacks. More...
 
typedef ConcurrentCallbacks< FrameTypeCallbackFrameTypeCallbacks
 Definition of a list that stores frame type request callbacks. More...
 

Detailed Description

This class implements a frame provider interface specialization using an image sequence medium object.

See also
MovieFrameProviderInterface.

Constructor & Destructor Documentation

◆ ImageSequenceFrameProviderInterface()

Ocean::Media::ImageSequenceFrameProviderInterface::ImageSequenceFrameProviderInterface ( const ImageSequenceRef imageSequence)

Creates a new image sequence provider interface.

Parameters
imageSequenceImage seqeunce that is used as frame source

◆ ~ImageSequenceFrameProviderInterface()

Ocean::Media::ImageSequenceFrameProviderInterface::~ImageSequenceFrameProviderInterface ( )
override

Destructs this image sequence provider and waits until all asynchronous requests have been processed.

Member Function Documentation

◆ asynchronFrameNumberRequest()

void Ocean::Media::ImageSequenceFrameProviderInterface::asynchronFrameNumberRequest ( )
overridevirtual

Invokes an asynchronous frame number request.

See also
CV::FrameProviderInterface::asynchronFrameNumberRequest().

Implements Ocean::CV::FrameProviderInterface.

◆ asynchronFrameRequest()

void Ocean::Media::ImageSequenceFrameProviderInterface::asynchronFrameRequest ( const unsigned int  index,
const bool  priority = false 
)
overridevirtual

Invokes an asynchronous frame request.

See also
CV::FrameProviderInterface::asynchronFrameRequest().

Implements Ocean::CV::FrameProviderInterface.

◆ asynchronFrameTypeRequest()

void Ocean::Media::ImageSequenceFrameProviderInterface::asynchronFrameTypeRequest ( )
overridevirtual

Invokes an asynchronous frame type request.

See also
CV::FrameProviderInterface::asynchronFrameTypeRequest().

Implements Ocean::CV::FrameProviderInterface.

◆ handleAsynchronFrameNumberRequest()

void Ocean::Media::ImageSequenceFrameProviderInterface::handleAsynchronFrameNumberRequest ( )
protected

Internal function to handle asynchronous frame number requests.

◆ handleAsynchronFrameRequest()

void Ocean::Media::ImageSequenceFrameProviderInterface::handleAsynchronFrameRequest ( const unsigned int  index)
protected

Internal function to handle asynchronous frame requests.

Parameters
indexThe index of the frame that has been requested

◆ handleAsynchronFrameTypeRequest()

void Ocean::Media::ImageSequenceFrameProviderInterface::handleAsynchronFrameTypeRequest ( )
protected

Internal function to handle asynchronous frame type requests.

◆ isInitialized()

bool Ocean::Media::ImageSequenceFrameProviderInterface::isInitialized ( )
overridevirtual

Returns whether the internal information of this interface has been initialized already and whether request functions can be handled.

See also
CV::FrameProviderInterface::isInitialized().

Implements Ocean::CV::FrameProviderInterface.

◆ setPreferredFrameType()

bool Ocean::Media::ImageSequenceFrameProviderInterface::setPreferredFrameType ( const FrameType::PixelFormat  pixelFormat,
const FrameType::PixelOrigin  pixelOrigin 
)
overridevirtual

Sets a preferred frame type pixel format and pixel origin for this interface.

See also
CV::FrameProviderInterface::setPreferredFrameType().

Implements Ocean::CV::FrameProviderInterface.

◆ synchronFrameNumberRequest()

unsigned int Ocean::Media::ImageSequenceFrameProviderInterface::synchronFrameNumberRequest ( const double  timeout = 10.0,
bool *  abort = nullptr 
)
overridevirtual

Invokes a synchronous frame number request.

See also
CV::FrameProviderInterface::synchronFrameNumberRequest().

Implements Ocean::CV::FrameProviderInterface.

◆ synchronFrameRequest()

FrameRef Ocean::Media::ImageSequenceFrameProviderInterface::synchronFrameRequest ( const unsigned int  index,
const double  timeout = 10.0,
bool *  abort = nullptr 
)
overridevirtual

Invokes a synchronous frame request.

See also
CV::FrameProviderInterface::synchronFrameRequest().

Implements Ocean::CV::FrameProviderInterface.

◆ synchronFrameTypeRequest()

FrameType Ocean::Media::ImageSequenceFrameProviderInterface::synchronFrameTypeRequest ( const double  timeout = 10.0,
bool *  abort = nullptr 
)
overridevirtual

Invokes a synchronous frame type request.

See also
CV::FrameProviderInterface::synchronFrameTypeRequest().

Implements Ocean::CV::FrameProviderInterface.

Field Documentation

◆ imageSequence_

ImageSequenceRef Ocean::Media::ImageSequenceFrameProviderInterface::imageSequence_
protected

Image sequence used as frame source.

◆ lock_

Lock Ocean::Media::ImageSequenceFrameProviderInterface::lock_
protected

Interface lock.

◆ pendingAsynchronousRequests_

unsigned int Ocean::Media::ImageSequenceFrameProviderInterface::pendingAsynchronousRequests_ = 0u
protected

The number of pending asynchronous requests.

◆ preferredPixelFormat_

FrameType::PixelFormat Ocean::Media::ImageSequenceFrameProviderInterface::preferredPixelFormat_ = FrameType::FORMAT_UNDEFINED
protected

The preferred pixel format of the resulting images, if any.

◆ preferredPixelOrigin_

FrameType::PixelOrigin Ocean::Media::ImageSequenceFrameProviderInterface::preferredPixelOrigin_ = FrameType::ORIGIN_INVALID
protected

The preferred pixel origin of the resulting images, if any.


The documentation for this class was generated from the following file: