|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CFrameRate
public class CFrameRate
Monitors the framerate by taking records every time NewFrame is called; this is used to control performance-specific features such as automatic speed control.
| Field Summary | |
|---|---|
(package private) double |
LN2
Cache of the natural log of 2 |
private double |
m_dFr
Current frame rate |
private double |
m_dMaxbitrate
Maximum rate of entering information |
private double |
m_dRXmax
Maximum x movement per frame |
private int |
m_iFrames
Number of frames elapsed |
private int |
m_iSamples
Number of samples currently stored |
private int |
m_iSteps
Not sure! Comments said "see djw thesis" |
private long |
m_iTime
Time of the second-to-last frame |
private long |
m_iTime2
Time of last frame |
| Constructor Summary | |
|---|---|
CFrameRate()
Creates a new framerate monitor; all initial values are currently hard coded in. |
|
| Method Summary | |
|---|---|
double |
Framerate()
Gets current frame rate |
void |
Initialise()
Resets all our internal values to the same defaults as are chosen in the constructor. |
long |
MinSize(long t)
Gets the minimum size of the target viewport |
void |
NewFrame(long Time)
Insert a new frame and recompute the frame rate, if enough samples have been gathered. |
void |
Reset(long Time)
Clears our frame count |
double |
Rxmax()
Gets maximum x movement per frame |
void |
SetBitrate(double TargetRate)
Sets the max bitrate |
void |
SetMaxBitrate(double MaxRate)
Sets the max bitrate |
int |
Steps()
Gets m_iSteps; see its description |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private double m_dFr
private double m_dMaxbitrate
private double m_dRXmax
private int m_iFrames
private int m_iSamples
private long m_iTime
private long m_iTime2
private int m_iSteps
final double LN2
| Constructor Detail |
|---|
public CFrameRate()
We start with a frame rate of 32FPS.
| Method Detail |
|---|
public double Rxmax()
public long MinSize(long t)
t - Current time
public int Steps()
public double Framerate()
public void Initialise()
public void NewFrame(long Time)
If this would result in a Steps parameter of 0 it is set to 1.
Time - Time at which the new frame began, as a UNIX timestamp.public void Reset(long Time)
Time - System time as a UNIX timestamp.public void SetBitrate(double TargetRate)
TargetRate - New bitratepublic void SetMaxBitrate(double MaxRate)
MaxRate - New bitrate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||