quicktime.app.players
Class MoviePlayer

java.lang.Object
  |
  +--quicktime.app.players.MoviePlayer
All Implemented Interfaces:
AudioSpec, Drawable, DrawingNotifier, Listener, Playable, QTDrawable, Timeable, Transformable

Deprecated. since QTJava 6.1

public class MoviePlayer
extends java.lang.Object
implements QTDrawable, Playable, AudioSpec, DrawingNotifier

The MoviePlayer class allows your application to display, play and control any QuickTime movie. The MoviePlayer object works with the QTCanvas to be displayed in a Java AWT Container.

See Also:
QTCanvas, Movie

Field Summary
 
Fields inherited from interface quicktime.app.players.Playable
kDurationUnknown
 
Constructor Summary
MoviePlayer(Movie mov)
          Deprecated. since QTJava 6.1
 
Method Summary
 void addDrawingListener(DrawingListener listener)
          Deprecated. since QTJava 6.1
 void addedTo(java.lang.Object interest)
          Deprecated. since QTJava 6.1
 Region getClip()
          Deprecated. since QTJava 6.1
 QDRect getDisplayBounds()
          Deprecated. since QTJava 6.1
 int getDuration()
          Deprecated. since QTJava 6.1
 QDGraphics getGWorld()
          Deprecated. since QTJava 6.1
 java.awt.Dimension getInitialSize()
          Deprecated. since QTJava 4.0
 Matrix getMatrix()
          Deprecated. since QTJava 6.1
 Movie getMovie()
          Deprecated. This allows you to access the contained movie controller.
 QDDimension getOriginalSize()
          Deprecated. since QTJava 6.1
 float getRate()
          Deprecated. since QTJava 6.1
 int getScale()
          Deprecated. since QTJava 6.1
 int getTime()
          Deprecated. since QTJava 6.1
 TimeBase getTimeBase()
          Deprecated. since QTJava 6.1
 float getVolume()
          Deprecated. since QTJava 6.1
 boolean isMuted()
          Deprecated. since QTJava 6.1
 void redraw(Region invalidRgn)
          Deprecated. since QTJava 6.1
 void removedFrom(java.lang.Object interest)
          Deprecated. since QTJava 6.1
 void removeDrawingListener(DrawingListener listener)
          Deprecated. since QTJava 6.1
 void setClip(Region theClip)
          Deprecated. since QTJava 6.1
 void setDisplayBounds(QDRect bounds)
          Deprecated. since QTJava 6.1
 void setGWorld(QDGraphics cgp)
          Deprecated. since QTJava 6.1
 void setLocation(int x, int y)
          Deprecated. since QTJava 6.1
 void setMatrix(Matrix matrix)
          Deprecated. since QTJava 6.1
 void setMuted(boolean flag)
          Deprecated. since QTJava 6.1
 void setRate(float rate)
          Deprecated. since QTJava 6.1
 void setTime(int time)
          Deprecated. since QTJava 6.1
 void setVolume(float val)
          Deprecated. since QTJava 6.1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoviePlayer

public MoviePlayer(Movie mov)
            throws StdQTException
Deprecated. since QTJava 6.1

This constructor creates a MoviePlayer object given a QuickTime Movie object.

Parameters:
mov - a Movie object
Method Detail

getMovie

public Movie getMovie()
Deprecated. 
This allows you to access the contained movie controller. * @deprecated since QTJava 6.1


addedTo

public void addedTo(java.lang.Object interest)
Deprecated. since QTJava 6.1

This method is called by the specified object when the instance of the class that implements this interface is added to the object that is the source of the interest.

Specified by:
addedTo in interface Listener
Parameters:
interest - the object that is to be the source of interest for the the object that implements this interface.

removedFrom

public void removedFrom(java.lang.Object interest)
Deprecated. since QTJava 6.1

This method is called by the specified object when the instance of the class that implements this interface is removed from the object that is the source of the interest.

Specified by:
removedFrom in interface Listener
Parameters:
interest - the object that was the source of interest for the the object that implements this interface.

getGWorld

public QDGraphics getGWorld()
                     throws StdQTException
Deprecated. since QTJava 6.1

QTCanvas calls this method to get the destination QDGraphics of its client.

Specified by:
getGWorld in interface QTDrawable
Returns:
a QDGraphics object or null
StdQTException

setGWorld

public void setGWorld(QDGraphics cgp)
               throws StdQTException
Deprecated. since QTJava 6.1

QTCanvas calls this method to give the client the QDGraphics object it should use to do its drawing. If the incoming QDGraphics is the QDGraphics.scratch then the drawable will not be visible and can disable itself. If a client is unable to set the graphics world it should throw an exception.

Specified by:
setGWorld in interface QTDrawable
Parameters:
cgp - a QDGraphics object
StdQTException

getInitialSize

public java.awt.Dimension getInitialSize()
                                  throws QTException
Deprecated. since QTJava 4.0

This method returns the original size before the transformations specified in the returned matrix are applied.

QTException
See Also:
()

getOriginalSize

public QDDimension getOriginalSize()
                            throws QTException
Deprecated. since QTJava 6.1

This method returns the original size before the transformations specified in the returned matrix are applied.

Specified by:
getOriginalSize in interface Transformable
Returns:
the original size.
QTException

getMatrix

public Matrix getMatrix()
                 throws StdQTException
Deprecated. since QTJava 6.1

This will return the client's current display transformations

Specified by:
getMatrix in interface Transformable
Returns:
the display transformations of the client
StdQTException

setMatrix

public void setMatrix(Matrix matrix)
               throws QTException
Deprecated. since QTJava 6.1

This method sets the current matrix of the Transformable object to the new matrix.

Specified by:
setMatrix in interface Transformable
QTException

redraw

public final void redraw(Region invalidRgn)
                  throws QTException
Deprecated. since QTJava 6.1

QTCanvas calls this method when the client should redraw itself. If the canvas is able to discern that only a part of the client's drawing area needs to be redrawn - then this area shall be passed in using the invalidRgn. Otherwise this will be null in which case the client should redraw itself entirely.

Specified by:
redraw in interface Drawable
Parameters:
invalidRgn - the invalidRgn that the client should redraw
QTException

setDisplayBounds

public void setDisplayBounds(QDRect bounds)
                      throws StdQTException
Deprecated. since QTJava 6.1

This method is called automatically via the QTCanvas object associated with this client to set the boundary of the movie.

Specified by:
setDisplayBounds in interface Drawable
Parameters:
bounds - a QDRect object describing the boundary
StdQTException

setLocation

public void setLocation(int x,
                        int y)
                 throws QTException
Deprecated. since QTJava 6.1

A convenience method to set the position of a QTDrawable object.

Specified by:
setLocation in interface QTDrawable
Parameters:
x - the new x location
y - the new y location
QTException

getDisplayBounds

public QDRect getDisplayBounds()
                        throws StdQTException
Deprecated. since QTJava 6.1

This method is called automatically via the QTCanvas object associated with this client to set the boundary of the movie.

Specified by:
getDisplayBounds in interface Drawable
Returns:
the display boundary of the client
StdQTException

setClip

public void setClip(Region theClip)
             throws QTException
Deprecated. since QTJava 6.1

This method allows you to set a MoviePlayer's clipping region.

Specified by:
setClip in interface QTDrawable
Parameters:
theClip - a Region that defines the player's clipping region.
QTException

getClip

public Region getClip()
               throws QTException
Deprecated. since QTJava 6.1

This method allows you to obtain information describing a MoviePlayer's clipping regions.

Specified by:
getClip in interface QTDrawable
Returns:
the clipping region of the entire MoviePlayer object
QTException

setTime

public void setTime(int time)
             throws StdQTException
Deprecated. since QTJava 6.1

Sets the player to the time specified. This time value at this level is a totally arbitrary value - what time that means in "real time" is determined by the implementor of the interface, typically the scale value will determine what a "real" time of 1 second is.

Specified by:
setTime in interface Playable
Parameters:
time - the new time value
StdQTException

getTime

public int getTime()
            throws StdQTException
Deprecated. since QTJava 6.1

Returns the current time value of the object.

Specified by:
getTime in interface Playable
Returns:
the current time.
StdQTException

getDuration

public int getDuration()
                throws StdQTException
Deprecated. since QTJava 6.1

Returns the duration of the media attached to the player. If the player has no media, or does not know the duration of its media it can return the constant kDurationUnknown.

Specified by:
getDuration in interface Playable
Returns:
the media duration.
StdQTException

getTimeBase

public TimeBase getTimeBase()
                     throws QTException
Deprecated. since QTJava 6.1

Returns the TimeBase of the media attached to the player.

Specified by:
getTimeBase in interface Timeable
Returns:
the players TimeBase.
QTException

setRate

public void setRate(float rate)
             throws StdQTException
Deprecated. since QTJava 6.1

Sets the player to the playback rate. Typically a rate of zero will mean that the player is stopped, a positive value that the player is playing forwards, a negative value that the player is playing backwards.

Specified by:
setRate in interface Timeable
Parameters:
rate - the new playback rate.
StdQTException

addDrawingListener

public void addDrawingListener(DrawingListener listener)
Deprecated. since QTJava 6.1

Registers an object as a listener of the MoviePlayer. The object will receive notification when the MoviePlayer draws a frame

Specified by:
addDrawingListener in interface DrawingNotifier

removeDrawingListener

public void removeDrawingListener(DrawingListener listener)
Deprecated. since QTJava 6.1

Removes an object that is a listener of the MoviePlayer. The object will no longer receive notification when the MoviePlayer draws a frame

Specified by:
removeDrawingListener in interface DrawingNotifier

getRate

public float getRate()
              throws StdQTException
Deprecated. since QTJava 6.1

Returns the current rate of the player.

Specified by:
getRate in interface Timeable
Returns:
the playback rate
StdQTException

getScale

public int getScale()
             throws QTException
Deprecated. since QTJava 6.1

Returns the time scale of the player - how many ticks per second.

Specified by:
getScale in interface Playable
Returns:
the current scale.
QTException

getVolume

public float getVolume()
                throws QTException
Deprecated. since QTJava 6.1

Returns the volume setting (0 is silent, 1 is unity gain).

Specified by:
getVolume in interface AudioSpec
Returns:
a float
QTException

setVolume

public void setVolume(float val)
               throws QTException
Deprecated. since QTJava 6.1

Sets the volume.

Specified by:
setVolume in interface AudioSpec
Parameters:
val - the new volume
QTException

isMuted

public boolean isMuted()
                throws QTException
Deprecated. since QTJava 6.1

Returns the current mute status.

Specified by:
isMuted in interface AudioSpec
Returns:
a boolean
QTException

setMuted

public void setMuted(boolean flag)
              throws QTException
Deprecated. since QTJava 6.1

Allows the muting of the specific channel. When unmuted the AudioSpec object will return to its current volume setting.

Specified by:
setMuted in interface AudioSpec
Parameters:
flag - turn muting on - true or off - false.
QTException