ChunkedImageSequencePlaybackStrategy Class Reference

#include <VisionX/libraries/imrec/playback/strats/ChunkedImageSequencePlaybackStrategy.h>

+ Inheritance diagram for ChunkedImageSequencePlaybackStrategy:

Public Member Functions

 ChunkedImageSequencePlaybackStrategy ()
 Default constructor to manually setup later. More...
 
 ChunkedImageSequencePlaybackStrategy (const std::filesystem::path &filePath)
 Constructor initialising the playback immediately. More...
 
virtual unsigned int getCurrentFrame () const override
 Gets the current frame index of the playback. More...
 
virtual unsigned int getFps () const override
 Gets the amount of frames per second of the recording. More...
 
virtual unsigned int getFrameCount () const override
 Gets the total amout of frames in the recording. More...
 
virtual unsigned int getFrameHeight () const override
 Gets the height of a frame in pixel. More...
 
virtual unsigned int getFrameWidth () const override
 Gets the width of a frame in pixel. More...
 
virtual bool getNextFrame (::CByteImage &buffer) override
 Writes the next frame into an IVT CByteImage buffer (RGB) More...
 
virtual bool getNextFrame (cv::Mat &buffer) override
 Writes the next frame into an OpenCV Mat buffer (BGR) More...
 
virtual bool getNextFrame (void *buffer) override
 Writes the next frame into a buffer of any form (RGB) More...
 
virtual bool hasNextFrame () const override
 Indicates whether the recording has a consecutive frame. More...
 
virtual bool isPlayingBack () const override
 Indicates whether the instance is configured to be able to play back. More...
 
virtual void setCurrentFrame (unsigned int frame) override
 Sets the frame from there the playback should resume afterwards (seek) More...
 
virtual void startPlayback (const std::filesystem::path &filePath) override
 Starts the playback. More...
 
virtual void stopPlayback () override
 Stops the playback. More...
 
virtual ~ChunkedImageSequencePlaybackStrategy () override
 Destructor. More...
 
- Public Member Functions inherited from AbstractPlaybackStrategy
virtual ~AbstractPlaybackStrategy ()
 Destructor. More...
 

Detailed Description

Definition at line 48 of file ChunkedImageSequencePlaybackStrategy.h.

Constructor & Destructor Documentation

◆ ChunkedImageSequencePlaybackStrategy() [1/2]

Default constructor to manually setup later.

Definition at line 51 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ ChunkedImageSequencePlaybackStrategy() [2/2]

ChunkedImageSequencePlaybackStrategy ( const std::filesystem::path &  filePath)

Constructor initialising the playback immediately.

Parameters
filePathPath to the recording

Definition at line 60 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ ~ChunkedImageSequencePlaybackStrategy()

Destructor.

Definition at line 69 of file ChunkedImageSequencePlaybackStrategy.cpp.

Member Function Documentation

◆ getCurrentFrame()

unsigned int getCurrentFrame ( ) const
overridevirtual

Gets the current frame index of the playback.

Returns
The current frame index

Implements AbstractPlaybackStrategy.

Definition at line 118 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getFps()

unsigned int getFps ( ) const
overridevirtual

Gets the amount of frames per second of the recording.

Returns
Amount of frames per second of the recording

Implements AbstractPlaybackStrategy.

Definition at line 83 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getFrameCount()

unsigned int getFrameCount ( ) const
overridevirtual

Gets the total amout of frames in the recording.

Returns
Total amount of frames in the recording

Implements AbstractPlaybackStrategy.

Definition at line 90 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getFrameHeight()

unsigned int getFrameHeight ( ) const
overridevirtual

Gets the height of a frame in pixel.

Returns
Height of a frame in pixel

Implements AbstractPlaybackStrategy.

Definition at line 97 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getFrameWidth()

unsigned int getFrameWidth ( ) const
overridevirtual

Gets the width of a frame in pixel.

Returns
Width of a frame in pixel

Implements AbstractPlaybackStrategy.

Definition at line 104 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getNextFrame() [1/3]

bool getNextFrame ( ::CByteImage &  buffer)
overridevirtual

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)

Implements AbstractPlaybackStrategy.

Definition at line 236 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getNextFrame() [2/3]

bool getNextFrame ( cv::Mat &  buffer)
overridevirtual

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)

Implements AbstractPlaybackStrategy.

Definition at line 243 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ getNextFrame() [3/3]

bool getNextFrame ( void *  buffer)
overridevirtual

Writes the next frame into a buffer of any form (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)

Implements AbstractPlaybackStrategy.

Definition at line 214 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ hasNextFrame()

bool hasNextFrame ( ) const
overridevirtual

Indicates whether the recording has a consecutive frame.

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

Implements AbstractPlaybackStrategy.

Definition at line 125 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ isPlayingBack()

bool isPlayingBack ( ) const
overridevirtual

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

Returns
True if it is playing back, false otherwise

Implements AbstractPlaybackStrategy.

Definition at line 76 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ setCurrentFrame()

void setCurrentFrame ( unsigned int  frame)
overridevirtual

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)

Implements AbstractPlaybackStrategy.

Definition at line 111 of file ChunkedImageSequencePlaybackStrategy.cpp.

◆ startPlayback()

void startPlayback ( const std::filesystem::path &  filePath)
overridevirtual

Starts the playback.

Parameters
filePathPath to the recording to play back

Implements AbstractPlaybackStrategy.

Definition at line 147 of file ChunkedImageSequencePlaybackStrategy.cpp.

+ Here is the call graph for this function:

◆ stopPlayback()

void stopPlayback ( )
overridevirtual

Stops the playback.

Implements AbstractPlaybackStrategy.

Definition at line 266 of file ChunkedImageSequencePlaybackStrategy.cpp.


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