NVIDIA DeepStream SDK API Reference

9.2 Release
rs2::stream_profile Class Reference

Detailed Description

Inheritance diagram for rs2::stream_profile:

Public Member Functions

 stream_profile ()
 Class to store the profile of stream. More...
 
int stream_index () const
 Return the specific stream index. More...
 
rs2_stream stream_type () const
 Return the stream type. More...
 
rs2_format format () const
 Return the stream format. More...
 
int fps () const
 Return the stream frame per second. More...
 
int unique_id () const
 Return the assigned unique index when the stream was created. More...
 
stream_profile clone (rs2_stream type, int index, rs2_format format) const
 Clone the current profile and change the type, index and format to input parameters. More...
 
bool operator== (const stream_profile &rhs)
 Comparison operator, compare if two stream profiles are the same. More...
 
template<class T >
bool is () const
 Template function, checking if the instance belongs to specific class type. More...
 
template<class T >
T as () const
 Template function, casting the instance as another class type. More...
 
std::string stream_name () const
 Return the string of stream name. More...
 
bool is_default () const
 Checks if stream profile is marked/assigned as default, meaning that the profile will be selected when the user requests stream configuration using wildcards (RS2_DEPTH, -1,-1,... More...
 
 operator bool () const
 Checks if the profile is valid. More...
 
const rs2_stream_profile * get () const
 Get back the internal stream profile instance. More...
 
rs2_extrinsics get_extrinsics_to (const stream_profile &to) const
 Operator implement, return the internal stream profile instance. More...
 
void register_extrinsics_to (const stream_profile &to, rs2_extrinsics extrinsics)
 Assign extrinsic transformation parameters to a specific profile (sensor). More...
 
bool is_cloned ()
 
 stream_profile (const rs2_stream_profile *profile)
 
 operator const rs2_stream_profile * ()
 
 operator std::shared_ptr< rs2_stream_profile > ()
 
 stream_profile ()
 Class to store the profile of stream. More...
 
int stream_index () const
 Return the specific stream index. More...
 
rs2_stream stream_type () const
 Return the stream type. More...
 
rs2_format format () const
 Return the stream format. More...
 
int fps () const
 Return the stream frame per second. More...
 
int unique_id () const
 Return the assigned unique index when the stream was created. More...
 
stream_profile clone (rs2_stream type, int index, rs2_format format) const
 Clone the current profile and change the type, index and format to input parameters. More...
 
bool operator== (const stream_profile &rhs)
 Comparison operator, compare if two stream profiles are the same. More...
 
template<class T >
bool is () const
 Template function, checking if the instance belongs to specific class type. More...
 
template<class T >
T as () const
 Template function, casting the instance as another class type. More...
 
std::string stream_name () const
 Return the string of stream name. More...
 
bool is_default () const
 Checks if stream profile is marked/assigned as default, meaning that the profile will be selected when the user requests stream configuration using wildcards (RS2_DEPTH, -1,-1,... More...
 
 operator bool () const
 Checks if the profile is valid. More...
 
const rs2_stream_profile * get () const
 Get back the internal stream profile instance. More...
 
rs2_extrinsics get_extrinsics_to (const stream_profile &to) const
 Operator implement, return the internal stream profile instance. More...
 
void register_extrinsics_to (const stream_profile &to, rs2_extrinsics extrinsics)
 Assign extrinsic transformation parameters to a specific profile (sensor). More...
 
bool is_cloned ()
 
 stream_profile (const rs2_stream_profile *profile)
 
 operator const rs2_stream_profile * ()
 
 operator std::shared_ptr< rs2_stream_profile > ()
 

Protected Attributes

const rs2_stream_profile * _profile
 
std::shared_ptr< rs2_stream_profile > _clone
 
int _index = 0
 
int _uid = 0
 
int _framerate = 0
 
rs2_format _format = RS2_FORMAT_ANY
 
rs2_stream _type = RS2_STREAM_ANY
 
bool _default = false
 

Friends

class rs2::sensor
 
class rs2::frame
 
class rs2::pipeline_profile
 
class rs2::video_stream_profile
 

Constructor & Destructor Documentation

◆ stream_profile() [1/4]

rs2::stream_profile::stream_profile ( )
inline

Class to store the profile of stream.

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

◆ stream_profile() [2/4]

◆ stream_profile() [3/4]

rs2::stream_profile::stream_profile ( )
inline

Class to store the profile of stream.

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

◆ stream_profile() [4/4]

Member Function Documentation

◆ as() [1/2]

template<class T >
T rs2::stream_profile::as ( ) const
inline

Template function, casting the instance as another class type.

Returns
class instance - pointer or null.

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

◆ as() [2/2]

template<class T >
T rs2::stream_profile::as ( ) const
inline

Template function, casting the instance as another class type.

Returns
class instance - pointer or null.

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

◆ clone() [1/2]

stream_profile rs2::stream_profile::clone ( rs2_stream  type,
int  index,
rs2_format  format 
) const
inline

Clone the current profile and change the type, index and format to input parameters.

Parameters
[in]type- will change the stream type from the cloned profile.
[in]index- will change the stream index from the cloned profile.
[in]format- will change the stream format from the cloned profile.
Returns
stream_profile - return the cloned stream profile.

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

References _clone, _profile, format(), rs2::error::handle(), rs2_clone_stream_profile(), and rs2_delete_stream_profile().

◆ clone() [2/2]

stream_profile rs2::stream_profile::clone ( rs2_stream  type,
int  index,
rs2_format  format 
) const
inline

Clone the current profile and change the type, index and format to input parameters.

Parameters
[in]type- will change the stream type from the cloned profile.
[in]index- will change the stream index from the cloned profile.
[in]format- will change the stream format from the cloned profile.
Returns
stream_profile - return the cloned stream profile.

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

References _profile, format(), rs2::error::handle(), rs2_clone_stream_profile(), and rs2_delete_stream_profile().

◆ format() [1/2]

rs2_format rs2::stream_profile::format ( ) const
inline

Return the stream format.

Returns
rs2_format - stream format

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

References _format.

◆ format() [2/2]

rs2_format rs2::stream_profile::format ( ) const
inline

Return the stream format.

Returns
rs2_format - stream format

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

References _format.

Referenced by clone(), rs2::video_stream_profile::clone(), rs2::frameset::first_or_default(), rs2::pointcloud::map_to(), and operator==().

◆ fps() [1/2]

int rs2::stream_profile::fps ( ) const
inline

Return the stream frame per second.

Returns
int - frame rate

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

References _framerate.

Referenced by operator==().

◆ fps() [2/2]

int rs2::stream_profile::fps ( ) const
inline

Return the stream frame per second.

Returns
int - frame rate

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

References _framerate.

◆ get() [1/2]

◆ get() [2/2]

const rs2_stream_profile* rs2::stream_profile::get ( ) const
inline

Get back the internal stream profile instance.

Returns
rs2_stream_profile* - internal implementation of the profile class

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

References _profile.

◆ get_extrinsics_to() [1/2]

rs2_extrinsics rs2::stream_profile::get_extrinsics_to ( const stream_profile &  to) const
inline

Operator implement, return the internal stream profile instance.

Returns
rs2_stream_profile* - internal instance to communicate with real implementation. Get the extrinsic transformation between two profiles (representing physical sensors)
Parameters
[in]stream_profileto - the stream profile (another sensor) to be based to return the extrinsic
Returns
rs2_stream_profile* - internal instance to communicate with real implementation.

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

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

◆ get_extrinsics_to() [2/2]

rs2_extrinsics rs2::stream_profile::get_extrinsics_to ( const stream_profile &  to) const
inline

Operator implement, return the internal stream profile instance.

Returns
rs2_stream_profile* - internal instance to communicate with real implementation. Get the extrinsic transformation between two profiles (representing physical sensors)
Parameters
[in]stream_profileto - the stream profile (another sensor) to be based to return the extrinsic
Returns
rs2_stream_profile* - internal instance to communicate with real implementation.

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

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

◆ is() [1/2]

template<class T >
bool rs2::stream_profile::is ( ) const
inline

Template function, checking if the instance belongs to specific class type.

Returns
bool - true or false.

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

◆ is() [2/2]

template<class T >
bool rs2::stream_profile::is ( ) const
inline

Template function, checking if the instance belongs to specific class type.

Returns
bool - true or false.

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

◆ is_cloned() [1/2]

bool rs2::stream_profile::is_cloned ( )
inline

◆ is_cloned() [2/2]

bool rs2::stream_profile::is_cloned ( )
inline

◆ is_default() [1/2]

bool rs2::stream_profile::is_default ( ) const
inline

Checks if stream profile is marked/assigned as default, meaning that the profile will be selected when the user requests stream configuration using wildcards (RS2_DEPTH, -1,-1,...

Returns
bool - true or false.

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

References _default.

◆ is_default() [2/2]

bool rs2::stream_profile::is_default ( ) const
inline

Checks if stream profile is marked/assigned as default, meaning that the profile will be selected when the user requests stream configuration using wildcards (RS2_DEPTH, -1,-1,...

Returns
bool - true or false.

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

References _default.

◆ operator bool() [1/2]

rs2::stream_profile::operator bool ( ) const
inline

Checks if the profile is valid.

Returns
bool - true or false.

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

References _profile.

◆ operator bool() [2/2]

rs2::stream_profile::operator bool ( ) const
inline

Checks if the profile is valid.

Returns
bool - true or false.

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

References _profile.

◆ operator const rs2_stream_profile *() [1/2]

rs2::stream_profile::operator const rs2_stream_profile * ( )
inline

◆ operator const rs2_stream_profile *() [2/2]

rs2::stream_profile::operator const rs2_stream_profile * ( )
inline

◆ operator std::shared_ptr< rs2_stream_profile >() [1/2]

rs2::stream_profile::operator std::shared_ptr< rs2_stream_profile > ( )
inlineexplicit

◆ operator std::shared_ptr< rs2_stream_profile >() [2/2]

rs2::stream_profile::operator std::shared_ptr< rs2_stream_profile > ( )
inlineexplicit

◆ operator==() [1/2]

bool rs2::stream_profile::operator== ( const stream_profile &  rhs)
inline

Comparison operator, compare if two stream profiles are the same.

Parameters
[in]rhs- stream profile to compare with.
Returns
bool - true or false.

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

References format(), fps(), stream_index(), and stream_type().

◆ operator==() [2/2]

bool rs2::stream_profile::operator== ( const stream_profile &  rhs)
inline

Comparison operator, compare if two stream profiles are the same.

Parameters
[in]rhs- stream profile to compare with.
Returns
bool - true or false.

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

References format(), fps(), stream_index(), and stream_type().

◆ register_extrinsics_to() [1/2]

void rs2::stream_profile::register_extrinsics_to ( const stream_profile &  to,
rs2_extrinsics  extrinsics 
)
inline

Assign extrinsic transformation parameters to a specific profile (sensor).

The extrinsic information is generally available as part of the camera calibration, and librealsense is responsible for retrieving and assigning these parameters where appropriate. This specific function is intended for synthetic/mock-up (software) devices for which the parameters are produced and injected by the user.

Parameters
[in]stream_profileto - which stream profile to be registered with the extrinsic.
[in]rs2_extrinsicsextrinsics - the extrinsics to be registered.

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

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

◆ register_extrinsics_to() [2/2]

void rs2::stream_profile::register_extrinsics_to ( const stream_profile &  to,
rs2_extrinsics  extrinsics 
)
inline

Assign extrinsic transformation parameters to a specific profile (sensor).

The extrinsic information is generally available as part of the camera calibration, and librealsense is responsible for retrieving and assigning these parameters where appropriate. This specific function is intended for synthetic/mock-up (software) devices for which the parameters are produced and injected by the user.

Parameters
[in]stream_profileto - which stream profile to be registered with the extrinsic.
[in]rs2_extrinsicsextrinsics - the extrinsics to be registered.

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

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

◆ stream_index() [1/2]

int rs2::stream_profile::stream_index ( ) const
inline

◆ stream_index() [2/2]

int rs2::stream_profile::stream_index ( ) const
inline

Return the specific stream index.

Returns
int - stream index

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

References _index.

◆ stream_name() [1/2]

std::string rs2::stream_profile::stream_name ( ) const
inline

Return the string of stream name.

Returns
string - stream name.

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

References rs2_stream_to_string(), stream_index(), and stream_type().

◆ stream_name() [2/2]

std::string rs2::stream_profile::stream_name ( ) const
inline

Return the string of stream name.

Returns
string - stream name.

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

References rs2_stream_to_string(), stream_index(), and stream_type().

◆ stream_type() [1/2]

rs2_stream rs2::stream_profile::stream_type ( ) const
inline

Return the stream type.

Returns
rs2_stream - stream type

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

References _type.

◆ stream_type() [2/2]

◆ unique_id() [1/2]

int rs2::stream_profile::unique_id ( ) const
inline

Return the assigned unique index when the stream was created.

Returns
int - unique id

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

References _uid.

◆ unique_id() [2/2]

int rs2::stream_profile::unique_id ( ) const
inline

Return the assigned unique index when the stream was created.

Returns
int - unique id

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

References _uid.

Friends And Related Function Documentation

◆ rs2::frame

◆ rs2::pipeline_profile

◆ rs2::sensor

◆ rs2::video_stream_profile

Field Documentation

◆ _clone

◆ _default

bool rs2::stream_profile::_default = false
protected

◆ _format

rs2_format rs2::stream_profile::_format = RS2_FORMAT_ANY
protected

◆ _framerate

int rs2::stream_profile::_framerate = 0
protected

◆ _index

int rs2::stream_profile::_index = 0
protected

◆ _profile

◆ _type

rs2_stream rs2::stream_profile::_type = RS2_STREAM_ANY
protected

◆ _uid

int rs2::stream_profile::_uid = 0
protected

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