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

Constructor Index

 o Handler()

Method Index

 o doPlayerClose()
Release as many resources as possible
 o doPlayerDeallocate()
Since the media is buffered in the TickerTape, we don't need to free any resources.
 o doPlayerPrefetch()
Read in each video frame from the stream and call tape.setMessage()
 o doPlayerRealize()
Create the TickerTape component.
 o doPlayerSetMediaTime(Time)
Not implemented.
 o doPlayerSetRate(float)
Set the rate of the media
 o doPlayerStop()
Stop the TickerTape
 o doPlayerSyncStart(Time)
Starts the TickerTape
 o endOfMedia()
To be called when the end of media has been reached.
 o getControlPanelComponent()
Get the control panel Component for this Player.
 o getPlayerDuration()
Get the length of the media from the TickerTape.
 o getPlayerStartLatency()
Assume that there is no significant latency involved in realizing or prefetching the media.
 o postEvent(ControllerEvent)
Post a ControllerEvent to the ControllerEventQueue.
 o setSource(DataSource)
Set the DataSource for this Player.

Constructors

 o Handler
 public Handler()

Methods

 o 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
 o getControlPanelComponent
 public Component getControlPanelComponent()
Get the control panel Component for this Player.

Returns:
The control panel Component.
Overrides:
getControlPanelComponent in class AbstractPlayer
 o doPlayerRealize
 public boolean doPlayerRealize()
Create the TickerTape component.

Overrides:
doPlayerRealize in class AbstractPlayer
 o doPlayerPrefetch
 public boolean doPlayerPrefetch()
Read in each video frame from the stream and call tape.setMessage()

Overrides:
doPlayerPrefetch in class AbstractPlayer
 o doPlayerSyncStart
 public boolean doPlayerSyncStart(Time t)
Starts the TickerTape

Overrides:
doPlayerSyncStart in class AbstractPlayer
 o 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
 o doPlayerStop
 public boolean doPlayerStop()
Stop the TickerTape

Overrides:
doPlayerStop in class AbstractPlayer
 o doPlayerClose
 public void doPlayerClose()
Release as many resources as possible

Overrides:
doPlayerClose in class AbstractPlayer
 o 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
 o doPlayerSetMediaTime
 public void doPlayerSetMediaTime(Time t)
Not implemented.

Overrides:
doPlayerSetMediaTime in class AbstractPlayer
 o 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
 o 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
 o 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
 o 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