Define the FrameHelper class.
More...
#include <Frame.hpp>
|
static std::shared_ptr< Frame > | createFrame (OBFrameType type, OBFormat format, uint32_t width, uint32_t height, uint32_t strideBytes) |
| Create a Frame object.
|
|
static std::shared_ptr< Frame > | createFrameFromBuffer (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< FrameSet > | createFrameSet () |
| 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.
|
|
Define the FrameHelper class.
Definition at line 438 of file Frame.hpp.
◆ 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] | type | The type of frame. See OBFrameType. |
[in] | format | The format of the frame. See OBFormat. |
[in] | width | The width of the frame. |
[in] | height | The height of the frame. |
[in] | strideBytes | The 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] | format | The format of the frame. See OBFormat. |
[in] | width | The width of the frame. |
[in] | height | The height of the frame. |
[in] | buffer | The frame object buffer |
[in] | bufferSize | The frame object buffer size |
[in] | destroyCallback | The frame object buffer destroy callback |
[in] | destroyCallbackContext | The 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
-
frameSet | The FrameSet object |
frameType | The type of frame to add |
frame | The 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
-
frame | The frame object. |
systemTimestamp | The 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
-
frame | The frame object. |
deviceTimestamp | The 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
-
frame | The frame object. |
deviceTimestampUs | The device timestamp to set in microseconds. |
The documentation for this class was generated from the following file:
- E:/Projects/Jenkins/workspace/OrbbecSDK/libobsensor/include/libobsensor/hpp/Frame.hpp