Throttles callbacks to a target frame rate, or invokes every tick when the target FPS is zero or negative. Used internally by image mat sources and video grabbers; not a primary public contract.
More...
|
| | FPSThrottle (float targetFPS) |
| | Creates a throttle for the specified target FPS.
|
| |
| void | Reset () |
| | Resets the internal timer.
|
| |
| bool | Update (float deltaTime, Action onTick) |
| | Advances the timer and invokes onTick when the FPS interval elapses.
|
| |
|
| bool | IsPaused [get, set] |
| | Gets or sets whether the timer is paused. When resuming from pause, the internal timer is reset.
|
| |
Throttles callbacks to a target frame rate, or invokes every tick when the target FPS is zero or negative. Used internally by image mat sources and video grabbers; not a primary public contract.
◆ FPSThrottle()
| OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.FPSThrottle |
( |
float | targetFPS | ) |
|
Creates a throttle for the specified target FPS.
- Parameters
-
| targetFPS | Target FPS. When targetFPS is 0 or less, Update invokes the callback every call. |
◆ Reset()
| void OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.Reset |
( |
| ) |
|
Resets the internal timer.
◆ Update()
| bool OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.Update |
( |
float | deltaTime, |
|
|
Action | onTick ) |
Advances the timer and invokes onTick when the FPS interval elapses.
- Parameters
-
| deltaTime | Elapsed time in seconds since the previous update. |
| onTick | Callback invoked when the interval is reached. |
- Returns
true if the callback is invoked; otherwise false.
◆ IsPaused
| bool OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.IsPaused |
|
getset |
Gets or sets whether the timer is paused. When resuming from pause, the internal timer is reset.
The documentation for this class was generated from the following file:
- OpenCVForUnity/Assets/OpenCVForUnity/Scripts/Extensions/SourceToMat/Core/FPSThrottle.cs