Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
RemoteViz::Rendering::KeepFrameQualityPolicy Class Reference

RemoteViz More...

#include <RemoteViz/Rendering/KeepFrameQualityPolicy.h>

+ Inheritance diagram for RemoteViz::Rendering::KeepFrameQualityPolicy:

Public Member Functions

 KeepFrameQualityPolicy ()
 Constructor.
 
 KeepFrameQualityPolicy (float qualityTarget, unsigned int fpsTarget, unsigned int fpsThreshold)
 Convenience Constructor.
 
virtual ~KeepFrameQualityPolicy ()
 Destructor.
 
virtual unsigned int getFramesPerSecond () const override
 Gets the FPS calculated after calling the method update().
 
virtual float getFrameQuality () const override
 Gets the interactive frame quality calculated after calling the method update().
 
virtual void update (std::shared_ptr< Connection > connection) override
 Update value of the FPS and frame quality.
 
- Public Member Functions inherited from RemoteViz::Rendering::IFrameEncodingPolicy
virtual ~IFrameEncodingPolicy ()
 Destructor.
 

Detailed Description

RemoteViz

This class provides a calculation policy which allows to manage the FPS (frames per second) and the quality of interactive frames sent from Remoteviz service depending on the network bandwidth allocated to the Connection.

If the Client owns multiple connections, the network bandwidth allocated to each Connection will be equitably shared. Otherwise, the network bandwidth allocated to the Connection will be equal to the network bandwidth allocated to the Client. The network bandwidth allocated to the Client can be defined from ClientSettings::setBandwidth. This policy works as described below:

  • When the network bandwidth allocated to the Connection decreases, the frame quality value will keep the frame quality target value and the FPS will decrease.
  • If the FPS decreases until the FPS threshold, then the frame quality will start to decrease.
  • When the network bandwidth allocated to the Connection increases, the frame quality will increase until it reaches the frame quality target and then the FPS will increase until it reaches the FPS target.

See ConnectionSettings::setFrameEncodingPolicy to define the frame encoding policy.

SEE ALSO

KeepFramesPerSecondPolicy

Definition at line 60 of file KeepFrameQualityPolicy.h.

Constructor & Destructor Documentation

◆ KeepFrameQualityPolicy() [1/2]

RemoteViz::Rendering::KeepFrameQualityPolicy::KeepFrameQualityPolicy ( )

Constructor.

The frame quality target will be set to 0.7
The FPS target will be set to 30.
The FPS threshold will be set to 15.

◆ KeepFrameQualityPolicy() [2/2]

RemoteViz::Rendering::KeepFrameQualityPolicy::KeepFrameQualityPolicy ( float  qualityTarget,
unsigned int  fpsTarget,
unsigned int  fpsThreshold 
)

Convenience Constructor.

Parameters
qualityTarget: frame quality target, the value range is [0, 1].
fpsTarget: FPS target, the value range is [1, 60].
fpsThreshold: frames per second threshold, the value range is [1, 60]. (fpsThreshold <= fpsTarget)

◆ ~KeepFrameQualityPolicy()

virtual RemoteViz::Rendering::KeepFrameQualityPolicy::~KeepFrameQualityPolicy ( )
virtual

Destructor.

Member Function Documentation

◆ getFrameQuality()

virtual float RemoteViz::Rendering::KeepFrameQualityPolicy::getFrameQuality ( ) const
overridevirtual

Gets the interactive frame quality calculated after calling the method update().

The value range is [0, 1].

Returns
the interactive frame quality.

Implements RemoteViz::Rendering::IFrameEncodingPolicy.

◆ getFramesPerSecond()

virtual unsigned int RemoteViz::Rendering::KeepFrameQualityPolicy::getFramesPerSecond ( ) const
overridevirtual

Gets the FPS calculated after calling the method update().

The value range is [1, 60].

Returns
the FPS.

Implements RemoteViz::Rendering::IFrameEncodingPolicy.

◆ update()

virtual void RemoteViz::Rendering::KeepFrameQualityPolicy::update ( std::shared_ptr< Connection connection)
overridevirtual

Update value of the FPS and frame quality.

The connection will be used to get values such encode frame buffer size or bandwidth.

Parameters
connection: connection used to get values.

Implements RemoteViz::Rendering::IFrameEncodingPolicy.


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