NVIDIA DeepStream SDK API Reference

9.2 Release
rs2::processing_block Class Reference

Detailed Description

Define the processing block flow, inherit this class to generate your own processing_block.

Please refer to the viewer class in examples.hpp for a detailed usage example.

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

Inheritance diagram for rs2::processing_block:
Collaboration diagram for rs2::processing_block:

Public Member Functions

template<class S >
void start (S on_frame)
 Start the processing block with callback function on_frame to inform the application the frame is processed. More...
 
template<class S >
S & operator>> (S &on_frame)
 Does the same thing as "start" function. More...
 
void invoke (frame f) const
 Ask processing block to process the frame. More...
 
 processing_block (std::shared_ptr< rs2_processing_block > block)
 constructor with already created low level processing block assigned. More...
 
template<class S >
 processing_block (S processing_function)
 constructor with callback function on_frame in rs2_frame_processor_callback structure assigned. More...
 
 operator rs2_options * () const
 
rs2_processing_block * get () const
 
bool supports (rs2_camera_info info) const
 Check if a specific camera info field is supported. More...
 
const char * get_info (rs2_camera_info info) const
 Retrieve camera specific information, like versions of various internal components. More...
 
template<class S >
void start (S on_frame)
 Start the processing block with callback function on_frame to inform the application the frame is processed. More...
 
template<class S >
S & operator>> (S &on_frame)
 Does the same thing as "start" function. More...
 
void invoke (frame f) const
 Ask processing block to process the frame. More...
 
 processing_block (std::shared_ptr< rs2_processing_block > block)
 constructor with already created low level processing block assigned. More...
 
template<class S >
 processing_block (S processing_function)
 constructor with callback function on_frame in rs2_frame_processor_callback structure assigned. More...
 
 operator rs2_options * () const
 
rs2_processing_block * get () const
 
bool supports (rs2_camera_info info) const
 Check if a specific camera info field is supported. More...
 
const char * get_info (rs2_camera_info info) const
 Retrieve camera specific information, like versions of various internal components. More...
 
bool supports (rs2_option option) const
 check if particular option is supported More...
 
bool supports (rs2_option option) const
 check if particular option is supported More...
 
bool supports (rs2_option option) const
 check if particular option is supported More...
 
bool supports (rs2_option option) const
 check if particular option is supported More...
 
bool supports (rs2_option option) const
 check if particular option is supported More...
 
const char * get_option_description (rs2_option option) const
 get option description More...
 
const char * get_option_description (rs2_option option) const
 get option description More...
 
const char * get_option_name (rs2_option option) const
 get option name More...
 
const char * get_option_name (rs2_option option) const
 get option name More...
 
const char * get_option_value_description (rs2_option option, float val) const
 get option value description (in case specific option value hold special meaning) More...
 
const char * get_option_value_description (rs2_option option, float val) const
 get option value description (in case specific option value hold special meaning) More...
 
float get_option (rs2_option option) const
 read option's value More...
 
float get_option (rs2_option option) const
 read option's value More...
 
option_range get_option_range (rs2_option option) const
 retrieve the available range of values of a supported option More...
 
option_range get_option_range (rs2_option option) const
 retrieve the available range of values of a supported option More...
 
void set_option (rs2_option option, float value) const
 write new value to the option More...
 
void set_option (rs2_option option, float value) const
 write new value to the option More...
 
bool is_option_read_only (rs2_option option) const
 check if particular option is read-only More...
 
bool is_option_read_only (rs2_option option) const
 check if particular option is read-only More...
 
std::vector< rs2_option > get_supported_options ()
 
std::vector< rs2_option > get_supported_options ()
 

Protected Member Functions

void register_simple_option (rs2_option option_id, option_range range)
 
void register_simple_option (rs2_option option_id, option_range range)
 

Protected Attributes

std::shared_ptr< rs2_processing_block > _block
 

Constructor & Destructor Documentation

◆ processing_block() [1/4]

rs2::processing_block::processing_block ( std::shared_ptr< rs2_processing_block >  block)
inline

constructor with already created low level processing block assigned.

Parameters
[in]block- low level rs2_processing_block created before.

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

◆ processing_block() [2/4]

template<class S >
rs2::processing_block::processing_block ( S  processing_function)
inline

constructor with callback function on_frame in rs2_frame_processor_callback structure assigned.

Parameters
[in]processing_function- function pointer of on_frame function in rs2_frame_processor_callback structure, which will be called back by invoke function .

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

References _block, rs2::error::handle(), rs2::options::operator=(), rs2_create_processing_block(), and rs2_delete_processing_block().

◆ processing_block() [3/4]

rs2::processing_block::processing_block ( std::shared_ptr< rs2_processing_block >  block)
inline

constructor with already created low level processing block assigned.

Parameters
[in]block- low level rs2_processing_block created before.

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

◆ processing_block() [4/4]

template<class S >
rs2::processing_block::processing_block ( S  processing_function)
inline

constructor with callback function on_frame in rs2_frame_processor_callback structure assigned.

Parameters
[in]processing_function- function pointer of on_frame function in rs2_frame_processor_callback structure, which will be called back by invoke function .

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

References _block, rs2::error::handle(), rs2::options::operator=(), rs2_create_processing_block(), and rs2_delete_processing_block().

Member Function Documentation

◆ get() [1/2]

rs2_processing_block* rs2::processing_block::get ( ) const
inline

◆ get() [2/2]

rs2_processing_block* rs2::processing_block::get ( ) const
inline

◆ get_info() [1/2]

const char* rs2::processing_block::get_info ( rs2_camera_info  info) const
inline

Retrieve camera specific information, like versions of various internal components.

Parameters
[in]infocamera info type to retrieve
Returns
the requested camera info string, in a format specific to the processing_block model

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

References _block, rs2::error::handle(), and rs2_get_processing_block_info().

◆ get_info() [2/2]

const char* rs2::processing_block::get_info ( rs2_camera_info  info) const
inline

Retrieve camera specific information, like versions of various internal components.

Parameters
[in]infocamera info type to retrieve
Returns
the requested camera info string, in a format specific to the processing_block model

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

References _block, rs2::error::handle(), and rs2_get_processing_block_info().

◆ get_option() [1/2]

float rs2::options::get_option ( rs2_option  option) const
inlineinherited

read option's value

Parameters
[in]optionoption id to be queried
Returns
value of the option

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

References rs2::error::handle(), and rs2_get_option().

◆ get_option() [2/2]

float rs2::options::get_option ( rs2_option  option) const
inlineinherited

read option's value

Parameters
[in]optionoption id to be queried
Returns
value of the option

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

References rs2::error::handle(), and rs2_get_option().

◆ get_option_description() [1/2]

const char* rs2::options::get_option_description ( rs2_option  option) const
inlineinherited

get option description

Parameters
[in]optionoption id to be checked
Returns
human-readable option description

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

References rs2::error::handle(), and rs2_get_option_description().

◆ get_option_description() [2/2]

const char* rs2::options::get_option_description ( rs2_option  option) const
inlineinherited

get option description

Parameters
[in]optionoption id to be checked
Returns
human-readable option description

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

References rs2::error::handle(), and rs2_get_option_description().

◆ get_option_name() [1/2]

const char* rs2::options::get_option_name ( rs2_option  option) const
inlineinherited

get option name

Parameters
[in]optionoption id to be checked
Returns
human-readable option name

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

References rs2::error::handle(), and rs2_get_option_name().

◆ get_option_name() [2/2]

const char* rs2::options::get_option_name ( rs2_option  option) const
inlineinherited

get option name

Parameters
[in]optionoption id to be checked
Returns
human-readable option name

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

References rs2::error::handle(), and rs2_get_option_name().

◆ get_option_range() [1/2]

option_range rs2::options::get_option_range ( rs2_option  option) const
inlineinherited

retrieve the available range of values of a supported option

Returns
option range containing minimum and maximum values, step and default value

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

References rs2::option_range::def, rs2::error::handle(), rs2::option_range::max, rs2::option_range::min, rs2_get_option_range(), and rs2::option_range::step.

◆ get_option_range() [2/2]

option_range rs2::options::get_option_range ( rs2_option  option) const
inlineinherited

retrieve the available range of values of a supported option

Returns
option range containing minimum and maximum values, step and default value

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

References rs2::option_range::def, rs2::error::handle(), rs2::option_range::max, rs2::option_range::min, rs2_get_option_range(), and rs2::option_range::step.

◆ get_option_value_description() [1/2]

const char* rs2::options::get_option_value_description ( rs2_option  option,
float  val 
) const
inlineinherited

get option value description (in case specific option value hold special meaning)

Parameters
[in]optionoption id to be checked
[in]valvalue of the option
Returns
human-readable description of a specific value of an option or null if no special meaning

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

References rs2::error::handle(), rs2_get_option_value_description(), and val.

◆ get_option_value_description() [2/2]

const char* rs2::options::get_option_value_description ( rs2_option  option,
float  val 
) const
inlineinherited

get option value description (in case specific option value hold special meaning)

Parameters
[in]optionoption id to be checked
[in]valvalue of the option
Returns
human-readable description of a specific value of an option or null if no special meaning

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

References rs2::error::handle(), rs2_get_option_value_description(), and val.

◆ get_supported_options() [1/2]

◆ get_supported_options() [2/2]

◆ invoke() [1/2]

void rs2::processing_block::invoke ( frame  f) const
inline

Ask processing block to process the frame.

Parameters
[in]on_frameframe to be processed.

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

References get(), rs2::error::handle(), rs2_process_frame(), and absl::swap_internal::swap().

Referenced by rs2::syncer::operator()(), and rs2::filter::process().

◆ invoke() [2/2]

void rs2::processing_block::invoke ( frame  f) const
inline

Ask processing block to process the frame.

Parameters
[in]on_frameframe to be processed.

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

References get(), rs2::error::handle(), rs2_process_frame(), and absl::swap_internal::swap().

◆ is_option_read_only() [1/2]

bool rs2::options::is_option_read_only ( rs2_option  option) const
inlineinherited

check if particular option is read-only

Parameters
[in]optionoption id to be checked
Returns
true if option is read-only

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

References rs2::error::handle(), and rs2_is_option_read_only().

◆ is_option_read_only() [2/2]

bool rs2::options::is_option_read_only ( rs2_option  option) const
inlineinherited

check if particular option is read-only

Parameters
[in]optionoption id to be checked
Returns
true if option is read-only

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

References rs2::error::handle(), and rs2_is_option_read_only().

◆ operator rs2_options *() [1/2]

rs2::processing_block::operator rs2_options * ( ) const
inline

◆ operator rs2_options *() [2/2]

rs2::processing_block::operator rs2_options * ( ) const
inline

◆ operator>>() [1/2]

template<class S >
S& rs2::processing_block::operator>> ( S &  on_frame)
inline

Does the same thing as "start" function.

Parameters
[in]on_frameaddress of callback function for noticing the frame to be processed is ready.
Returns
address of callback function.

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

References start().

◆ operator>>() [2/2]

template<class S >
S& rs2::processing_block::operator>> ( S &  on_frame)
inline

Does the same thing as "start" function.

Parameters
[in]on_frameaddress of callback function for noticing the frame to be processed is ready.
Returns
address of callback function.

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

References start().

◆ register_simple_option() [1/2]

◆ register_simple_option() [2/2]

◆ set_option() [1/2]

◆ set_option() [2/2]

void rs2::options::set_option ( rs2_option  option,
float  value 
) const
inlineinherited

write new value to the option

Parameters
[in]optionoption id to be queried
[in]valuenew value for the option

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

References rs2::error::handle(), and rs2_set_option().

◆ start() [1/2]

template<class S >
void rs2::processing_block::start ( S  on_frame)
inline

Start the processing block with callback function on_frame to inform the application the frame is processed.

Parameters
[in]on_framecallback function for notifying the frame to be processed is ready.

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

References get(), rs2::error::handle(), and rs2_start_processing().

Referenced by rs2::filter::filter(), operator>>(), and rs2::syncer::syncer().

◆ start() [2/2]

template<class S >
void rs2::processing_block::start ( S  on_frame)
inline

Start the processing block with callback function on_frame to inform the application the frame is processed.

Parameters
[in]on_framecallback function for notifying the frame to be processed is ready.

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

References get(), rs2::error::handle(), and rs2_start_processing().

◆ supports() [1/7]

bool rs2::processing_block::supports ( rs2_camera_info  info) const
inline

Check if a specific camera info field is supported.

Parameters
[in]infothe parameter to check for support
Returns
true if the parameter both exists and well-defined for the specific processing_block

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

References _block, rs2::error::handle(), and rs2_supports_processing_block_info().

◆ supports() [2/7]

bool rs2::processing_block::supports ( rs2_camera_info  info) const
inline

Check if a specific camera info field is supported.

Parameters
[in]infothe parameter to check for support
Returns
true if the parameter both exists and well-defined for the specific processing_block

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

References _block, rs2::error::handle(), and rs2_supports_processing_block_info().

◆ supports() [3/7]

bool rs2::options::supports ( rs2_option  option) const
inlineinherited

check if particular option is supported

Parameters
[in]optionoption id to be checked
Returns
true if option is supported

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

References rs2::error::handle(), and rs2_supports_option().

◆ supports() [4/7]

bool rs2::options::supports
inline

check if particular option is supported

Parameters
[in]optionoption id to be checked
Returns
true if option is supported

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

◆ supports() [5/7]

bool rs2::options::supports
inline

check if particular option is supported

Parameters
[in]optionoption id to be checked
Returns
true if option is supported

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

◆ supports() [6/7]

bool rs2::options::supports
inline

check if particular option is supported

Parameters
[in]optionoption id to be checked
Returns
true if option is supported

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

◆ supports() [7/7]

bool rs2::options::supports
inline

check if particular option is supported

Parameters
[in]optionoption id to be checked
Returns
true if option is supported

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

Field Documentation

◆ _block


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