Handles operations on a frame such as saving it to file and creating a new frame with content read from file. More...
#include <frame_handler.h>
Public Member Functions | |
SDK_API | FrameHandler () |
SDK_API | FrameHandler (FrameHandler &&) noexcept |
Move constructor. More... | |
SDK_API FrameHandler & | operator= (FrameHandler &&) noexcept |
Move assignment. More... | |
SDK_API aditof::Status | readNextFrame (aditof::Frame &frame, const std::string &fullFileName="") |
Reads frame from a file. If same file is provided it will continue to read from the last position. More... | |
SDK_API aditof::Status | saveFrameToFile (aditof::Frame &frame, const std::string &fileName="") |
Store frame to file. More... | |
SDK_API aditof::Status | saveFrameToFileMultithread (aditof::Frame &frame, const std::string &fileName="") |
Store frame to file using a separate thread. More... | |
SDK_API aditof::Status | setCustomFormat (const std::string &format) |
A custom format in which the frames will be stored/read. More... | |
SDK_API aditof::Status | setFrameContent (const std::string &frameContent) |
Set which frame element you want to store/read (depth/ab/conf) More... | |
SDK_API aditof::Status | setInputFileName (const std::string &fullFileName) |
Set the input file for the frames. More... | |
SDK_API aditof::Status | setOutputFilePath (const std::string &filePath) |
Set the output path/output folder for the frames. More... | |
SDK_API aditof::Status | storeFramesToSingleFile (bool enable) |
Enable/disable if single file is intended to use for storing data. More... | |
SDK_API | ~FrameHandler () |
Private Attributes | |
std::unique_ptr< FrameHandlerImpl > | m_impl |
Handles operations on a frame such as saving it to file and creating a new frame with content read from file.
Definition at line 57 of file frame_handler.h.
FrameHandler::FrameHandler | ( | ) |
Definition at line 43 of file frame_handler.cpp.
|
default |
|
defaultnoexcept |
Move constructor.
|
defaultnoexcept |
Move assignment.
Status FrameHandler::readNextFrame | ( | aditof::Frame & | frame, |
const std::string & | fullFileName = "" |
||
) |
Reads frame from a file. If same file is provided it will continue to read from the last position.
[out] | frame | - Frame object in which the frame will be stored |
[in] | fullFileName | - Full file name |
Definition at line 70 of file frame_handler.cpp.
Status FrameHandler::saveFrameToFile | ( | aditof::Frame & | frame, |
const std::string & | fileName = "" |
||
) |
Store frame to file.
[in] | frame | - frame object to be stored in file |
[in] | fileName | - the name of the file. If none provided it will automatically generate one depending on time and frame number. |
Definition at line 59 of file frame_handler.cpp.
Status FrameHandler::saveFrameToFileMultithread | ( | aditof::Frame & | frame, |
const std::string & | fileName = "" |
||
) |
Store frame to file using a separate thread.
[in] | frame | - frame object to be stored in file |
[in] | fileName | - the name of the file. If none provided it will automatically generate one depending on time and frame number. |
Definition at line 64 of file frame_handler.cpp.
Status FrameHandler::setCustomFormat | ( | const std::string & | format | ) |
A custom format in which the frames will be stored/read.
[in] | format | - Format name |
Definition at line 75 of file frame_handler.cpp.
Status FrameHandler::setFrameContent | ( | const std::string & | frameContent | ) |
Set which frame element you want to store/read (depth/ab/conf)
[in] | frameContent | - a string providing the frame subelements that will be stored |
Definition at line 83 of file frame_handler.cpp.
Status FrameHandler::setInputFileName | ( | const std::string & | fullFileName | ) |
Set the input file for the frames.
[in] | fullFileName | - Input file name |
Definition at line 55 of file frame_handler.cpp.
Status FrameHandler::setOutputFilePath | ( | const std::string & | filePath | ) |
Set the output path/output folder for the frames.
[in] | filePath | - File path |
Definition at line 51 of file frame_handler.cpp.
Status FrameHandler::storeFramesToSingleFile | ( | bool | enable | ) |
Enable/disable if single file is intended to use for storing data.
[in] | enable | - true for single file use/ false for multiple file use |
Definition at line 79 of file frame_handler.cpp.
|
private |
Definition at line 138 of file frame_handler.h.