Class processing_block

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class processing_block : public rs2::options

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.

Subclassed by rs2::asynchronous_syncer, rs2::filter

Public Functions

template<class S>
inline void start(S on_frame)

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

Parameters:

on_frame[in] callback function for notifying the frame to be processed is ready.

template<class S>
inline S &operator>>(S &on_frame)

Does the same thing as “start” function

Parameters:

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

Returns:

address of callback function.

inline void invoke(frame f) const

Ask processing block to process the frame

Parameters:

on_frame[in] frame to be processed.

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

constructor with already created low level processing block assigned.

Parameters:

block[in] - low level rs2_processing_block created before.

template<class S>
inline processing_block(S processing_function)

constructor with callback function on_frame in rs2_frame_processor_callback structure assigned.

Parameters:

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

inline operator rs2_options*() const
inline rs2_processing_block *get() const
inline bool supports(rs2_camera_info info) const

Check if a specific camera info field is supported.

Parameters:

info[in] the parameter to check for support

Returns:

true if the parameter both exists and well-defined for the specific processing_block

inline const char *get_info(rs2_camera_info info) const

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

Parameters:

info[in] camera info type to retrieve

Returns:

the requested camera info string, in a format specific to the processing_block model

inline bool supports(rs2_option option) const

check if particular option is supported

Parameters:

option[in] option id to be checked

Returns:

true if option is supported

Protected Functions

inline void register_simple_option(rs2_option option_id, option_range range)

Protected Attributes

std::shared_ptr<rs2_processing_block> _block