edu.umd.cfar.lamp.viper.gui.players
Class NotFoundPlayer

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.gui.players.DataPlayer
      extended byedu.umd.cfar.lamp.viper.gui.players.NotFoundPlayer
All Implemented Interfaces:
java.util.Iterator, java.util.ListIterator

public class NotFoundPlayer
extends DataPlayer

This player is the one that is launched when all the others fail, or, alternatively, when the media file cannot be located.

Author:
davidm

Field Summary
protected  PrefsManager prefs
           
 
Fields inherited from class edu.umd.cfar.lamp.viper.gui.players.DataPlayer
B_FRAME, EMPTY_FRAME, I_FRAME, logger, P_FRAME, UNKNOWN_FRAME
 
Constructor Summary
NotFoundPlayer()
           
 
Method Summary
 void add(java.lang.Object o)
           
 void destroy()
          Does any cleanup required.
 java.awt.Image getImage()
          Function returns the image with the current index.
 java.awt.Image getImage(Instant i)
          Get the image at the given instant.
 java.lang.String getImageType(Instant i)
          Always returns 'empty'.
 Instant getNow()
          Get the currently loaded instant.
 Rational getPixelAspectRatio()
          Gets the pixel aspect ratio.
 PrefsManager getPrefs()
           
 FrameRate getRate()
          Gets the frame rate of the video.
 Span getSpan()
          Gets the interval of the video clip
 boolean hasNext()
           
 boolean hasPrevious()
           
 java.lang.Object next()
           
 int nextIndex()
           
 java.lang.Object previous()
           
 int previousIndex()
           
 void remove()
           
 void set(java.lang.Object o)
           
 void setElement(MediaElement element)
          Modifies the current span and rate as indicated in the element
 void setMediator(ViperViewMediator mediator)
          
 void setNow(Instant i)
          Set the currently loaded instant/frame.
 void setPrefs(PrefsManager prefs)
           
 
Methods inherited from class edu.umd.cfar.lamp.viper.gui.players.DataPlayer
createDataPlayer, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefs

protected PrefsManager prefs
Constructor Detail

NotFoundPlayer

public NotFoundPlayer()
Method Detail

getPrefs

public PrefsManager getPrefs()
Specified by:
getPrefs in class DataPlayer
Returns:
Returns the prefs.

setPrefs

public void setPrefs(PrefsManager prefs)
Specified by:
setPrefs in class DataPlayer
Parameters:
prefs - The prefs to set.

getImage

public java.awt.Image getImage()
Description copied from class: DataPlayer
Function returns the image with the current index.

Specified by:
getImage in class DataPlayer
Returns:
current Image.

getImage

public java.awt.Image getImage(Instant i)
Description copied from class: DataPlayer
Get the image at the given instant.

Specified by:
getImage in class DataPlayer
Parameters:
i -
Returns:
@throws UnknownFrameRateException

getSpan

public Span getSpan()
Description copied from class: DataPlayer
Gets the interval of the video clip

Specified by:
getSpan in class DataPlayer
Returns:

getNow

public Instant getNow()
Description copied from class: DataPlayer
Get the currently loaded instant.

Specified by:
getNow in class DataPlayer
Returns:

setNow

public void setNow(Instant i)
Description copied from class: DataPlayer
Set the currently loaded instant/frame.

Specified by:
setNow in class DataPlayer
Parameters:
i -

getRate

public FrameRate getRate()
Description copied from class: DataPlayer
Gets the frame rate of the video.

Specified by:
getRate in class DataPlayer
Returns:
null if the frame rate is unknown

destroy

public void destroy()
Description copied from class: DataPlayer
Does any cleanup required.

Specified by:
destroy in class DataPlayer

nextIndex

public int nextIndex()

previousIndex

public int previousIndex()

remove

public void remove()

hasNext

public boolean hasNext()

hasPrevious

public boolean hasPrevious()

next

public java.lang.Object next()

previous

public java.lang.Object previous()

add

public void add(java.lang.Object o)

set

public void set(java.lang.Object o)

getPixelAspectRatio

public Rational getPixelAspectRatio()
Description copied from class: DataPlayer
Gets the pixel aspect ratio.

Specified by:
getPixelAspectRatio in class DataPlayer
Returns:
the aspect ratio of a single pixel (of the current frame, although I doubt it will change over the course of a video

getImageType

public java.lang.String getImageType(Instant i)
Always returns 'empty'.

Specified by:
getImageType in class DataPlayer
Parameters:
i - instant to check. Any instant works.
Returns:
empty-frame
See Also:
DataPlayer.getImageType(viper.api.time.Instant)

setElement

public void setElement(MediaElement element)
Modifies the current span and rate as indicated in the element

Specified by:
setElement in class DataPlayer
Parameters:
element - the new metadata for the file.

setMediator

public void setMediator(ViperViewMediator mediator)

Specified by:
setMediator in class DataPlayer