Public Member Functions | Friends | List of all members
openni::VideoMode Class Reference

#include <OpenNI.h>

Inheritance diagram for openni::VideoMode:
Inheritance graph
[legend]

Public Member Functions

int getFps () const
 
PixelFormat getPixelFormat () const
 
int getResolutionX () const
 
int getResolutionY () const
 
VideoModeoperator= (const VideoMode &other)
 
void setFps (int fps)
 
void setPixelFormat (PixelFormat format)
 
void setResolution (int resolutionX, int resolutionY)
 
 VideoMode ()
 
 VideoMode (const VideoMode &other)
 

Friends

class SensorInfo
 
class VideoFrameRef
 
class VideoStream
 

Additional Inherited Members

- Private Attributes inherited from OniVideoMode
int fps
 
OniPixelFormat pixelFormat
 
int resolutionX
 
int resolutionY
 

Detailed Description

Encapsulates a group of settings for a VideoStream. Settings stored include frame rate, resolution, and pixel format.

This class is used as an input for changing the settings of a VideoStream, as well as an output for reporting the current settings of that class. It is also used by SensorInfo to report available video modes of a stream.

Recommended practice is to use SensorInfo::getSupportedVideoModes() to obtain a list of valid video modes, and then to use items from that list to pass new settings to VideoStream. This is much less likely to produce an invalid video mode than instantiating and manually changing objects of this class.

Definition at line 240 of file OpenNI.h.

Constructor & Destructor Documentation

◆ VideoMode() [1/2]

openni::VideoMode::VideoMode ( )
inline

Default constructor, creates an empty VideoMode object. Application programs should, in most cases, use the copy constructor to copy an existing valid video mode. This is much less error prone that creating and attempting to configure a new VideoMode from scratch.

Definition at line 248 of file OpenNI.h.

◆ VideoMode() [2/2]

openni::VideoMode::VideoMode ( const VideoMode other)
inline

Copy constructor, creates a new VideoMode identical to an existing VideoMode.

Parameters
[in]otherExisting VideoMode to copy.

Definition at line 256 of file OpenNI.h.

Member Function Documentation

◆ getFps()

int openni::VideoMode::getFps ( ) const
inline

Getter function for the frame rate of this VideoMode.

Returns
Current frame rate, measured in frames per second.

Definition at line 298 of file OpenNI.h.

◆ getPixelFormat()

PixelFormat openni::VideoMode::getPixelFormat ( ) const
inline

Getter function for the pixel format of this VideoMode.

Returns
Current pixel format setting of this VideoMode.

Definition at line 280 of file OpenNI.h.

◆ getResolutionX()

int openni::VideoMode::getResolutionX ( ) const
inline

Getter function for the X resolution of this VideoMode.

Returns
Current horizontal resolution of this VideoMode, in pixels.

Definition at line 286 of file OpenNI.h.

◆ getResolutionY()

int openni::VideoMode::getResolutionY ( ) const
inline

Getter function for the Y resolution of this VideoMode.

Returns
Current vertical resolution of this VideoMode, in pixels.

Definition at line 292 of file OpenNI.h.

◆ operator=()

VideoMode& openni::VideoMode::operator= ( const VideoMode other)
inline

Assignment operator. Sets the pixel format, frame rate, and resolution of this VideoMode to equal that of a different VideoMode.

Parameters
[in]otherExisting VideoMode to copy settings from.

Definition at line 267 of file OpenNI.h.

◆ setFps()

void openni::VideoMode::setFps ( int  fps)
inline

Setter function for the frame rate. Application use of this function is not recommended. Instead, use SensorInfo::getSupportedVideoModes() to obtain a list of valid video modes.

Parameters
[in]fpsDesired new frame rate, measured in frames per second.

Definition at line 327 of file OpenNI.h.

◆ setPixelFormat()

void openni::VideoMode::setPixelFormat ( PixelFormat  format)
inline

Setter function for the pixel format of this VideoMode. Application use of this function is not recommended. Instead, use SensorInfo::getSupportedVideoModes() to obtain a list of valid video modes.

Parameters
[in]formatDesired new pixel format for this VideoMode.

Definition at line 306 of file OpenNI.h.

◆ setResolution()

void openni::VideoMode::setResolution ( int  resolutionX,
int  resolutionY 
)
inline

Setter function for the resolution of this VideoMode. Application use of this function is not recommended. Instead, use SensorInfo::getSupportedVideoModes() to obtain a list of valid video modes.

Parameters
[in]resolutionXDesired new horizontal resolution in pixels.
[in]resolutionYDesired new vertical resolution in pixels.

Definition at line 315 of file OpenNI.h.

Friends And Related Function Documentation

◆ SensorInfo

friend class SensorInfo
friend

Definition at line 329 of file OpenNI.h.

◆ VideoFrameRef

friend class VideoFrameRef
friend

Definition at line 331 of file OpenNI.h.

◆ VideoStream

friend class VideoStream
friend

Definition at line 330 of file OpenNI.h.


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


ros_astra_camera
Author(s): Tim Liu
autogenerated on Wed Mar 2 2022 00:52:57