All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.media.content.text.plain.Handler
java.lang.Object
|
+----ejmf.toolkit.media.AbstractClock
|
+----ejmf.toolkit.media.AbstractController
|
+----ejmf.toolkit.media.AbstractPlayer
|
+----ejmf.toolkit.media.content.text.plain.Handler
- public class Handler
- extends AbstractPlayer
This class provides a Player for .txt (text) files.
It uses a TickerTape to display the media.
- See Also:
- TickerTape, JMFTickerTape
-
Handler()
-
-
doPlayerClose()
- Release as many resources as possible
-
doPlayerDeallocate()
- Since the media is buffered in the TickerTape, we
don't need to free any resources.
-
doPlayerPrefetch()
- Read in each video frame from the stream and call
tape.setMessage()
-
doPlayerRealize()
- Create the TickerTape component.
-
doPlayerSetMediaTime(Time)
- Not implemented.
-
doPlayerSetRate(float)
- Set the rate of the media
-
doPlayerStop()
- Stop the TickerTape
-
doPlayerSyncStart(Time)
- Starts the TickerTape
-
endOfMedia()
- To be called when the end of media has been reached.
-
getControlPanelComponent()
- Get the control panel Component for this Player.
-
getPlayerDuration()
- Get the length of the media from the TickerTape.
-
getPlayerStartLatency()
- Assume that there is no significant latency involved in
realizing or prefetching the media.
-
postEvent(ControllerEvent)
- Post a ControllerEvent to the ControllerEventQueue.
-
setSource(DataSource)
- Set the DataSource for this Player.
Handler
public Handler()
setSource
public void setSource(DataSource source) throws IncompatibleSourceException
- Set the DataSource for this Player.
- Parameters:
- source
- The DataSource to try
- Throws: IncompatibleSourceException
- If the DataSource is not a PullDataSource or
does not contain valid streams.
- Overrides:
- setSource in class AbstractPlayer
getControlPanelComponent
public Component getControlPanelComponent()
- Get the control panel Component for this Player.
- Returns:
- The control panel Component.
- Overrides:
- getControlPanelComponent in class AbstractPlayer
doPlayerRealize
public boolean doPlayerRealize()
- Create the TickerTape component.
- Overrides:
- doPlayerRealize in class AbstractPlayer
doPlayerPrefetch
public boolean doPlayerPrefetch()
- Read in each video frame from the stream and call
tape.setMessage()
- Overrides:
- doPlayerPrefetch in class AbstractPlayer
doPlayerSyncStart
public boolean doPlayerSyncStart(Time t)
- Starts the TickerTape
- Overrides:
- doPlayerSyncStart in class AbstractPlayer
doPlayerDeallocate
public boolean doPlayerDeallocate()
- Since the media is buffered in the TickerTape, we
don't need to free any resources. Set the media time to 0
and return.
- Overrides:
- doPlayerDeallocate in class AbstractPlayer
doPlayerStop
public boolean doPlayerStop()
- Stop the TickerTape
- Overrides:
- doPlayerStop in class AbstractPlayer
doPlayerClose
public void doPlayerClose()
- Release as many resources as possible
- Overrides:
- doPlayerClose in class AbstractPlayer
doPlayerSetRate
public float doPlayerSetRate(float rate)
- Set the rate of the media
- Parameters:
- rate
- The desired rate
- Returns:
- The actual rate set. For a TickerTape,
this will be equal to the desired rate.
- Overrides:
- doPlayerSetRate in class AbstractPlayer
doPlayerSetMediaTime
public void doPlayerSetMediaTime(Time t)
- Not implemented.
- Overrides:
- doPlayerSetMediaTime in class AbstractPlayer
getPlayerStartLatency
public Time getPlayerStartLatency()
- Assume that there is no significant latency involved in
realizing or prefetching the media.
- Returns:
- A Time of zero nanoseconds.
- Overrides:
- getPlayerStartLatency in class AbstractPlayer
getPlayerDuration
public Time getPlayerDuration()
- Get the length of the media from the TickerTape.
The duration is taken from the TickerTape in
nanoseconds and converted into a Time object.
- Returns:
- A Time object representing the duration of
the media.
- Overrides:
- getPlayerDuration in class AbstractPlayer
postEvent
protected void postEvent(ControllerEvent e)
- Post a ControllerEvent to the ControllerEventQueue. This
method is re-implemented here to allow all classes within
this package to post ControllerEvents.
- Parameters:
- e
- The ControllerEvent to post to the queue
- Overrides:
- postEvent in class AbstractController
endOfMedia
protected void endOfMedia() throws ClockStoppedException
- To be called when the end of media has been reached. This
method is re-implemented here to allow all classes within
this package to post ControllerEvents.
- Throws: ClockStoppedException
- If the Clock is stopped when this method is
called.
- Overrides:
- endOfMedia in class AbstractPlayer
All Packages Class Hierarchy This Package Previous Next Index