quicktime.app.players
Interface Playable

All Superinterfaces:
Timeable
All Known Implementing Classes:
MoviePlayer, MoviePresenter, QTPlayer

public interface Playable
extends Timeable

This interface defines a protocol for dealing with time based media. It allows you to get the duration, set/get the current time position of playback of the media, retrieve the time scale (how many ticks per second) of the media and set/get the playback rate.


Field Summary
static int kDurationUnknown
           
 
Method Summary
 int getDuration()
          Returns the duration of the media attached to the player.
 int getScale()
          Returns the time scale of the player - how many ticks per second.
 int getTime()
          Returns the current time value of the object.
 void setTime(int time)
          Sets the player to the time specified.
 
Methods inherited from interface quicktime.app.time.Timeable
getRate, getTimeBase, setRate
 

Field Detail

kDurationUnknown

public static final int kDurationUnknown
Method Detail

setTime

public void setTime(int time)
             throws QTException
Sets the player to the time specified. This time value at this level is a totally arbitrary value - what time that means in "real time" is determined by the implementor of the interface, typically the scale value will determine what a "real" time of 1 second is.
Parameters:
time - the new time value

getTime

public int getTime()
            throws QTException
Returns the current time value of the object.
Returns:
the current time.

getScale

public int getScale()
             throws QTException
Returns the time scale of the player - how many ticks per second.
Returns:
the current scale.

getDuration

public int getDuration()
                throws QTException
Returns the duration of the media attached to the player. If the player has no media, or does not know the duration of its media it can return the constant kDurationUnknown.
Returns:
the media duration.