The PlaybackControl class provides access to a series of specific to playing back a recording from a file device.
When playing a stream back from a recording instead of playing from a live device, it is possible to vary playback speed, change the current time location (ie fast forward / rewind / seek), specify whether the playback should be repeated at the end of the recording, and query the total size of the recording.
Since none of these functions make sense in the context of a physical device, they are split out into a separate playback control class. To use, simply create your file device, create a PlaybackControl, and then attach the PlaybackControl to the file device.
| float org.openni.PlaybackControl.getSpeed |
( |
| ) |
|
|
inline |
Getter function for the current playback speed of this device.
This value is expressed as a multiple of the speed the original recording was taken at. For example, if the original recording was at 30fps, and playback speed is set to 0.5, then the recording will play at 15fps. If playback speed is set to 2.0, then the recording would playback at 60fps.
In addition, there are two "special" values. A playback speed of 0.0 indicates that the playback should occur as fast as the system is capable of returning frames. This is most useful when testing algorithms on large data sets, as it enables playback to be done at a much higher rate than would otherwise be possible.
A value of -1 indicates that speed is "manual". In this mode, new frames will only become available when an application manually reads them. If used in a polling loop, this setting also enables systems to read and process frames limited only by available processing speeds.