NVIDIA DeepStream SDK API Reference

9.2 Release
rs2::video_stream_profile Class Reference

Detailed Description

Inheritance diagram for rs2::video_stream_profile:
Collaboration diagram for rs2::video_stream_profile:

Public Member Functions

 video_stream_profile (const stream_profile &sp)
 Stream profile instance which contains additional video attributes. More...
 
int width () const
 
int height () const
 
rs2_intrinsics get_intrinsics () const
 Get stream profile instrinsics attributes. More...
 
bool operator== (const video_stream_profile &other) const
 
stream_profile clone (rs2_stream type, int index, rs2_format format, int width, int height, const rs2_intrinsics &intr) const
 Clone current profile and change the type, index and format to input parameters. More...
 
 video_stream_profile (const stream_profile &sp)
 Stream profile instance which contains additional video attributes. More...
 
int width () const
 
int height () const
 
rs2_intrinsics get_intrinsics () const
 Get stream profile instrinsics attributes. More...
 
bool operator== (const video_stream_profile &other) const
 
stream_profile clone (rs2_stream type, int index, rs2_format format, int width, int height, const rs2_intrinsics &intr) const
 Clone current profile and change the type, index and format to input parameters. 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...
 
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...
 
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...
 
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...
 
int stream_index () const
 Return the specific stream index. More...
 
int stream_index () const
 Return the specific stream index. More...
 
rs2_stream stream_type () const
 Return the stream type. More...
 
rs2_stream stream_type () const
 Return the stream type. More...
 
rs2_format format () const
 Return the stream format. More...
 
rs2_format format () const
 Return the stream format. More...
 
int fps () const
 Return the stream frame per second. 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...
 
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 >
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...
 
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...
 
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...
 
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...
 
 operator bool () const
 Checks if the profile is valid. More...
 
const rs2_stream_profile * get () const
 Get back the internal stream profile instance. 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...
 
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...
 
void register_extrinsics_to (const stream_profile &to, rs2_extrinsics extrinsics)
 Assign extrinsic transformation parameters to a specific profile (sensor). More...
 
bool is_cloned ()
 
bool is_cloned ()
 
 operator const rs2_stream_profile * ()
 
 operator const rs2_stream_profile * ()
 
 operator std::shared_ptr< 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
 

Constructor & Destructor Documentation

◆ video_stream_profile() [1/2]

rs2::video_stream_profile::video_stream_profile ( const stream_profile &  sp)
inlineexplicit

Stream profile instance which contains additional video attributes.

Parameters
[in]stream_profilesp - assign exisiting stream_profile to this instance.

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

References rs2::stream_profile::_profile, rs2::stream_profile::get(), rs2::error::handle(), RS2_EXTENSION_VIDEO_PROFILE, rs2_get_video_stream_resolution(), and rs2_stream_profile_is().

◆ video_stream_profile() [2/2]

rs2::video_stream_profile::video_stream_profile ( const stream_profile &  sp)
inlineexplicit

Stream profile instance which contains additional video attributes.

Parameters
[in]stream_profilesp - assign exisiting stream_profile to this instance.

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

References rs2::stream_profile::_profile, rs2::error::handle(), RS2_EXTENSION_VIDEO_PROFILE, rs2_get_video_stream_resolution(), and rs2_stream_profile_is().

Member Function Documentation

◆ as() [1/2]

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

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
inlineinherited

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/7]

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

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 rs2::stream_profile::_clone, rs2::stream_profile::_profile, rs2::stream_profile::format(), rs2::error::handle(), rs2_clone_stream_profile(), and rs2_delete_stream_profile().

◆ clone() [2/7]

stream_profile rs2::stream_profile::clone
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.

◆ clone() [3/7]

stream_profile rs2::stream_profile::clone
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.

◆ clone() [4/7]

stream_profile rs2::stream_profile::clone
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.

◆ clone() [5/7]

stream_profile rs2::stream_profile::clone
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.

◆ clone() [6/7]

stream_profile rs2::video_stream_profile::clone ( rs2_stream  type,
int  index,
rs2_format  format,
int  width,
int  height,
const rs2_intrinsics &  intr 
) const
inline

Clone 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.
[in]width- will change the width of the profile
[in]height- will change the height of the profile
[in]intr- will change the intrinsics of the profile
Returns
stream_profile - return the cloned stream profile.

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

References rs2::stream_profile::_clone, rs2::stream_profile::_profile, rs2::stream_profile::format(), rs2::error::handle(), height(), rs2_clone_video_stream_profile(), rs2_delete_stream_profile(), and width().

◆ clone() [7/7]

stream_profile rs2::video_stream_profile::clone ( rs2_stream  type,
int  index,
rs2_format  format,
int  width,
int  height,
const rs2_intrinsics &  intr 
) const
inline

Clone 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.
[in]width- will change the width of the profile
[in]height- will change the height of the profile
[in]intr- will change the intrinsics of the profile
Returns
stream_profile - return the cloned stream profile.

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

References rs2::stream_profile::_profile, rs2::stream_profile::format(), rs2::error::handle(), height(), rs2_clone_video_stream_profile(), rs2_delete_stream_profile(), and width().

◆ format() [1/2]

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

◆ format() [2/2]

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

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 rs2::stream_profile::_format.

◆ fps() [1/2]

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

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 rs2::stream_profile::_framerate.

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

◆ fps() [2/2]

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

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 rs2::stream_profile::_framerate.

◆ get() [1/2]

◆ get() [2/2]

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

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 rs2::stream_profile::_profile.

◆ get_extrinsics_to() [1/2]

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

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 rs2::stream_profile::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
inlineinherited

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 rs2::stream_profile::get(), rs2::error::handle(), and rs2_get_extrinsics().

◆ get_intrinsics() [1/2]

rs2_intrinsics rs2::video_stream_profile::get_intrinsics ( ) const
inline

Get stream profile instrinsics attributes.

Returns
rs2_intrinsics - stream intrinsics.

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

References rs2::stream_profile::_profile, rs2::error::handle(), and rs2_get_video_stream_intrinsics().

◆ get_intrinsics() [2/2]

rs2_intrinsics rs2::video_stream_profile::get_intrinsics ( ) const
inline

Get stream profile instrinsics attributes.

Returns
rs2_intrinsics - stream intrinsics.

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

References rs2::stream_profile::_profile, rs2::error::handle(), and rs2_get_video_stream_intrinsics().

◆ height() [1/2]

int rs2::video_stream_profile::height ( ) const
inline

◆ height() [2/2]

int rs2::video_stream_profile::height ( ) const
inline

◆ is() [1/2]

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

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
inlineinherited

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 ( )
inlineinherited

◆ is_cloned() [2/2]

bool rs2::stream_profile::is_cloned ( )
inlineinherited

◆ is_default() [1/2]

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

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 rs2::stream_profile::_default.

◆ is_default() [2/2]

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

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 rs2::stream_profile::_default.

◆ operator bool() [1/2]

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

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 rs2::stream_profile::_profile.

◆ operator bool() [2/2]

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

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 rs2::stream_profile::_profile.

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

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

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

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

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

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

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

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

◆ operator==() [1/3]

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

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 rs2::stream_profile::format(), rs2::stream_profile::fps(), rs2::stream_profile::stream_index(), and rs2::stream_profile::stream_type().

◆ operator==() [2/3]

bool rs2::video_stream_profile::operator== ( const video_stream_profile &  other) const
inline

◆ operator==() [3/3]

bool rs2::video_stream_profile::operator== ( const video_stream_profile &  other) const
inline

◆ register_extrinsics_to() [1/2]

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

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 rs2::stream_profile::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 
)
inlineinherited

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 rs2::stream_profile::get(), rs2::error::handle(), and rs2_register_extrinsics().

◆ stream_index() [1/2]

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

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 rs2::stream_profile::_index.

◆ stream_index() [2/2]

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

◆ stream_name() [1/2]

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

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(), rs2::stream_profile::stream_index(), and rs2::stream_profile::stream_type().

◆ stream_name() [2/2]

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

◆ stream_type() [1/2]

◆ stream_type() [2/2]

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

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 rs2::stream_profile::_type.

◆ unique_id() [1/2]

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

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 rs2::stream_profile::_uid.

◆ unique_id() [2/2]

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

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 rs2::stream_profile::_uid.

◆ width() [1/2]

int rs2::video_stream_profile::width ( ) const
inline

◆ width() [2/2]

int rs2::video_stream_profile::width ( ) const
inline

Field Documentation

◆ _clone

◆ _default

bool rs2::stream_profile::_default = false
protectedinherited

◆ _format

◆ _framerate

int rs2::stream_profile::_framerate = 0
protectedinherited

◆ _index

int rs2::stream_profile::_index = 0
protectedinherited

◆ _profile

◆ _type

◆ _uid

int rs2::stream_profile::_uid = 0
protectedinherited

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