Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
Public Member Functions | Protected Attributes | Friends | List of all members
rs2::stream_profile Class Reference

#include <rs_frame.hpp>

Inheritance diagram for rs2::stream_profile:
rs2::motion_stream_profile rs2::pose_stream_profile rs2::video_stream_profile

Public Member Functions

 stream_profile ()
 
int stream_index () const
 
rs2_stream stream_type () const
 
rs2_format format () const
 
int fps () const
 
int unique_id () const
 
stream_profile clone (rs2_stream type, int index, rs2_format format) const
 
bool operator== (const stream_profile &rhs)
 
template<class T >
bool is () const
 
template<class T >
as () const
 
std::string stream_name () const
 
bool is_default () const
 
 operator bool () const
 
const rs2_stream_profileget () const
 
rs2_extrinsics get_extrinsics_to (const stream_profile &to) const
 
void register_extrinsics_to (const stream_profile &to, rs2_extrinsics extrinsics)
 
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/2]

rs2::stream_profile::stream_profile ( )
inline

Class to store the profile of stream

◆ stream_profile() [2/2]

rs2::stream_profile::stream_profile ( const rs2_stream_profile profile)
inlineexplicit

Member Function Documentation

◆ as()

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.

◆ clone()

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.

◆ format()

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

Return the stream format

Returns
rs2_format - stream format

◆ fps()

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

Return the stream frame per second

Returns
int - frame rate

◆ get()

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

◆ get_extrinsics_to()

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.

◆ is()

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.

◆ is_cloned()

bool rs2::stream_profile::is_cloned ( )
inline

◆ is_default()

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.

◆ operator bool()

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

Checks if the profile is valid

Returns
bool - true or false.

◆ operator const rs2_stream_profile *()

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

◆ operator std::shared_ptr< rs2_stream_profile >()

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

◆ operator==()

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.

◆ register_extrinsics_to()

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.

◆ stream_index()

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

Return the specific stream index

Returns
int - stream index

◆ stream_name()

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

Return the string of stream name

Returns
string - stream name.

◆ stream_type()

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

Return the stream type

Returns
rs2_stream - stream type

◆ unique_id()

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

Return the assigned unique index when the stream was created

Returns
int - unique id

Friends And Related Function Documentation

◆ rs2::frame

friend class rs2::frame
friend

◆ rs2::pipeline_profile

friend class rs2::pipeline_profile
friend

◆ rs2::sensor

friend class rs2::sensor
friend

◆ rs2::video_stream_profile

friend class rs2::video_stream_profile
friend

Member Data Documentation

◆ _clone

std::shared_ptr<rs2_stream_profile> rs2::stream_profile::_clone
protected

◆ _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

const rs2_stream_profile* rs2::stream_profile::_profile
protected

◆ _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: