Class SEQPlayer

All Implemented Interfaces:
Runnable, ColorCyclePlayer, Player, StateModel

public class SEQPlayer extends AbstractPlayer implements ColorCyclePlayer
Player for Cyberpaint Sequence animations (*.SEQ).

Reference:
http://www.atari-forum.com/wiki/index.php/ST_Picture_Formats

Author:
Werner Randelshofer, Hausmatt 10, CH-6405 Goldau, Switzerland
  • Constructor Details

    • SEQPlayer

      public SEQPlayer(InputStream in)
    • SEQPlayer

      public SEQPlayer(InputStream in, int inputFileSize, boolean loadAudio)
      Creates a new instance.
      Parameters:
      in - InputStream containing an IFF ANIM file.
      inputFileSize - The size of the input file. Provide the value -1 if this is not known.
      loadAudio - Provide value false if this player should not load audio data.
  • Method Details

    • setPreferredColorModel

      public void setPreferredColorModel(ColorModel cm)
      Sets the preferred color model. If this color model is the same as the one used by the screen device showing the animation, then this may considerably improve the performance of the player. Setting this to null will let the player choose a color model that best suits the media being played. Calling this method has no effect, if the player is already realized.
    • getTimeModel

      public BoundedRangeModel getTimeModel()
      Returns the bounded range model that represents the time line of the player.
      Specified by:
      getTimeModel in interface Player
    • setAudioEnabled

      public void setAudioEnabled(boolean newValue)
      Enables or disables audio playback.
      Specified by:
      setAudioEnabled in interface Player
    • isAudioEnabled

      public boolean isAudioEnabled()
      Returns true if audio playback is enabled.
      Specified by:
      isAudioEnabled in interface Player
    • setSwapSpeakers

      public void setSwapSpeakers(boolean newValue)
      Swaps left and right speakers if set to true.
    • isSwapSpeakers

      public boolean isSwapSpeakers()
      Returns true if left and right speakers are swapped.
    • getCachingModel

      public BoundedRangeModel getCachingModel()
      Returns the bounded range model that represents the amount of data being fetched from the file the movie is stored in.
      Specified by:
      getCachingModel in interface Player
    • getImageProducer

      protected ImageProducer getImageProducer()
      Returns the image producer that produces the animation frames.
    • getMovieTrack

      public SEQMovieTrack getMovieTrack()
      Returns the movie track.
    • getVisualComponent

      public Component getVisualComponent()
      Obtain the display Component for this Player. The display Component is where visual media is rendered. If this Player has no visual component, getVisualComponent returns null. For example, getVisualComponent might return null if the Player only plays audio.
      Specified by:
      getVisualComponent in interface Player
    • getControlPanelComponent

      public Component getControlPanelComponent()
      Obtain the Component that provides the default user interface for controlling this Player. If this Player has no default control panel, getControlPanelComponent returns null.
      Specified by:
      getControlPanelComponent in interface Player
    • doUnrealized

      protected void doUnrealized()
      Does the unrealized state.
      Specified by:
      doUnrealized in class AbstractPlayer
    • doRealizing

      protected void doRealizing()
      Does the realizing state.
      Specified by:
      doRealizing in class AbstractPlayer
    • doRealized

      protected void doRealized()
      Does the realized state.
      Specified by:
      doRealized in class AbstractPlayer
    • doPrefetching

      protected void doPrefetching()
      Does the prefetching state.
      Specified by:
      doPrefetching in class AbstractPlayer
    • doPrefetched

      protected void doPrefetched()
      Does the prefetched state.
      Specified by:
      doPrefetched in class AbstractPlayer
    • setPlayEveryFrame

      public void setPlayEveryFrame(boolean newValue)
    • setDebug

      public void setDebug(boolean newValue)
      Set this to true to treat the two wrapup frames at the end of the animation like regular frames.
    • isPlayWrapupFrames

      public boolean isPlayWrapupFrames()
      Always returns true.
    • setFramesPerSecond

      public void setFramesPerSecond(float framesPerSecond)
      Setting frames per second overrides all frame duration settings in the frames of the the movie track.
      Parameters:
      framesPerSecond - Frames per section. Set this to 0f if you do not want to override the frame durations in the frames of the movie track.
    • setGlobalFrameDuration

      public void setGlobalFrameDuration(int frameDuration)
      Setting the global frame duration overrides all frame duration settings in the frames of the the movie track.
      Parameters:
      frameDuration - Frame Duration in milliseconds. Set this to -1 if you do not want to override the frame durations in the frames of the movie track.
    • isPlayEveryFrame

      public boolean isPlayEveryFrame()
    • setLoop

      public void setLoop(boolean newValue)
    • isLoop

      public boolean isLoop()
    • getDeltaOperationDescription

      public String getDeltaOperationDescription()
    • doStarted

      protected void doStarted()
      Does the started state. Is called by run(). Does not change the value of targetState but may change state in case of an error.
      Specified by:
      doStarted in class AbstractPlayer
    • doClosed

      protected void doClosed()
      Closes the player.
      Specified by:
      doClosed in class AbstractPlayer
    • getTotalDuration

      public long getTotalDuration()
      Returns the total duration in milliseconds.
      Specified by:
      getTotalDuration in interface Player
    • isCached

      public boolean isCached()
      Returns true when the player has completely cached all movie data. This player informs all property change listeners, when the value of this property changes. The name of the property is 'cached'.
      Specified by:
      isCached in interface Player
    • isAudioAvailable

      public boolean isAudioAvailable()
      Returns true if audio is available.
      Specified by:
      isAudioAvailable in interface Player
    • setPingPong

      public void setPingPong(boolean newValue)
    • isPingPong

      public boolean isPingPong()
    • isColorCyclingStarted

      public boolean isColorCyclingStarted()
      Returns true if color cycling is available in the movie track.
      Specified by:
      isColorCyclingStarted in interface ColorCyclePlayer
    • setColorCyclingStarted

      public void setColorCyclingStarted(boolean newValue)
      Starts or stops color cycling.
      Specified by:
      setColorCyclingStarted in interface ColorCyclePlayer
    • isColorCyclingAvailable

      public boolean isColorCyclingAvailable()
      Starts or stops color cycling.
      Specified by:
      isColorCyclingAvailable in interface ColorCyclePlayer
    • setBlendedColorCycling

      public void setBlendedColorCycling(boolean newValue)
      Sets whether colors are blended during color cycling.
      Specified by:
      setBlendedColorCycling in interface ColorCyclePlayer
    • isBlendedColorCycling

      public boolean isBlendedColorCycling()
      Returns true if colors are blended during color cycling.
      Specified by:
      isBlendedColorCycling in interface ColorCyclePlayer