Class PvFPSStabilizer
Display frame rate manager. Used to stabilize the frames-per-seconds displayed.
Implements
Inherited Members
Namespace: eBUSDotNet
Assembly: eBUSDotNet.dll
Syntax
public class PvFPSStabilizer : IDisposable
Remarks
This class is pretty simple to use. Just instantiate an object and call the IsTimeToDisplay every time you have a new frame to display, specifying the desired frame rate.
This class is not tied to the display. It simply keeps track of the times associated with
displayed frames (IsTimeToDisplay returning true) in a circular buffer and uses this history
to decide if it is time to display a new frame.
Constructors
View SourcePvFPSStabilizer()
Constructor.
Declaration
public PvFPSStabilizer()
Fields
View SourceswigCMemOwn
Determines who is responsible for deleting the underlying C++ object.
Declaration
protected bool swigCMemOwn
Field Value
| Type | Description |
|---|---|
| bool |
Properties
View SourceAverage
Gets the current average display frame rate computed by the stabilizer.
Declaration
public uint Average { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
View SourceDispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Dispose
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~PvFPSStabilizer()
Destructor.
Declaration
protected ~PvFPSStabilizer()
IsTimeToDisplay(uint)
Checks whether displaying a frame now would bring us close to the desired display frame rate or not.
Declaration
public bool IsTimeToDisplay(uint aTargetFPS)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | aTargetFPS | The target (desired) display frame rate. |
Returns
| Type | Description |
|---|---|
| bool | True if the frame should be displayed, false if not. |
Reset()
Resets the history.
Declaration
public void Reset()