1 #ifndef SENS_RECORDER_DATAHANDLER_H
2 #define SENS_RECORDER_DATAHANDLER_H
13 #include <condition_variable>
15 #include <opencv2/opencv.hpp>
22 using GpsInfo = std::pair<SENSGps::Location, SENSTimePt>;
39 void start(
const std::string& outputDir);
std::pair< SENSOrientation::Quat, SENSTimePt > OrientationInfo
std::pair< SENSGps::Location, SENSTimePt > GpsInfo
std::pair< cv::Mat, SENSTimePt > FrameInfo
cv::VideoWriter _videoWriter
void updateConfig(const SENSCameraConfig &config)
void writeLineToFile(ofstream &file, const FrameInfo &data) override
called in thread store routine for every new line
void writeOnThreadFinish() override
called in thread store routine when thread finished
void writeOnThreadStart() override
called in thread store routine when thread starts
SENSCameraRecorderDataHandler()
SENSGpsRecorderDataHandler()
void writeLineToFile(ofstream &file, const GpsInfo &data) override
called in thread store routine for every new line
SENSOrientationRecorderDataHandler()
void writeLineToFile(ofstream &file, const OrientationInfo &data) override
called in thread store routine for every new line
virtual void writeOnThreadFinish()
called in thread store routine when thread finished
virtual void writeOnThreadStart()
called in thread store routine when thread starts
virtual void writeLineToFile(ofstream &file, const T &data)=0
called in thread store routine for every new line
void add(T &&item)
add new value to store queue
SENSRecorderDataHandler(const std::string &name)
virtual void writeHeaderToFile(ofstream &file)
called in thread store routine when file could be opened
bool getErrorMsg(std::string &msg)
get error msg (valid if function returns true)
void stop()
stop the store thread and clear values in queue
virtual ~SENSRecorderDataHandler()
std::string _outputDir
output directory
std::condition_variable _condVar
void start(const std::string &outputDir)
start the store thread
Config config
The configuration set in App::run.