NVIDIA DeepStream SDK API Reference

9.2 Release
rs2::frameset Class Reference

Detailed Description

Inheritance diagram for rs2::frameset:
Collaboration diagram for rs2::frameset:

Data Structures

class  iterator
 

Public Member Functions

 frameset ()
 Extends the frame class with additional frameset related attributes and functions. More...
 
 frameset (const frame &f)
 Extends the frame class with additional frameset related attributes and functions. More...
 
frame first_or_default (rs2_stream s, rs2_format f=RS2_FORMAT_ANY) const
 Retrieve the first frame of a specific stream and optionally with a specific format. More...
 
frame first (rs2_stream s, rs2_format f=RS2_FORMAT_ANY) const
 Retrieve the first frame of a specific stream type and optionally with a specific format. More...
 
depth_frame get_depth_frame () const
 Retrieve the first depth frame, if no frame is found, return an empty frame instance. More...
 
video_frame get_color_frame () const
 Retrieve the first color frame, if no frame is found, search for the color frame from IR stream. More...
 
video_frame get_infrared_frame (const size_t index=0) const
 Retrieve the first infrared frame, if no frame is found, return an empty frame instance. More...
 
video_frame get_fisheye_frame (const size_t index=0) const
 Retrieve the fisheye monochrome video frame. More...
 
pose_frame get_pose_frame (const size_t index=0) const
 Retrieve the pose frame. More...
 
size_t size () const
 Return the size of the frameset. More...
 
template<class T >
void foreach_rs (T action) const
 Template function, extract internal frame handles from the frameset and invoke the action function. More...
 
frame operator[] (size_t index) const
 Bracket operator retrieves back the frame from frameset using arrary notation. More...
 
iterator begin () const
 
iterator end () const
 
 frameset ()
 Extends the frame class with additional frameset related attributes and functions. More...
 
 frameset (const frame &f)
 Extends the frame class with additional frameset related attributes and functions. More...
 
frame first_or_default (rs2_stream s, rs2_format f=RS2_FORMAT_ANY) const
 Retrieve the first frame of a specific stream and optionally with a specific format. More...
 
frame first (rs2_stream s, rs2_format f=RS2_FORMAT_ANY) const
 Retrieve the first frame of a specific stream type and optionally with a specific format. More...
 
depth_frame get_depth_frame () const
 Retrieve the first depth frame, if no frame is found, return an empty frame instance. More...
 
video_frame get_color_frame () const
 Retrieve the first color frame, if no frame is found, search for the color frame from IR stream. More...
 
video_frame get_infrared_frame (const size_t index=0) const
 Retrieve the first infrared frame, if no frame is found, return an empty frame instance. More...
 
video_frame get_fisheye_frame (const size_t index=0) const
 Retrieve the fisheye monochrome video frame. More...
 
pose_frame get_pose_frame (const size_t index=0) const
 Retrieve the pose frame. More...
 
size_t size () const
 Return the size of the frameset. More...
 
template<class T >
void foreach_rs (T action) const
 Template function, extract internal frame handles from the frameset and invoke the action function. More...
 
frame operator[] (size_t index) const
 Bracket operator retrieves back the frame from frameset using arrary notation. More...
 
iterator begin () const
 
iterator end () const
 
void swap (frame &other)
 Swap the internal frame handle with the one in parameter. More...
 
void swap (frame &other)
 Swap the internal frame handle with the one in parameter. More...
 
void keep ()
 keep the frame, otherwise if no refernce to the frame, the frame will be released. More...
 
void keep ()
 keep the frame, otherwise if no refernce to the frame, the frame will be released. More...
 
 operator bool () const
 Parenthesis operator check if internal frame handle is valid. More...
 
 operator bool () const
 Parenthesis operator check if internal frame handle is valid. More...
 
rs2_sensor * get_sensor ()
 
rs2_sensor * get_sensor ()
 
double get_timestamp () const
 retrieve the time at which the frame was captured During the frame's lifetime it receives timestamps both at the device and host levels. More...
 
double get_timestamp () const
 retrieve the time at which the frame was captured During the frame's lifetime it receives timestamps both at the device and host levels. More...
 
rs2_timestamp_domain get_frame_timestamp_domain () const
 retrieve the timestamp domain More...
 
rs2_timestamp_domain get_frame_timestamp_domain () const
 retrieve the timestamp domain More...
 
rs2_metadata_type get_frame_metadata (rs2_frame_metadata_value frame_metadata) const
 retrieve the current value of a single frame_metadata More...
 
rs2_metadata_type get_frame_metadata (rs2_frame_metadata_value frame_metadata) const
 retrieve the current value of a single frame_metadata More...
 
bool supports_frame_metadata (rs2_frame_metadata_value frame_metadata) const
 determine if the device allows a specific metadata to be queried More...
 
bool supports_frame_metadata (rs2_frame_metadata_value frame_metadata) const
 determine if the device allows a specific metadata to be queried More...
 
unsigned long long get_frame_number () const
 retrieve frame number (from frame handle) More...
 
unsigned long long get_frame_number () const
 retrieve frame number (from frame handle) More...
 
const int get_data_size () const
 retrieve data size from frame handle More...
 
const int get_data_size () const
 retrieve data size from frame handle More...
 
const void * get_data () const
 retrieve data from frame handle More...
 
const void * get_data () const
 retrieve data from frame handle More...
 
stream_profile get_profile () const
 retrieve stream profile from frame handle More...
 
stream_profile get_profile () const
 retrieve stream profile from frame handle More...
 
template<class T >
bool is () const
 Template function, checking if current instance is the type of another class. More...
 
template<class T >
bool is () const
 Template function, checking if current instance is the type of another class. More...
 
template<class T >
T as () const
 Template function, cast current instance as the type of another class. More...
 
template<class T >
T as () const
 Template function, cast current instance as the type of another class. More...
 
rs2_frame * get () const
 Retrieve back the internal frame handle. More...
 
rs2_frame * get () const
 Retrieve back the internal frame handle. More...
 
 operator rs2_frame * ()
 
 operator rs2_frame * ()
 
frame apply_filter (filter_interface &filter)
 
frame apply_filter (filter_interface &filter)
 

Protected Member Functions

void add_ref () const
 add additional reference to a frame without duplicating frame data More...
 
void add_ref () const
 add additional reference to a frame without duplicating frame data More...
 
void reset ()
 
void reset ()
 

Constructor & Destructor Documentation

◆ frameset() [1/4]

rs2::frameset::frameset ( )
inline

Extends the frame class with additional frameset related attributes and functions.

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

◆ frameset() [2/4]

rs2::frameset::frameset ( const frame &  f)
inline

Extends the frame class with additional frameset related attributes and functions.

Parameters
[in]frame- existing frame instance

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

References rs2::frame::get(), rs2::error::handle(), rs2::frame::reset(), rs2_embedded_frames_count(), RS2_EXTENSION_COMPOSITE_FRAME, and rs2_is_frame_extendable_to().

◆ frameset() [3/4]

rs2::frameset::frameset ( )
inline

Extends the frame class with additional frameset related attributes and functions.

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

◆ frameset() [4/4]

rs2::frameset::frameset ( const frame &  f)
inline

Extends the frame class with additional frameset related attributes and functions.

Parameters
[in]frame- existing frame instance

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

References rs2::frame::get(), rs2::error::handle(), rs2::frame::reset(), rs2_embedded_frames_count(), RS2_EXTENSION_COMPOSITE_FRAME, and rs2_is_frame_extendable_to().

Member Function Documentation

◆ add_ref() [1/2]

void rs2::frame::add_ref ( ) const
inlineprotectedinherited

add additional reference to a frame without duplicating frame data

Parameters
[out]resultnew frame reference, release by destructor
Returns
true if cloning was successful

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

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

Referenced by rs2::frame::frame().

◆ add_ref() [2/2]

void rs2::frame::add_ref ( ) const
inlineprotectedinherited

add additional reference to a frame without duplicating frame data

Parameters
[out]resultnew frame reference, release by destructor
Returns
true if cloning was successful

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

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

◆ apply_filter() [1/2]

frame rs2::frame::apply_filter ( filter_interface &  filter)
inlineinherited

◆ apply_filter() [2/2]

frame rs2::frame::apply_filter ( filter_interface &  filter)
inlineinherited

◆ as() [1/2]

template<class T >
T rs2::frame::as ( ) const
inlineinherited

Template function, cast current instance as the type of another class.

Returns
class instance.

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

Referenced by get_pose_frame().

◆ as() [2/2]

template<class T >
T rs2::frame::as ( ) const
inlineinherited

Template function, cast current instance as the type of another class.

Returns
class instance.

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

◆ begin() [1/2]

iterator rs2::frameset::begin ( ) const
inline

◆ begin() [2/2]

iterator rs2::frameset::begin ( ) const
inline

◆ end() [1/2]

iterator rs2::frameset::end ( ) const
inline

◆ end() [2/2]

iterator rs2::frameset::end ( ) const
inline

◆ first() [1/2]

frame rs2::frameset::first ( rs2_stream  s,
rs2_format  f = RS2_FORMAT_ANY 
) const
inline

Retrieve the first frame of a specific stream type and optionally with a specific format.

If no frame is found, an error will be thrown.

Parameters
[in]rs2_streams - frame to be retrieved from this stream type.
[in]rs2_formatf - frame to be retrieved from this format type.
Returns
frame - first found frame with s stream type.

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

References first_or_default().

◆ first() [2/2]

frame rs2::frameset::first ( rs2_stream  s,
rs2_format  f = RS2_FORMAT_ANY 
) const
inline

Retrieve the first frame of a specific stream type and optionally with a specific format.

If no frame is found, an error will be thrown.

Parameters
[in]rs2_streams - frame to be retrieved from this stream type.
[in]rs2_formatf - frame to be retrieved from this format type.
Returns
frame - first found frame with s stream type.

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

References first_or_default().

◆ first_or_default() [1/2]

frame rs2::frameset::first_or_default ( rs2_stream  s,
rs2_format  f = RS2_FORMAT_ANY 
) const
inline

Retrieve the first frame of a specific stream and optionally with a specific format.

If no frame is found, return an empty frame instance.

Parameters
[in]rs2_streams - frame to be retrieved from this stream type.
[in]rs2_formatf - frame to be retrieved from this format type.
Returns
frame - first found frame with s stream type.

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

References foreach_rs(), rs2::stream_profile::format(), rs2::frame::get_profile(), RS2_FORMAT_ANY, and rs2::stream_profile::stream_type().

Referenced by first(), get_color_frame(), get_depth_frame(), get_fisheye_frame(), get_infrared_frame(), and get_pose_frame().

◆ first_or_default() [2/2]

frame rs2::frameset::first_or_default ( rs2_stream  s,
rs2_format  f = RS2_FORMAT_ANY 
) const
inline

Retrieve the first frame of a specific stream and optionally with a specific format.

If no frame is found, return an empty frame instance.

Parameters
[in]rs2_streams - frame to be retrieved from this stream type.
[in]rs2_formatf - frame to be retrieved from this format type.
Returns
frame - first found frame with s stream type.

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

References foreach_rs(), and RS2_FORMAT_ANY.

◆ foreach_rs() [1/2]

template<class T >
void rs2::frameset::foreach_rs ( T  action) const
inline

Template function, extract internal frame handles from the frameset and invoke the action function.

Parameters
[in]action- instance with () operator implemented will be invoke after frame extraction.

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

References rs2::frame::frame(), rs2::frame::get(), rs2::error::handle(), rs2_extract_frame(), and size().

Referenced by first_or_default(), get_fisheye_frame(), get_infrared_frame(), and get_pose_frame().

◆ foreach_rs() [2/2]

template<class T >
void rs2::frameset::foreach_rs ( T  action) const
inline

Template function, extract internal frame handles from the frameset and invoke the action function.

Parameters
[in]action- instance with () operator implemented will be invoke after frame extraction.

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

References rs2::frame::frame(), rs2::frame::get(), rs2::error::handle(), rs2_extract_frame(), and size().

◆ get() [1/2]

◆ get() [2/2]

rs2_frame* rs2::frame::get ( ) const
inlineinherited

Retrieve back the internal frame handle.

Returns
rs2_frame - internal frame handle.

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

◆ get_color_frame() [1/2]

video_frame rs2::frameset::get_color_frame ( ) const
inline

Retrieve the first color frame, if no frame is found, search for the color frame from IR stream.

If one still can't be found, return an empty frame instance.

Returns
video_frame - first found color frame.

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

References first_or_default(), RS2_FORMAT_RGB8, RS2_STREAM_COLOR, and RS2_STREAM_INFRARED.

◆ get_color_frame() [2/2]

video_frame rs2::frameset::get_color_frame ( ) const
inline

Retrieve the first color frame, if no frame is found, search for the color frame from IR stream.

If one still can't be found, return an empty frame instance.

Returns
video_frame - first found color frame.

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

References first_or_default(), RS2_FORMAT_RGB8, RS2_STREAM_COLOR, and RS2_STREAM_INFRARED.

◆ get_data() [1/2]

const void* rs2::frame::get_data ( ) const
inlineinherited

retrieve data from frame handle

Returns
the pointer to the start of the frame data

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

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

Referenced by rs2::motion_frame::get_motion_data().

◆ get_data() [2/2]

const void* rs2::frame::get_data ( ) const
inlineinherited

retrieve data from frame handle

Returns
the pointer to the start of the frame data

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

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

◆ get_data_size() [1/2]

const int rs2::frame::get_data_size ( ) const
inlineinherited

retrieve data size from frame handle

Returns
the number of bytes in frame

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

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

◆ get_data_size() [2/2]

const int rs2::frame::get_data_size ( ) const
inlineinherited

retrieve data size from frame handle

Returns
the number of bytes in frame

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

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

◆ get_depth_frame() [1/2]

depth_frame rs2::frameset::get_depth_frame ( ) const
inline

Retrieve the first depth frame, if no frame is found, return an empty frame instance.

Returns
depth_frame - first found depth frame.

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

References first_or_default(), RS2_FORMAT_Z16, and RS2_STREAM_DEPTH.

◆ get_depth_frame() [2/2]

depth_frame rs2::frameset::get_depth_frame ( ) const
inline

Retrieve the first depth frame, if no frame is found, return an empty frame instance.

Returns
depth_frame - first found depth frame.

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

References first_or_default(), RS2_FORMAT_Z16, and RS2_STREAM_DEPTH.

◆ get_fisheye_frame() [1/2]

video_frame rs2::frameset::get_fisheye_frame ( const size_t  index = 0) const
inline

Retrieve the fisheye monochrome video frame.

Parameters
[in]size_tindex
Returns
video_frame - the fisheye frame denoted by index.

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

References first_or_default(), foreach_rs(), and RS2_STREAM_FISHEYE.

◆ get_fisheye_frame() [2/2]

video_frame rs2::frameset::get_fisheye_frame ( const size_t  index = 0) const
inline

Retrieve the fisheye monochrome video frame.

Parameters
[in]size_tindex
Returns
video_frame - the fisheye frame denoted by index.

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

References first_or_default(), foreach_rs(), rs2::frame::get_profile(), RS2_STREAM_FISHEYE, rs2::stream_profile::stream_index(), and rs2::stream_profile::stream_type().

◆ get_frame_metadata() [1/2]

rs2_metadata_type rs2::frame::get_frame_metadata ( rs2_frame_metadata_value  frame_metadata) const
inlineinherited

retrieve the current value of a single frame_metadata

Parameters
[in]frame_metadatathe frame_metadata whose value should be retrieved
Returns
the value of the frame_metadata

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

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

◆ get_frame_metadata() [2/2]

rs2_metadata_type rs2::frame::get_frame_metadata ( rs2_frame_metadata_value  frame_metadata) const
inlineinherited

retrieve the current value of a single frame_metadata

Parameters
[in]frame_metadatathe frame_metadata whose value should be retrieved
Returns
the value of the frame_metadata

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

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

◆ get_frame_number() [1/2]

unsigned long long rs2::frame::get_frame_number ( ) const
inlineinherited

retrieve frame number (from frame handle)

Returns
the frame number of the frame, in milliseconds since the device was started

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

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

◆ get_frame_number() [2/2]

unsigned long long rs2::frame::get_frame_number ( ) const
inlineinherited

retrieve frame number (from frame handle)

Returns
the frame number of the frame, in milliseconds since the device was started

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

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

◆ get_frame_timestamp_domain() [1/2]

rs2_timestamp_domain rs2::frame::get_frame_timestamp_domain ( ) const
inlineinherited

retrieve the timestamp domain

Returns
timestamp domain (clock name) for timestamp values

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

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

◆ get_frame_timestamp_domain() [2/2]

rs2_timestamp_domain rs2::frame::get_frame_timestamp_domain ( ) const
inlineinherited

retrieve the timestamp domain

Returns
timestamp domain (clock name) for timestamp values

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

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

◆ get_infrared_frame() [1/2]

video_frame rs2::frameset::get_infrared_frame ( const size_t  index = 0) const
inline

Retrieve the first infrared frame, if no frame is found, return an empty frame instance.

Parameters
[in]size_tindex
Returns
video_frame - first found infrared frame.

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

References first_or_default(), foreach_rs(), and RS2_STREAM_INFRARED.

◆ get_infrared_frame() [2/2]

video_frame rs2::frameset::get_infrared_frame ( const size_t  index = 0) const
inline

Retrieve the first infrared frame, if no frame is found, return an empty frame instance.

Parameters
[in]size_tindex
Returns
video_frame - first found infrared frame.

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

References first_or_default(), foreach_rs(), rs2::frame::get_profile(), RS2_STREAM_INFRARED, rs2::stream_profile::stream_index(), and rs2::stream_profile::stream_type().

◆ get_pose_frame() [1/2]

pose_frame rs2::frameset::get_pose_frame ( const size_t  index = 0) const
inline

Retrieve the pose frame.

Parameters
[in]size_tindex
Returns
pose_frame - the sensor's positional data

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

References first_or_default(), foreach_rs(), and RS2_STREAM_POSE.

◆ get_pose_frame() [2/2]

pose_frame rs2::frameset::get_pose_frame ( const size_t  index = 0) const
inline

◆ get_profile() [1/2]

stream_profile rs2::frame::get_profile ( ) const
inlineinherited

retrieve stream profile from frame handle

Returns
stream_profile - the pointer to the stream profile

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

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

◆ get_profile() [2/2]

stream_profile rs2::frame::get_profile ( ) const
inlineinherited

retrieve stream profile from frame handle

Returns
stream_profile - the pointer to the stream profile

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

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

Referenced by first_or_default(), get_fisheye_frame(), get_infrared_frame(), get_pose_frame(), and rs2::pointcloud::map_to().

◆ get_sensor() [1/2]

rs2_sensor* rs2::frame::get_sensor ( )
inlineinherited

◆ get_sensor() [2/2]

rs2_sensor* rs2::frame::get_sensor ( )
inlineinherited

◆ get_timestamp() [1/2]

double rs2::frame::get_timestamp ( ) const
inlineinherited

retrieve the time at which the frame was captured During the frame's lifetime it receives timestamps both at the device and host levels.

The different timestamps are gathered and managed under the frame's Metadata attributes. Chronologically the list of timestamps comprises of: SENSOR_TIMESTAMP - Device clock. For video sensors designates the middle of exposure. Requires metadata support. FRAME_TIMESTAMP - Device clock. Stamped at the beginning of frame readout and transfer. Requires metadata support. BACKEND_TIMESTAMP - Host (EPOCH) clock in Kernel space. Frame transfer from USB Controller to the USB Driver. TIME_OF_ARRIVAL - Host (EPOCH) clock in User space. Frame transfer from the USB Driver to Librealsense.

During runtime the SDK dynamically selects the most correct representaion, based on both device and host capabilities: In case the frame metadata is not configured:

  • The function call provides the TIME_OF_ARRIVAL stamp. In case the metadata is available the function returns:
  • HW Timestamp (FRAME_TIMESTAMP), or
  • Global Timestamp Host-corrected derivative of HW Timestamp required for multi-sensor/device synchronization
  • The user can select between the unmodified and the host-calculated Hardware Timestamp by toggling the RS2_OPTION_GLOBAL_TIME_ENABLED option. To query which of the three alternatives is active use get_frame_timestamp_domain() function call
    Returns
    the timestamp of the frame, in milliseconds according to the elaborated flow

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

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

◆ get_timestamp() [2/2]

double rs2::frame::get_timestamp ( ) const
inlineinherited

retrieve the time at which the frame was captured During the frame's lifetime it receives timestamps both at the device and host levels.

The different timestamps are gathered and managed under the frame's Metadata attributes. Chronologically the list of timestamps comprises of: SENSOR_TIMESTAMP - Device clock. For video sensors designates the middle of exposure. Requires metadata support. FRAME_TIMESTAMP - Device clock. Stamped at the beginning of frame readout and transfer. Requires metadata support. BACKEND_TIMESTAMP - Host (EPOCH) clock in Kernel space. Frame transfer from USB Controller to the USB Driver. TIME_OF_ARRIVAL - Host (EPOCH) clock in User space. Frame transfer from the USB Driver to Librealsense.

During runtime the SDK dynamically selects the most correct representaion, based on both device and host capabilities: In case the frame metadata is not configured:

  • The function call provides the TIME_OF_ARRIVAL stamp. In case the metadata is available the function returns:
  • HW Timestamp (FRAME_TIMESTAMP), or
  • Global Timestamp Host-corrected derivative of HW Timestamp required for multi-sensor/device synchronization
  • The user can select between the unmodified and the host-calculated Hardware Timestamp by toggling the RS2_OPTION_GLOBAL_TIME_ENABLED option. To query which of the three alternatives is active use get_frame_timestamp_domain() function call
    Returns
    the timestamp of the frame, in milliseconds according to the elaborated flow

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

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

◆ is() [1/2]

template<class T >
bool rs2::frame::is ( ) const
inlineinherited

Template function, checking if current instance is the type of another class.

Returns
bool - true or false.

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

◆ is() [2/2]

template<class T >
bool rs2::frame::is ( ) const
inlineinherited

Template function, checking if current instance is the type of another class.

Returns
bool - true or false.

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

◆ keep() [1/2]

void rs2::frame::keep ( )
inlineinherited

keep the frame, otherwise if no refernce to the frame, the frame will be released.

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

References rs2_keep_frame().

◆ keep() [2/2]

void rs2::frame::keep ( )
inlineinherited

keep the frame, otherwise if no refernce to the frame, the frame will be released.

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

References rs2_keep_frame().

Referenced by rs2::frame_queue::enqueue().

◆ operator bool() [1/2]

rs2::frame::operator bool ( ) const
inlineinherited

Parenthesis operator check if internal frame handle is valid.

Returns
bool - true or false.

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

◆ operator bool() [2/2]

rs2::frame::operator bool ( ) const
inlineinherited

Parenthesis operator check if internal frame handle is valid.

Returns
bool - true or false.

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

◆ operator rs2_frame *() [1/2]

rs2::frame::operator rs2_frame * ( )
inlineexplicitinherited

◆ operator rs2_frame *() [2/2]

rs2::frame::operator rs2_frame * ( )
inlineexplicitinherited

◆ operator[]() [1/2]

frame rs2::frameset::operator[] ( size_t  index) const
inline

Bracket operator retrieves back the frame from frameset using arrary notation.

Parameters
[in]index- index of array to retrieve data back.
Returns
frame - retrieved frame.

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

References rs2::frame::frame(), rs2::frame::get(), rs2::error::handle(), rs2_extract_frame(), and size().

◆ operator[]() [2/2]

frame rs2::frameset::operator[] ( size_t  index) const
inline

Bracket operator retrieves back the frame from frameset using arrary notation.

Parameters
[in]index- index of array to retrieve data back.
Returns
frame - retrieved frame.

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

References rs2::frame::frame(), rs2::frame::get(), rs2::error::handle(), rs2_extract_frame(), and size().

◆ reset() [1/2]

◆ reset() [2/2]

void rs2::frame::reset ( )
inlineprotectedinherited

◆ size() [1/2]

size_t rs2::frameset::size ( ) const
inline

Return the size of the frameset.

Returns
size_t - frameset size.

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

◆ size() [2/2]

size_t rs2::frameset::size ( ) const
inline

Return the size of the frameset.

Returns
size_t - frameset size.

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

Referenced by end(), foreach_rs(), and operator[]().

◆ supports_frame_metadata() [1/2]

bool rs2::frame::supports_frame_metadata ( rs2_frame_metadata_value  frame_metadata) const
inlineinherited

determine if the device allows a specific metadata to be queried

Parameters
[in]frame_metadatathe frame_metadata to check for support
Returns
true if the frame_metadata can be queried

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

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

◆ supports_frame_metadata() [2/2]

bool rs2::frame::supports_frame_metadata ( rs2_frame_metadata_value  frame_metadata) const
inlineinherited

determine if the device allows a specific metadata to be queried

Parameters
[in]frame_metadatathe frame_metadata to check for support
Returns
true if the frame_metadata can be queried

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

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

◆ swap() [1/2]

void rs2::frame::swap ( frame &  other)
inlineinherited

Swap the internal frame handle with the one in parameter.

Parameters
[in]frameother - another frame instance to be swaped

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

References absl::swap_internal::swap().

◆ swap() [2/2]

void rs2::frame::swap ( frame &  other)
inlineinherited

Swap the internal frame handle with the one in parameter.

Parameters
[in]frameother - another frame instance to be swaped

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

References absl::swap_internal::swap().

Referenced by rs2::frame::operator=().


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