com.tuneology.avm.qtplugin
Class QTPlugin

java.lang.Object
  |
  +--com.tuneology.avm.player.Player
        |
        +--com.tuneology.avm.qtplugin.QTPlugin
All Implemented Interfaces:
AudioPlayer, MediaPlayer, VideoPlayer

public class QTPlugin
extends Player
implements VideoPlayer, AudioPlayer

An interface to the QuickTime player on Windows and MacOS.

Version:
$Id: QTPlugin.java,v 1.9 2003/07/10 19:52:13 xnarf Exp $
Author:
Fran Taylor

Fields inherited from class com.tuneology.avm.player.Player
dev, listeners, looping
 
Constructor Summary
QTPlugin(java.lang.String dev, java.lang.String name)
           
 
Method Summary
 void close()
          Close the player and release its resources.
 void cueFile(MediaData md)
          Loads a file, sets the current position to the beginning, and pauses.
 java.awt.Component getCanvas()
           
static java.lang.String getDescription()
           
 int getSize()
          Returns the maximum size of the current file.
static java.lang.String getVersionString()
           
 Volume getVolume()
          Gets the audio output volume of the CD player.
 VolumeRange getVolumeRange()
           
 void jumpTo(int pos)
          Moves the current position.
 void pause()
          Temporarily stops playing at the current position.
 void play()
          Starts playing after calling stop or cuefile.
 boolean playFile(java.lang.String url)
          Play the file, blocking until it's done.
 void playNextTrack()
           
 void playPrevTrack()
           
 void playStream(java.io.InputStream str)
           
 void setArtist(java.lang.String artist)
           
 void setTitle(java.lang.String ttl)
           
 void setTotal(int secs)
           
 void setTrack(int track)
           
 void setVolume(Volume vol)
          Sets the audio output volume of the CD player.
 void shutdown()
           
 void stop()
          Stops playing and resets the current position to the beginning.
 void unpause()
          Starts playing after calling pause.
 
Methods inherited from class com.tuneology.avm.player.Player
addStatusListener, findPlayerClass, findVideoPlayerClass, formatSeconds, getAudioDevices, getAudioPlayers, getDescription, getDevice, getDeviceDescription, getLoop, getName, getVersions, getVideoPlayers, initInstance, newMediaPlayer, removeStatusListener, setDevice, setLoop, shutdownPlayers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tuneology.avm.player.MediaPlayer
addStatusListener, getDevice, getLoop, getName, removeStatusListener, setDevice, setLoop
 

Constructor Detail

QTPlugin

public QTPlugin(java.lang.String dev,
                java.lang.String name)
         throws java.lang.Exception
Method Detail

setTotal

public void setTotal(int secs)
Specified by:
setTotal in interface MediaPlayer

getCanvas

public java.awt.Component getCanvas()
Specified by:
getCanvas in interface MediaPlayer
Overrides:
getCanvas in class Player

playStream

public void playStream(java.io.InputStream str)
                throws java.lang.Exception
Specified by:
playStream in interface MediaPlayer
Parameters:
str -  
Throws:
java.lang.Exception -  

cueFile

public void cueFile(MediaData md)
             throws java.lang.Exception
Description copied from interface: MediaPlayer
Loads a file, sets the current position to the beginning, and pauses. Call unpause() to begin playing.
Specified by:
cueFile in interface MediaPlayer
Parameters:
md -  
Throws:
java.lang.Exception -  

getSize

public int getSize()
            throws java.lang.Exception
Description copied from interface: MediaPlayer
Returns the maximum size of the current file.
Specified by:
getSize in interface MediaPlayer
Returns:
the size of the current file.
Throws:
java.lang.Exception -  

playNextTrack

public void playNextTrack()
                   throws java.lang.Exception
Specified by:
playNextTrack in interface MediaPlayer
Throws:
java.lang.Exception -  

playPrevTrack

public void playPrevTrack()
                   throws java.lang.Exception
Specified by:
playPrevTrack in interface MediaPlayer
Throws:
java.lang.Exception -  

jumpTo

public void jumpTo(int pos)
            throws java.lang.Exception
Description copied from interface: MediaPlayer
Moves the current position. Valid values are 0 - getSize(). If the player was playing, it will continue playing at the new position. If the player was paused, it will remain paused at the new position.
Specified by:
jumpTo in interface MediaPlayer
Parameters:
pos -  
Throws:
java.lang.Exception -  

play

public void play()
          throws java.lang.Exception
Description copied from interface: MediaPlayer
Starts playing after calling stop or cuefile.
Specified by:
play in interface MediaPlayer
Throws:
java.lang.Exception -  

pause

public void pause()
           throws java.lang.Exception
Description copied from interface: MediaPlayer
Temporarily stops playing at the current position.
Specified by:
pause in interface MediaPlayer
Throws:
java.lang.Exception -  

unpause

public void unpause()
             throws java.lang.Exception
Description copied from interface: MediaPlayer
Starts playing after calling pause.
Specified by:
unpause in interface MediaPlayer
Throws:
java.lang.Exception -  

stop

public void stop()
          throws java.lang.Exception
Description copied from interface: MediaPlayer
Stops playing and resets the current position to the beginning.
Specified by:
stop in interface MediaPlayer
Throws:
java.lang.Exception -  

getVolumeRange

public VolumeRange getVolumeRange()
Specified by:
getVolumeRange in interface MediaPlayer

getVolume

public Volume getVolume()
                 throws java.io.IOException
Gets the audio output volume of the CD player.
Specified by:
getVolume in interface MediaPlayer
Returns:
volume level.
Throws:
java.io.IOException -  

setVolume

public void setVolume(Volume vol)
               throws java.io.IOException
Sets the audio output volume of the CD player.
Specified by:
setVolume in interface MediaPlayer
Parameters:
vol -  
Throws:
java.io.IOException -  

close

public void close()
           throws java.lang.Exception
Description copied from interface: MediaPlayer
Close the player and release its resources.
Specified by:
close in interface MediaPlayer
Throws:
java.lang.Exception -  

shutdown

public void shutdown()
Overrides:
shutdown in class Player

getVersionString

public static java.lang.String getVersionString()
Returns:
the version string.

getDescription

public static java.lang.String getDescription()

setArtist

public void setArtist(java.lang.String artist)
Specified by:
setArtist in interface MediaPlayer

setTitle

public void setTitle(java.lang.String ttl)
Specified by:
setTitle in interface MediaPlayer

setTrack

public void setTrack(int track)
Specified by:
setTrack in interface MediaPlayer

playFile

public boolean playFile(java.lang.String url)
                 throws java.lang.Exception
Description copied from interface: MediaPlayer
Play the file, blocking until it's done.
Specified by:
playFile in interface MediaPlayer
Parameters:
f -  
Throws:
java.lang.Exception -