Go to the documentation of this file.
41 #include <glog/logging.h>
46 #include <unordered_map>
82 LOG(
INFO) <<
"Same details provided. Doing nothing.";
104 return dataType == details.type;
107 LOG(
WARNING) <<
"Could not find any details for type: " << dataType;
111 details = *detailsIter;
117 uint16_t **dataPtr) {
119 if (
m_implData->m_dataLocations.count(dataType) > 0) {
120 *dataPtr =
m_implData->m_dataLocations[dataType];
125 LOG(
ERROR) << dataType <<
" is not supported by this frame!";
138 return frame_detail.type == name;
142 LOG(
WARNING) <<
"Could not find any attribute with name: " <<
name;
145 return *frame_detail;
150 unsigned int totalSize = 0;
151 unsigned int pos = 0;
152 uint16_t embed_hdr_length = 0;
153 uint8_t total_captures = 0;
155 auto getSubframeSize = [embed_hdr_length,
157 if (frameDetail.type ==
"header") {
158 return (
unsigned long int)(embed_hdr_length / 2) * total_captures;
159 }
else if (frameDetail.type ==
"xyz") {
160 return (
unsigned long int)(frameDetail.height * frameDetail.width *
162 }
else if (frameDetail.type ==
"conf") {
163 return (
unsigned long int)(frameDetail.height * frameDetail.width *
166 return (
unsigned long int)frameDetail.height * frameDetail.width;
172 totalSize += getSubframeSize(frameDetail);
176 m_implData->m_allData = std::shared_ptr<uint16_t[]>(
177 new uint16_t[totalSize],
190 pos += getSubframeSize(frameDetail);
198 if (
m_implData->m_dataLocations.count(
"metadata") > 0) {
199 header =
reinterpret_cast<uint8_t *
>(
GLuint const GLchar * name
void allocFrameData(const aditof::FrameDetails &details)
aditof::FrameDataDetails getFrameDetailByName(const aditof::FrameDetails &details, const std::string name)
aditof::Status getDataDetails(const std::string &dataType, aditof::FrameDataDetails &details) const
aditof::FrameDetails m_details
aditof::Status getDetails(aditof::FrameDetails &details) const
std::shared_ptr< uint16_t[]> m_allData
std::string type
The type of data that can be found in a frame. For example it could be depth data or IR data,...
GLsizei const GLchar *const * string
@ UNAVAILABLE
The requested action or resource is unavailable.
Holds the xyz values of a frame.
aditof::Status getMetadataStruct(aditof::Metadata &metadata) const
std::unique_ptr< ImplData > m_implData
std::vector< FrameDataDetails > dataDetails
A frame can have multiple types of data. For example it could hold data about depth and/or data about...
Describes the properties of a frame.
static const int skMetaDataBytesCount
Describes the properties of a data that embedded within the frame.
FrameImpl & operator=(const FrameImpl &op)
@ INVALID_ARGUMENT
Invalid arguments provided.
Status
Status of any operation that the TOF sdk performs.
aditof::Status setDetails(const aditof::FrameDetails &details)
std::unordered_map< std::string, uint16_t * > m_dataLocations
aditof::Status getData(const std::string &dataType, uint16_t **dataPtr)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:51