|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.media.MediaTimer
public class MediaTimer
This is a timer class that counts time based on a media time of a specified Player. A media time is specified by the JMF specification. An application can specify a range between a first time and a last time. When a current media time exceeds this range, this timer fires and calls a MediaTimerListener.notify() method. I.e., when a current media time passes the last time, this timer fires and calls the notify() method with MEDIA_WENTOFF_LAST event. On the other hand, when a current media time passes the first time in a reverse playback or a skip playback, this timer fires and calls the notify() method with MEDIA_WENTOFF_FIRST event.
Constructor Summary | |
---|---|
MediaTimer(javax.media.Player p,
MediaTimerListener listener)
Constructor to make a MediaTimer object that counts time based on the media time line of the specified Player. |
Method Summary | |
---|---|
javax.media.Time |
getFirstTime()
Get a first time that was set to this MediaTimer object. |
javax.media.Time |
getLastTime()
Get a last time that was set to this MediaTimer object. |
javax.media.Player |
getPlayer()
Get a Player that was tied to this MediaTimer object by a constructor. |
void |
setFirstTime(javax.media.Time time)
Set a first time of a time range. |
void |
setLastTime(javax.media.Time time)
Set a last time of a time range. |
void |
start()
Start this MediaTimer object. |
void |
stop()
Stop this MediaTimer object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MediaTimer(javax.media.Player p, MediaTimerListener listener)
p
- a JMF Player.Method Detail |
---|
public void setFirstTime(javax.media.Time time)
time
- a time to go off.public void setLastTime(javax.media.Time time)
time
- a time to go off.public javax.media.Time getFirstTime()
public javax.media.Time getLastTime()
public void start()
public void stop()
public javax.media.Player getPlayer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |