Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.app.time
Interface Timeable

All Known Subinterfaces:
  Playable, TimeableController

All Known Implementing Classes:
  Timer

public interface Timeable

This interface defines a protocol for dealing with time lines. The Timer, QTPlayer and MoviePlayer objects all have a TimeBase as the foundation upon which their sense of time is founded. This interface provids a way to get this TimeBase and to set and get its current rate.

There is a close relationship between Timeable objects and Taskable objects, A Timeable object's TimeBase will tick of its own accord - time marches on regardless. However Timeable objects generally have tasks that need to be performed at certain times. For instance, a movie needs to draw its next frame at time x, etc. Whilst some of the tasks that these objects perform are done at interrupt time, they also need to be given task time, time from the application when the tasks and schedules that they maintain can be performed outside of the constraints or system load of interrupt (or highest priority thread) time.

Thus these objects have a requirement to have some kind of task method called, in the case of a Movie it is MoviesTask, of a MovieController - MCIdle, a SpriteWorld - SpriteWorldIdle.

The tasking requirements of these classes maybe performed directly by the class itself (in the case of QTPlayer for example) or it maybe delegated to another class (as in the case of MoviePlayer).

See Also:
  `Taskable`, `Timer`, `QTPlayer`, `MoviePlayer`, `TimeBase`

Method Summary
`float` | `getRate()` Returns the current rate of the Timeable object.
`TimeBase` | `getTimeBase()` Returns the current time base that provides the time foundation of this object.
`void` | `setRate(float rate)` Sets the Timeable's playback rate.

Method Detail

### getTimeBase

    public TimeBase getTimeBase()
                         throws QTException

  Returns the current time base that provides the time foundation of this object.
  Returns:
    a TimeBase

### setRate

    public void setRate(float rate)
                 throws QTException

  Sets the Timeable's playback rate. Typically a rate of zero will mean that the player is stopped, a positive value that the player is playing forwards, a negative value that the time values are decreasing.
  Parameters:
    `rate` - the new playback rate.

### getRate

    public float getRate()
                  throws QTException

  Returns the current rate of the Timeable object.
  Returns:
    the playback rate

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD