NVIDIA DeepStream SDK API Reference

9.2 Release
rs2::frame_source Class Reference

Detailed Description

The source used to generate frames, which is usually done by the low level driver for each sensor.

frame_source is one of the parameters of processing_block's callback function, which can be used to re-generate the frame and via frame_ready invoke another callback function to notify application frame is ready. Please refer to "video_processing_thread" code snippet in rs-measure.cpp for a detailed usage example.

Definition at line 18 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

Public Member Functions

frame allocate_video_frame (const stream_profile &profile, const frame &original, int new_bpp=0, int new_width=0, int new_height=0, int new_stride=0, rs2_extension frame_type=RS2_EXTENSION_VIDEO_FRAME) const
 Allocate a new video frame with given params. More...
 
frame allocate_motion_frame (const stream_profile &profile, const frame &original, rs2_extension frame_type=RS2_EXTENSION_MOTION_FRAME) const
 Allocate a new motion frame with given params. More...
 
frame allocate_points (const stream_profile &profile, const frame &original) const
 
frame allocate_composite_frame (std::vector< frame > frames) const
 Allocate composite frame with given params. More...
 
void frame_ready (frame result) const
 Invoke the callback funtion informing the frame is ready. More...
 
frame allocate_video_frame (const stream_profile &profile, const frame &original, int new_bpp=0, int new_width=0, int new_height=0, int new_stride=0, rs2_extension frame_type=RS2_EXTENSION_VIDEO_FRAME) const
 Allocate a new video frame with given params. More...
 
frame allocate_motion_frame (const stream_profile &profile, const frame &original, rs2_extension frame_type=RS2_EXTENSION_MOTION_FRAME) const
 Allocate a new motion frame with given params. More...
 
frame allocate_points (const stream_profile &profile, const frame &original) const
 
frame allocate_composite_frame (std::vector< frame > frames) const
 Allocate composite frame with given params. More...
 
void frame_ready (frame result) const
 Invoke the callback funtion informing the frame is ready. More...
 

Data Fields

rs2_source * _source
 

Friends

template<class T >
class frame_processor_callback
 
template<class T >
class frame_processor_callback
 

Member Function Documentation

◆ allocate_composite_frame() [1/2]

frame rs2::frame_source::allocate_composite_frame ( std::vector< frame >  frames) const
inline

Allocate composite frame with given params.

Parameters
[in]framesFrame vecotor used to create composite frame, the size of composite frame will be the same as vector size.
Returns
The allocated composite frame

Definition at line 82 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::error::handle(), rs2_allocate_composite_frame(), and absl::swap_internal::swap().

◆ allocate_composite_frame() [2/2]

frame rs2::frame_source::allocate_composite_frame ( std::vector< frame >  frames) const
inline

Allocate composite frame with given params.

Parameters
[in]framesFrame vecotor used to create composite frame, the size of composite frame will be the same as vector size.
Returns
The allocated composite frame

Definition at line 82 of file 9.2/sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::error::handle(), rs2_allocate_composite_frame(), and absl::swap_internal::swap().

◆ allocate_motion_frame() [1/2]

frame rs2::frame_source::allocate_motion_frame ( const stream_profile &  profile,
const frame &  original,
rs2_extension  frame_type = RS2_EXTENSION_MOTION_FRAME 
) const
inline

Allocate a new motion frame with given params.

Parameters
[in]profileStream profile going to allocate.
[in]originalOriginal frame.
[in]frame_typeWhich frame type are going to create.
Returns
The allocated frame

Definition at line 56 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::stream_profile::get(), rs2::frame::get(), rs2::error::handle(), and rs2_allocate_synthetic_motion_frame().

◆ allocate_motion_frame() [2/2]

frame rs2::frame_source::allocate_motion_frame ( const stream_profile &  profile,
const frame &  original,
rs2_extension  frame_type = RS2_EXTENSION_MOTION_FRAME 
) const
inline

Allocate a new motion frame with given params.

Parameters
[in]profileStream profile going to allocate.
[in]originalOriginal frame.
[in]frame_typeWhich frame type are going to create.
Returns
The allocated frame

Definition at line 56 of file 9.2/sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::stream_profile::get(), rs2::frame::get(), rs2::error::handle(), and rs2_allocate_synthetic_motion_frame().

◆ allocate_points() [1/2]

frame rs2::frame_source::allocate_points ( const stream_profile &  profile,
const frame &  original 
) const
inline

◆ allocate_points() [2/2]

frame rs2::frame_source::allocate_points ( const stream_profile &  profile,
const frame &  original 
) const
inline

◆ allocate_video_frame() [1/2]

frame rs2::frame_source::allocate_video_frame ( const stream_profile &  profile,
const frame &  original,
int  new_bpp = 0,
int  new_width = 0,
int  new_height = 0,
int  new_stride = 0,
rs2_extension  frame_type = RS2_EXTENSION_VIDEO_FRAME 
) const
inline

Allocate a new video frame with given params.

Parameters
[in]profileStream profile going to allocate.
[in]originalOriginal frame, if new_bpp, new_width, new_height or new_stride is zero, newly created frame will base on original frame's metadata to allocate new frame. If frame_type is RS2_EXTENSION_DEPTH_FRAME, the original of the returned frame will be set to it.
[in]new_bppFrame bit per pixel to create.
[in]new_widthFrame width to create.
[in]new_heightFrame height to create.
[in]new_strideFrame stride to create.
[in]frame_typeWhich frame type are going to create.
Returns
The allocated frame

Definition at line 33 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::stream_profile::get(), rs2::frame::get(), rs2::error::handle(), and rs2_allocate_synthetic_video_frame().

◆ allocate_video_frame() [2/2]

frame rs2::frame_source::allocate_video_frame ( const stream_profile &  profile,
const frame &  original,
int  new_bpp = 0,
int  new_width = 0,
int  new_height = 0,
int  new_stride = 0,
rs2_extension  frame_type = RS2_EXTENSION_VIDEO_FRAME 
) const
inline

Allocate a new video frame with given params.

Parameters
[in]profileStream profile going to allocate.
[in]originalOriginal frame, if new_bpp, new_width, new_height or new_stride is zero, newly created frame will base on original frame's metadata to allocate new frame. If frame_type is RS2_EXTENSION_DEPTH_FRAME, the original of the returned frame will be set to it.
[in]new_bppFrame bit per pixel to create.
[in]new_widthFrame width to create.
[in]new_heightFrame height to create.
[in]new_strideFrame stride to create.
[in]frame_typeWhich frame type are going to create.
Returns
The allocated frame

Definition at line 33 of file 9.2/sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::stream_profile::get(), rs2::frame::get(), rs2::error::handle(), and rs2_allocate_synthetic_video_frame().

◆ frame_ready() [1/2]

void rs2::frame_source::frame_ready ( frame  result) const
inline

Invoke the callback funtion informing the frame is ready.

Parameters
[in]framesframe to send to callback function.

Definition at line 99 of file 9.2/sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::frame::get(), rs2::error::handle(), and rs2_synthetic_frame_ready().

◆ frame_ready() [2/2]

void rs2::frame_source::frame_ready ( frame  result) const
inline

Invoke the callback funtion informing the frame is ready.

Parameters
[in]framesframe to send to callback function.

Definition at line 99 of file sources/libs/ds3d/3rdparty/realsense2/include/librealsense2/hpp/rs_processing.hpp.

References _source, rs2::frame::get(), rs2::error::handle(), and rs2_synthetic_frame_ready().

Friends And Related Function Documentation

◆ frame_processor_callback [1/2]

◆ frame_processor_callback [2/2]

Field Documentation

◆ _source


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