OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
ob::FrameHelper Class Reference

Define the FrameHelper class. More...

#include <Frame.hpp>

Static Public Member Functions

static std::shared_ptr< FramecreateFrame (OBFrameType type, OBFormat format, uint32_t width, uint32_t height, uint32_t strideBytes)
 Create a Frame object.
 
static std::shared_ptr< FramecreateFrameFromBuffer (OBFormat format, uint32_t width, uint32_t height, uint8_t *buffer, uint32_t bufferSize, BufferDestroyCallback destroyCallback, void *destroyCallbackContext)
 Create a frame object based on an externally created buffer.
 
static std::shared_ptr< FrameSetcreateFrameSet ()
 Create an empty FrameSet object.
 
static void pushFrame (std::shared_ptr< Frame > frameSet, OBFrameType frameType, std::shared_ptr< Frame > frame)
 Add a frame of a specific type to the FrameSet.
 
static void setFrameSystemTimestamp (std::shared_ptr< Frame > frame, uint64_t systemTimestamp)
 Set the system timestamp of the frame.
 
static void setFrameDeviceTimestamp (std::shared_ptr< Frame > frame, uint64_t deviceTimestamp)
 Set the device timestamp of the frame.
 
static void setFrameDeviceTimestampUs (std::shared_ptr< Frame > frame, uint64_t deviceTimestampUs)
 Set the device timestamp of the frame.
 

Detailed Description

Define the FrameHelper class.

Definition at line 438 of file Frame.hpp.

Member Function Documentation

◆ createFrame()

static std::shared_ptr< Frame > ob::FrameHelper::createFrame ( OBFrameType  type,
OBFormat  format,
uint32_t  width,
uint32_t  height,
uint32_t  strideBytes 
)
static

Create a Frame object.

Parameters
[in]typeThe type of frame. See OBFrameType.
[in]formatThe format of the frame. See OBFormat.
[in]widthThe width of the frame.
[in]heightThe height of the frame.
[in]strideBytesThe stride of the frame in bytes. If strideBytes > 0, the frame data size = height * strideBytes. If strideBytes = 0, the frame datasize = height * width * pixelSize (pixelSize according to the format).
Returns
std::shared_ptr<Frame> The created frame object.

◆ createFrameFromBuffer()

static std::shared_ptr< Frame > ob::FrameHelper::createFrameFromBuffer ( OBFormat  format,
uint32_t  width,
uint32_t  height,
uint8_t *  buffer,
uint32_t  bufferSize,
BufferDestroyCallback  destroyCallback,
void *  destroyCallbackContext 
)
static

Create a frame object based on an externally created buffer.

Parameters
[in]formatThe format of the frame. See OBFormat.
[in]widthThe width of the frame.
[in]heightThe height of the frame.
[in]bufferThe frame object buffer
[in]bufferSizeThe frame object buffer size
[in]destroyCallbackThe frame object buffer destroy callback
[in]destroyCallbackContextThe frame object buffer destroy callback context
Returns
std::shared_ptr<Frame> The created frame object

◆ createFrameSet()

static std::shared_ptr< FrameSet > ob::FrameHelper::createFrameSet ( )
static

Create an empty FrameSet object.

Returns
std::shared_ptr<Frame> The FrameSet object

◆ pushFrame()

static void ob::FrameHelper::pushFrame ( std::shared_ptr< Frame frameSet,
OBFrameType  frameType,
std::shared_ptr< Frame frame 
)
static

Add a frame of a specific type to the FrameSet.

Parameters
frameSetThe FrameSet object
frameTypeThe type of frame to add
frameThe frame object to add

◆ setFrameSystemTimestamp()

static void ob::FrameHelper::setFrameSystemTimestamp ( std::shared_ptr< Frame frame,
uint64_t  systemTimestamp 
)
static

Set the system timestamp of the frame.

Parameters
frameThe frame object.
systemTimestampThe system timestamp to set in milliseconds.

◆ setFrameDeviceTimestamp()

static void ob::FrameHelper::setFrameDeviceTimestamp ( std::shared_ptr< Frame frame,
uint64_t  deviceTimestamp 
)
static

Set the device timestamp of the frame.

Parameters
frameThe frame object.
deviceTimestampThe device timestamp to set in milliseconds.

◆ setFrameDeviceTimestampUs()

static void ob::FrameHelper::setFrameDeviceTimestampUs ( std::shared_ptr< Frame frame,
uint64_t  deviceTimestampUs 
)
static

Set the device timestamp of the frame.

Parameters
frameThe frame object.
deviceTimestampUsThe device timestamp to set in microseconds.

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