|
OrbbecSDK 2.6.3
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
|
Define the frame class, which is the base class of all frame types. More...
#include <Frame.hpp>
Public Member Functions | |
| Frame (const ob_frame *impl) | |
| Construct a new Frame object with a given pointer to the internal frame object. | |
| const ob_frame * | getImpl () const |
| Get the internal (impl) frame object. | |
| virtual | ~Frame () noexcept |
| Destroy the Frame object. | |
| virtual OBFrameType | getType () const |
| Get the type of frame. | |
| virtual OBFormat | getFormat () const |
| Get the format of the frame. | |
| virtual uint64_t | getIndex () const |
| Get the sequence number of the frame. | |
| virtual uint8_t * | getData () const |
| Get frame data. | |
| virtual uint32_t | getDataSize () const |
| Get the size of the frame data. | |
| uint64_t | getTimeStampUs () const |
| Get the hardware timestamp of the frame in microseconds. | |
| uint64_t | getSystemTimeStampUs () const |
| Get the system timestamp of the frame in microseconds. | |
| uint64_t | getGlobalTimeStampUs () const |
| Get the global timestamp of the frame in microseconds. | |
| uint8_t * | getMetadata () const |
| Get the metadata pointer of the frame. | |
| uint32_t | getMetadataSize () const |
| Get the size of the metadata of the frame. | |
| bool | hasMetadata (OBFrameMetadataType type) const |
| Check if the frame object has metadata of a given type. | |
| int64_t | getMetadataValue (OBFrameMetadataType type) const |
| Get the metadata value. | |
| std::shared_ptr< StreamProfile > | getStreamProfile () const |
| get StreamProfile of the frame | |
| std::shared_ptr< Sensor > | getSensor () const |
| get owner sensor of the frame | |
| std::shared_ptr< Device > | getDevice () const |
| get owner device of the frame | |
| template<typename T> | |
| bool | is () const |
| Check if the runtime type of the frame object is compatible with a given type. | |
| template<typename T> | |
| std::shared_ptr< T > | as () |
| Convert the frame object to a target type. | |
| template<typename T> | |
| std::shared_ptr< const T > | as () const |
| Convert the frame object to a target type. | |
| void | copyFrameInfo (std::shared_ptr< const Frame > srcFrame) |
| Copy the information of the source frame object to the destination frame object. | |
| void | setSystemTimestampUs (uint64_t systemTimestampUs) |
| Set the system timestamp of the frame in microseconds. | |
| void | updateData (const uint8_t *data, uint32_t dataSize) |
| Update the data of a frame. | |
| void | updateMetadata (const uint8_t *metadata, uint32_t metadataSize) |
| Update the metadata of the frame. | |
| void | setStreamProfile (std::shared_ptr< const StreamProfile > profile) |
| Set (override) the stream profile of the frame. | |
| OBFrameType | type () const |
| virtual OBFormat | format () const |
| virtual uint64_t | index () const |
| virtual void * | data () const |
| virtual uint32_t | dataSize () const |
| uint64_t | timeStamp () const |
| uint64_t | timeStampUs () const |
| uint64_t | systemTimeStamp () const |
| uint64_t | systemTimeStampUs () const |
| uint64_t | globalTimeStampUs () const |
| uint8_t * | metadata () const |
| uint32_t | metadataSize () const |
Protected Attributes | |
| const ob_frame * | impl_ = nullptr |
| The pointer to the internal (c api level) frame object. | |
Define the frame class, which is the base class of all frame types.
|
inlineexplicit |
Construct a new Frame object with a given pointer to the internal frame object.
| [in] | impl | The pointer to the internal frame object. |
Definition at line 62 of file Frame.hpp.
Referenced by ob::AccelFrame::AccelFrame(), ob::FrameSet::FrameSet(), ob::GyroFrame::GyroFrame(), ob::LiDARPointsFrame::LiDARPointsFrame(), ob::PointsFrame::PointsFrame(), and ob::VideoFrame::VideoFrame().
|
inlinevirtualnoexcept |
|
inline |
|
inlinevirtual |
Get the type of frame.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Get the size of the frame data.
Definition at line 146 of file Frame.hpp.
Referenced by dataSize().
|
inline |
Get the hardware timestamp of the frame in microseconds.
The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.
Definition at line 160 of file Frame.hpp.
Referenced by timeStamp(), and timeStampUs().
|
inline |
Get the system timestamp of the frame in microseconds.
The system timestamp is the time point when the frame was received by the host, on host clock domain.
Definition at line 174 of file Frame.hpp.
Referenced by systemTimeStamp(), and systemTimeStampUs().
|
inline |
Get the global timestamp of the frame in microseconds.
The global timestamp is the time point when the frame was captured by the device, and has been converted to the host clock domain. The conversion process base on the device timestamp and can eliminate the timer drift of the device
Definition at line 193 of file Frame.hpp.
Referenced by globalTimeStampUs().
|
inline |
Get the metadata pointer of the frame.
Definition at line 206 of file Frame.hpp.
Referenced by metadata().
|
inline |
Get the size of the metadata of the frame.
Definition at line 219 of file Frame.hpp.
Referenced by metadataSize().
|
inline |
Check if the frame object has metadata of a given type.
| [in] | type | The metadata type. refer to OBFrameMetadataType |
|
inline |
Get the metadata value.
| [in] | type | The metadata type. refer to OBFrameMetadataType |
|
inline |
get StreamProfile of the frame
|
inline |
|
inline |
| bool ob::Frame::is | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Update the data of a frame.
The data will be memcpy to the frame data buffer.
The frame data size will be also updated as the input data size.
| [in] | data | The new data to update the frame with. |
| [in] | dataSize | The size of the new data. |
|
inline |
Update the metadata of the frame.
The metadata will be memcpy to the frame metadata buffer.
The frame metadata size will be also updated as the input metadata size.
| [in] | metadata | The new metadata to update. |
| [in] | metadataSize | The size of the new metadata. |
|
inline |
|
inline |
Definition at line 425 of file Frame.hpp.
Referenced by getMetadataValue(), getType(), and hasMetadata().
|
inlinevirtual |
Definition at line 429 of file Frame.hpp.
Referenced by getFormat().
|
inlinevirtual |
Definition at line 433 of file Frame.hpp.
Referenced by ob::FrameSet::getFrame(), ob::FrameSet::getFrameByIndex(), and getIndex().
|
inlinevirtual |
Definition at line 437 of file Frame.hpp.
Referenced by data(), getData(), and updateData().
|
inlinevirtual |
Definition at line 442 of file Frame.hpp.
Referenced by getDataSize(), and updateData().
|
inline |
Definition at line 450 of file Frame.hpp.
Referenced by getTimeStampUs().
|
inline |
Definition at line 458 of file Frame.hpp.
Referenced by getSystemTimeStampUs().
|
inline |
Definition at line 462 of file Frame.hpp.
Referenced by getGlobalTimeStampUs().
|
inline |
Definition at line 466 of file Frame.hpp.
Referenced by getMetadata(), and updateMetadata().
|
inline |
Definition at line 470 of file Frame.hpp.
Referenced by getMetadataSize(), and updateMetadata().
|
protected |
The pointer to the internal (c api level) frame object.
Definition at line 50 of file Frame.hpp.
Referenced by as(), as(), copyFrameInfo(), Frame(), ob::FrameSet::getColorFrame(), ob::PointsFrame::getCoordinateValueScale(), ob::FrameSet::getCount(), getData(), getDataSize(), ob::FrameSet::getDepthFrame(), getDevice(), getFormat(), ob::FrameSet::getFrame(), ob::FrameSet::getFrameByIndex(), getGlobalTimeStampUs(), ob::PointsFrame::getHeight(), ob::VideoFrame::getHeight(), getImpl(), getIndex(), ob::FrameSet::getIrFrame(), getMetadata(), getMetadataSize(), getMetadataValue(), ob::VideoFrame::getPixelAvailableBitSize(), ob::VideoFrame::getPixelType(), ob::FrameSet::getPointsFrame(), getSensor(), getStreamProfile(), getSystemTimeStampUs(), ob::AccelFrame::getTemperature(), ob::GyroFrame::getTemperature(), getTimeStampUs(), getType(), ob::AccelFrame::getValue(), ob::GyroFrame::getValue(), ob::DepthFrame::getValueScale(), ob::PointsFrame::getWidth(), ob::VideoFrame::getWidth(), hasMetadata(), ob::FrameSet::pushFrame(), ob::VideoFrame::setPixelAvailableBitSize(), ob::VideoFrame::setPixelType(), setStreamProfile(), setSystemTimestampUs(), ob::DepthFrame::setValueScale(), updateData(), updateMetadata(), and ~Frame().