OrbbecSDK 2.1.1
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::VideoFrame Class Reference

Define the VideoFrame class, which inherits from the Frame class. More...

#include <Frame.hpp>

+ Inheritance diagram for ob::VideoFrame:

Public Member Functions

 VideoFrame (const ob_frame *impl)
 Construct a new VideoFrame object with a given pointer to the internal frame object.
 
 ~VideoFrame () noexcept override=default
 
uint32_t getWidth () const
 Get the width of the frame.
 
uint32_t getHeight () const
 Get the height of the frame.
 
OBPixelType getPixelType () const
 Get the Pixel Type object.
 
uint8_t getPixelAvailableBitSize () const
 Get the effective number of pixels in the frame.
 
uint32_t width () const
 
uint32_t height () const
 
uint8_t pixelAvailableBitSize () const
 
- Public Member Functions inherited from ob::Frame
 Frame (const ob_frame *impl)
 Construct a new Frame object with a given pointer to the internal frame object.
 
const ob_framegetImpl () 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< StreamProfilegetStreamProfile () const
 get StreamProfile of the frame
 
std::shared_ptr< SensorgetSensor () const
 get owner sensor of the frame
 
std::shared_ptr< DevicegetDevice () 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.
 
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
 

Additional Inherited Members

- Protected Attributes inherited from ob::Frame
const ob_frameimpl_ = nullptr
 The pointer to the internal (c api level) frame object.
 

Detailed Description

Define the VideoFrame class, which inherits from the Frame class.

Definition at line 392 of file Frame.hpp.

Constructor & Destructor Documentation

◆ VideoFrame()

ob::VideoFrame::VideoFrame ( const ob_frame * impl)
inlineexplicit

Construct a new VideoFrame object with a given pointer to the internal frame object.

Attention
After calling this constructor, the frame object will own the internal frame object, and the internal frame object will be deleted when the frame object is destroyed.
The internal frame object should not be deleted by the caller.
Parameters
implThe pointer to the internal frame object.

Definition at line 403 of file Frame.hpp.

◆ ~VideoFrame()

ob::VideoFrame::~VideoFrame ( )
overridedefaultnoexcept

Member Function Documentation

◆ getWidth()

uint32_t ob::VideoFrame::getWidth ( ) const
inline

Get the width of the frame.

Returns
uint32_t The width of the frame.

Definition at line 412 of file Frame.hpp.

Referenced by width().

◆ getHeight()

uint32_t ob::VideoFrame::getHeight ( ) const
inline

Get the height of the frame.

Returns
uint32_t The height of the frame.

Definition at line 425 of file Frame.hpp.

Referenced by height().

◆ getPixelType()

OBPixelType ob::VideoFrame::getPixelType ( ) const
inline

Get the Pixel Type object.

Usually used to determine the pixel type of depth frame (depth, disparity, raw phase, etc.)

Attention
Always return OB_PIXEL_UNKNOWN for non-depth frame currently
Returns
OBPixelType

Definition at line 441 of file Frame.hpp.

◆ getPixelAvailableBitSize()

uint8_t ob::VideoFrame::getPixelAvailableBitSize ( ) const
inline

Get the effective number of pixels in the frame.

Attention
Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format.
Returns
uint8_t The effective number of pixels in the frame, or 0 if it is an unsupported format.

Definition at line 455 of file Frame.hpp.

Referenced by pixelAvailableBitSize().

◆ width()

uint32_t ob::VideoFrame::width ( ) const
inline

Definition at line 465 of file Frame.hpp.

Referenced by getWidth().

◆ height()

uint32_t ob::VideoFrame::height ( ) const
inline

Definition at line 469 of file Frame.hpp.

Referenced by getHeight().

◆ pixelAvailableBitSize()

uint8_t ob::VideoFrame::pixelAvailableBitSize ( ) const
inline

Definition at line 473 of file Frame.hpp.


The documentation for this class was generated from the following file: