|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openni.PlaybackControl
public class PlaybackControl
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.
Constructor Summary | |
---|---|
PlaybackControl(Device device)
|
Method Summary | |
---|---|
int |
getNumberOfFrames(VideoStream stream)
Provides the a count of frames that this recording contains for a given stream. |
boolean |
getRepeatEnabled()
Gets the current repeat setting of the file device. |
float |
getSpeed()
Getter function for the current playback speed of this device. |
void |
seek(VideoStream stream,
int frameIndex)
Seeks within a VideoStream to a given FrameID. |
void |
setRepeatEnabled(boolean repeat)
Changes the current repeat mode of the device. |
void |
setSpeed(float speed)
Setter function for the playback speed of the device. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlaybackControl(Device device)
Method Detail |
---|
public float getSpeed()
public void setSpeed(float speed)
speed
- Desired new value of playback speed, as ratio of original recording.public boolean getRepeatEnabled()
public void setRepeatEnabled(boolean repeat)
repeat
- New value for repeat -- true to enable, false to disablepublic void seek(VideoStream stream, int frameIndex)
stream
- Stream for which the frameIndex value is valid.frameIndex
- Frame index to move playback topublic int getNumberOfFrames(VideoStream stream)
seek(VideoStream stream, int frameIndex)
function.
stream
- The video stream to count frames for
VideoStream
, or 0 if the stream is not part of the
recording
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |