net.sf.fmj.media
Class AbstractTrack

java.lang.Object
  extended by net.sf.fmj.media.AbstractTrack
All Implemented Interfaces:
Duration, Track

public abstract class AbstractTrack
extends java.lang.Object
implements Track

Abstract base class to implement Track.

Author:
Ken Larson

Field Summary
 
Fields inherited from interface javax.media.Track
FRAME_UNKNOWN, TIME_UNKNOWN
 
Fields inherited from interface javax.media.Duration
DURATION_UNBOUNDED, DURATION_UNKNOWN
 
Constructor Summary
AbstractTrack()
           
 
Method Summary
 Time getDuration()
           
abstract  Format getFormat()
           
 Time getStartTime()
           
 boolean isEnabled()
           
 Time mapFrameToTime(int frameNumber)
           
 int mapTimeToFrame(Time t)
           
abstract  void readFrame(Buffer buffer)
          TODO: the API is not clear as to what readFrame should do in the case of an error, like an IOException.
 void setEnabled(boolean t)
           
 void setTrackListener(TrackListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTrack

public AbstractTrack()
Method Detail

getFormat

public abstract Format getFormat()
Specified by:
getFormat in interface Track

getStartTime

public Time getStartTime()
Specified by:
getStartTime in interface Track

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Track

mapFrameToTime

public Time mapFrameToTime(int frameNumber)
Specified by:
mapFrameToTime in interface Track

mapTimeToFrame

public int mapTimeToFrame(Time t)
Specified by:
mapTimeToFrame in interface Track

readFrame

public abstract void readFrame(Buffer buffer)
Description copied from interface: Track
TODO: the API is not clear as to what readFrame should do in the case of an error, like an IOException.

Specified by:
readFrame in interface Track

setEnabled

public void setEnabled(boolean t)
Specified by:
setEnabled in interface Track

setTrackListener

public void setTrackListener(TrackListener listener)
Specified by:
setTrackListener in interface Track

getDuration

public Time getDuration()
Specified by:
getDuration in interface Duration