AbstractPlaybackStrategy Class Referenceabstract

#include <VisionX/libraries/imrec/playback/AbstractPlaybackStrategy.h>

+ Inheritance diagram for AbstractPlaybackStrategy:

Public Member Functions

virtual unsigned int getCurrentFrame () const =0
 Gets the current frame index of the playback. More...
 
virtual unsigned int getFps () const =0
 Gets the amount of frames per second of the recording. More...
 
virtual unsigned int getFrameCount () const =0
 Gets the total amout of frames in the recording. More...
 
virtual unsigned int getFrameHeight () const =0
 Gets the height of a frame in pixel. More...
 
virtual unsigned int getFrameWidth () const =0
 Gets the width of a frame in pixel. More...
 
virtual bool getNextFrame (::CByteImage &buffer)=0
 Writes the next frame into an IVT CByteImage buffer (RGB) More...
 
virtual bool getNextFrame (cv::Mat &buffer)=0
 Writes the next frame into an OpenCV Mat buffer (BGR) More...
 
virtual bool getNextFrame (void *buffer)=0
 Writes the next frame into an RGB buffer (one byte per channel => 3 byte per pixel) More...
 
virtual bool hasNextFrame () const =0
 Indicates whether the recording has a consecutive frame. More...
 
virtual bool isPlayingBack () const =0
 Indicates whether the instance is configured to be able to play back. More...
 
virtual void setCurrentFrame (unsigned int frame)=0
 Sets the frame from there the playback should resume afterwards (seek) More...
 
virtual void startPlayback (const std::filesystem::path &filePath)=0
 Starts the playback. More...
 
virtual void stopPlayback ()=0
 Stops the playback. More...
 
virtual ~AbstractPlaybackStrategy ()
 Destructor. More...
 

Detailed Description

Definition at line 52 of file AbstractPlaybackStrategy.h.

Constructor & Destructor Documentation

◆ ~AbstractPlaybackStrategy()

Destructor.

Definition at line 27 of file AbstractPlaybackStrategy.cpp.

Member Function Documentation

◆ getCurrentFrame()

virtual unsigned int getCurrentFrame ( ) const
pure virtual

Gets the current frame index of the playback.

Returns
The current frame index

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getFps()

virtual unsigned int getFps ( ) const
pure virtual

Gets the amount of frames per second of the recording.

Returns
Amount of frames per second of the recording

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getFrameCount()

virtual unsigned int getFrameCount ( ) const
pure virtual

Gets the total amout of frames in the recording.

Returns
Total amount of frames in the recording

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getFrameHeight()

virtual unsigned int getFrameHeight ( ) const
pure virtual

Gets the height of a frame in pixel.

Returns
Height of a frame in pixel

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getFrameWidth()

virtual unsigned int getFrameWidth ( ) const
pure virtual

Gets the width of a frame in pixel.

Returns
Width of a frame in pixel

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getNextFrame() [1/3]

virtual bool getNextFrame ( ::CByteImage &  buffer)
pure virtual

Writes the next frame into an IVT CByteImage buffer (RGB)

Parameters
bufferOutput parameter where the frame data of the next frame should be written to
Returns
True on success, false otherwise (no consecutive frame, error while loading frame)

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getNextFrame() [2/3]

virtual bool getNextFrame ( cv::Mat &  buffer)
pure virtual

Writes the next frame into an OpenCV Mat buffer (BGR)

Parameters
bufferOutput parameter where the frame data of the next frame should be written to
Returns
True on success, false otherwise (no consecutive frame, error while loading frame)

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ getNextFrame() [3/3]

virtual bool getNextFrame ( void *  buffer)
pure virtual

Writes the next frame into an RGB buffer (one byte per channel => 3 byte per pixel)

Parameters
bufferOutput parameter where the frame data of the next frame should be written to
Returns
True on success, false otherwise (no consecutive frame, error while loading frame)

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ hasNextFrame()

virtual bool hasNextFrame ( ) const
pure virtual

Indicates whether the recording has a consecutive frame.

Returns
True, if there is a consecutive frame, false otherwise

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ isPlayingBack()

virtual bool isPlayingBack ( ) const
pure virtual

Indicates whether the instance is configured to be able to play back.

Returns
True if it is playing back, false otherwise

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ setCurrentFrame()

virtual void setCurrentFrame ( unsigned int  frame)
pure virtual

Sets the frame from there the playback should resume afterwards (seek)

Parameters
frameFrame from where the playback should be resumed (e.g. "0" to replay from the beginning)

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ startPlayback()

virtual void startPlayback ( const std::filesystem::path &  filePath)
pure virtual

Starts the playback.

Parameters
filePathPath to the recording to play back

Implemented in ChunkedImageSequencePlaybackStrategy, ImageSequencePlaybackStrategy, and VideoPlaybackStrategy.

◆ stopPlayback()

virtual void stopPlayback ( )
pure virtual

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