Go to the documentation of this file.
35 #include <glog/logging.h>
45 : m_concatFrames(
true), m_enableMultithreading(
false),
46 m_customFormat(
false), m_bitsInDepth(0), m_bitsInAB(0), m_bitsInConf(0),
47 m_frameWidth(0), m_frameHeight(0), m_frameIndex(0), m_fileCreated(
false),
48 m_endOfFile(
false), m_dir(
"."), m_pos(0), m_threadRunning(
false) {}
89 LOG(
ERROR) <<
"Failed to create file!";
100 frame.
getData(
"metadata", &metaData);
110 frame.
getData(
"depth", &depthData);
111 m_file.write(
reinterpret_cast<char *
>(depthData),
117 m_file.write(
reinterpret_cast<char *
>(abData),
122 frame.
getData(
"conf", &confData);
123 m_file.write(
reinterpret_cast<char *
>(confData),
128 frame.
getData(
"xyz", &xyzData);
129 m_file.write(
reinterpret_cast<char *
>(xyzData),
190 LOG(
ERROR) <<
"No input file provided!";
191 return Status::GENERIC_ERROR;
203 return Status::GENERIC_ERROR;
208 LOG(
WARNING) <<
"End of file reached! No more frames left to read.";
222 frDataDetails.
type =
"metadata";
230 frDataDetails.
type =
"depth";
239 frDataDetails.
type =
"ab";
248 frDataDetails.
type =
"conf";
257 frDataDetails.
type =
"xyz";
267 LOG(
ERROR) <<
"Failed to set frame details.";
278 frame.
getData(
"metadata", &metaData);
283 frame.
getData(
"depth", &depthData);
284 m_file.read(
reinterpret_cast<char *
>(depthData),
290 m_file.read(
reinterpret_cast<char *
>(abData),
295 frame.
getData(
"conf", &confData);
296 m_file.read(
reinterpret_cast<char *
>(confData),
301 frame.
getData(
"xyz", &xyzData);
302 m_file.read(
reinterpret_cast<char *
>(xyzData),
328 if (fileName.empty()) {
329 char time_buffer[128];
334 localtime_s(&timeinfo, &rawtime);
338 strftime(time_buffer,
sizeof(time_buffer),
"%Y_%m_%d_%H_%M_%S",
351 LOG(
ERROR) <<
"Failed to create output file!";
352 return Status::GENERIC_ERROR;
371 fullPath =
m_dir + pathSeparator + fileName;
unsigned int subelementsPerElement
The number of sub-elements that an element has. An element is the smallest part of the image (a....
struct tm * localtime_r(const time_t *timep, struct tm *result)
std::queue< std::string > m_frameNameQueue
std::string getOutputFileFullPath(const std::string &fileName)
std::string type
The type of data that can be found in a frame. For example it could be depth data or IR data,...
volatile bool m_threadRunning
GLsizei const GLchar *const * string
unsigned int width
The width of the frame data.
aditof::Status saveFrameToFileMultithread(aditof::Frame &frame, const std::string &filename="")
aditof::FrameDetails m_frDetails
unsigned int width
The width of the frame.
std::queue< aditof::Frame > m_frameQueue
aditof::Status setFrameContent(const std::string &frameContent)
std::vector< FrameDataDetails > dataDetails
A frame can have multiple types of data. For example it could hold data about depth and/or data about...
unsigned int height
The height of the frame.
aditof::Status setInputFileName(const std::string &fullFileName)
unsigned int subelementSize
The size in bytes of a sub-element. A sub-element is a sub-component of an element....
aditof::Status setOutputFilePath(const std::string &filePath)
GLint GLint GLsizei GLint GLenum format
SDK_API Status setDetails(const FrameDetails &details)
Configures the frame with the given details.
Describes the properties of a data that embedded within the frame.
SDK_API Status getData(const std::string &dataType, uint16_t **dataPtr)
Gets the address where the specified data is being stored.
aditof::Status storeFramesToSingleFile(bool enable)
aditof::Status setCustomFormat(const std::string &format)
uint8_t totalCaptures
totalCaptures or subframes in a frame
aditof::Status createFile(const std::string &fileName)
Status
Status of any operation that the TOF sdk performs.
std::thread m_threadWorker
std::string m_fullInputFileName
aditof::Metadata m_metadataStruct
std::string cameraMode
The mode the camera was set when the frame was captured.
virtual SDK_API Status getMetadataStruct(Metadata &metadata) const
Extracts the metadata content and returns a struct with values.
std::string m_inputFileName
const GLuint GLenum const GLvoid * binary
std::string m_outputFileName
aditof::Status saveFrameToFile(aditof::Frame &frame, const std::string &fileName="")
unsigned int height
The height of the frame data.
aditof::Status readNextFrame(aditof::Frame &frame, const std::string &fullFileName="")
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:51