quicktime.streaming
Class Presentation

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.streaming.Presentation
All Implemented Interfaces:
quicktime.jdirect.QTStreamingLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class Presentation
extends QTObject
implements quicktime.jdirect.QTStreamingLib

The presentation class is the basis of a broadcast. It can manage one or more streams of content. Most presentation calls can refer to a specific stream or all streams if a stream is not specified.


Fields inherited from interface quicktime.jdirect.QTStreamingLib
JDirect_MacOSX, libraryInstance
 
Constructor Summary
Presentation(NewPresentationParams params)
          Creates a new presentation object from the presentation parameters
 
Method Summary
 void addSource(Stream s, Component sourcer, int flags)
          This method adds a source component to the presenter
static Presentation fromData(int dataType, QTPointerRef data, PresParams params)
          Creates a new presentation object from data
static Presentation fromDataRef(DataRef ref, PresParams params)
          (Not in carbon yet)
static Presentation fromFile(QTFile file, PresParams params)
          (Not in carbon yet)
 long getActiveSegmentDuration(Stream s)
          This method gets the duration of the active segment of the presenter
 long getActiveSegmentStart(Stream s)
          This method gets the start time of the active segment of the presenter
 Region getClip(Stream s)
          This method retrieves the clipping region of the presenter
 QDDimension getDimensions(Stream s)
          This method gets the dimensions of the presenter
 boolean getEnable(Stream s)
          This method returns true if the presentation is enabled
 int getFlags()
          This method retrieves the flags associated with the presentation
 GraphicsMode getGraphicsMode(Stream s)
          This method gets the graphics mode of the presenter
 QDGraphics getGWorld()
          This method retrieves the GWorld of the presenter
 QDGraphics getGWorld(Stream s)
          This method retrieves the GWorld of the presenter
 Stream getIndStream(int index)
          This method gets a stream owned by the presentation object from an index
 int getLeftVolume(Stream s)
          This method gets the left volume of the presenter
 Matrix getMatrix(Stream s)
          This method gets the matrix of the presenter
 int getNumSources(Stream s)
          This method returns the number of source components for the presenter
 int getNumStreams()
          This method gets the number of streams associated with the presentation
 Pict getPicture(Stream s)
          This method gets the picture associated with the presenter
 int getPlayHints(Stream s)
          This method gets the playing hints of the presenter
 float getPreferredRate()
          This method gets the preferred rate of the presentation
 boolean getPresenting(Stream s)
          This method returns the presenter's presentation mode
 int getRightVolume(Stream s)
          This method gets the right volume of the presenter
 TimeBase getTimeBase()
          This method retrieves the time base associated with the presentation
 int getTimeScale()
          This method retrieves the time scale associated with the presentation
 int getTotalDataRate()
          This method retreives the total data rate for all streams
 boolean hasCharacteristic(Stream s, int characteristic)
          This method returns true if the presentation has a specific characteristic
 void idle(PresIdleParams params)
          Provides processing time to the presentation component After starting a presentation, call this function as often as possible, until you stop the presentation by calling stop.
 void invalidateRegion(Region updateRgn)
          The invalidate function allows you to tell the presentation that it must refresh its display
 void preroll()
          This method previews all streams in the presentation with default parameters
 void preroll(int timeValue, float rate, int flags)
          This method previews all streams in the presentation
 void preroll(Stream s, int timeValue, float rate, int flags)
          This method previews the presentation with a specific stream
 void preroll(Stream s, long timeValue, float rate, int flags)
          This method previews the presentation with a specific stream
 void preview()
          This method previews the presentation with all streams
 void preview(long timeValue, float rate, int flags)
          This method previews the presentation with all streams
 void preview(Stream s, long timeValue, float rate, int flags)
          This method previews the presentation
 void removeSource(Stream s, Component sourcer, int flags)
          This method removes a source component from the presenter
 void setActiveSegment(Stream s, long startTime, long duration)
          This method sets the active segment of the presenter
 void setClip(Stream s, Region rgn)
          This method sets the clipping region of the presenter
 void setDimensions(Stream s, float width, float height)
          This method sets the dimensions of the presenter
 void setDimensions(Stream s, QDDimension dim)
          This method sets the dimensions of the presenter
 void setEnable(Stream s, boolean enableMode)
          This method specifies whether the presentation is enabled
 void setFlags(int flags, int mask)
          This method sets the flags associated with the presentation
 void setGraphicsMode(Stream s, int mode, QDColor opColor)
          This method sets the graphics mode of the presenter
 void setGWorld(QDGraphics gWorld)
          This method sets the GWorld of the presenter (uses the main device as the default GDevice)
 void setGWorld(Stream s, QDGraphics gWorld)
          This method sets the GWorld of the presenter (uses the main device as the default GDevice)
 void setGWorld(Stream s, QDGraphics gWorld, GDevice gd)
          This method sets the GWorld of the presenter
 void setMatrix(Stream s, Matrix matrix)
          This method sets the matrix of the presenter
 void setPlayHints(Stream s, int flags, int mask)
          This method sets the playing hints of the presenter
 void setPreferredRate(float rate, int flags)
          This method sets the preferred rate of the presentation
 void setPresenting(Stream s, boolean inPresentingMode)
          This method toggles the presenter's presentation mode
 void setVolumes(Stream s, int leftVol, int rightVol)
          This method sets the right and left volumes of the presenter
 void skipTo(int timeValue)
          This method skips to a specific point in the presentation
 void skipTo(long timeValue)
          This method skips to a specific point in the presentation (64 bit version)
 void start()
          This method starts all streams associated with the presentation using no flags
 void start(int flags)
          This method starts all streams associated with the presentation
 void start(Stream s, int flags)
          This method starts the specific stream associated with the presentation
 void stop()
          This method stops the presentation of all streams
 void stop(Stream s, int flags)
          This method stops the presentation of a specific stream
 
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Presentation

public Presentation(NewPresentationParams params)
             throws QTException
Creates a new presentation object from the presentation parameters
Parameters:
params - NewPresentationParams object containing information about the specified presentation
Method Detail

fromData

public static Presentation fromData(int dataType,
                                    QTPointerRef data,
                                    PresParams params)
                             throws QTException
Creates a new presentation object from data
Parameters:
dataType - an OSType specifying the type of the data
data - an array of integers containg the actual data for the presentation object
params - the PresParams object containing additional configuration information

fromFile

public static Presentation fromFile(QTFile file,
                                    PresParams params)
                             throws QTException
(Not in carbon yet)

fromDataRef

public static Presentation fromDataRef(DataRef ref,
                                       PresParams params)
                                throws QTException
(Not in carbon yet)

setFlags

public void setFlags(int flags,
                     int mask)
              throws QTException
This method sets the flags associated with the presentation

getFlags

public int getFlags()
             throws QTException
This method retrieves the flags associated with the presentation
Returns:
presentation flags

getTimeBase

public TimeBase getTimeBase()
                     throws QTException
This method retrieves the time base associated with the presentation
Returns:
TimeBase

getTimeScale

public int getTimeScale()
                 throws QTException
This method retrieves the time scale associated with the presentation
Returns:
time scale

getTotalDataRate

public int getTotalDataRate()
                     throws QTException
This method retreives the total data rate for all streams

hasCharacteristic

public boolean hasCharacteristic(Stream s,
                                 int characteristic)
                          throws QTException
This method returns true if the presentation has a specific characteristic
Parameters:
characteristic - OSType describing the characteristic
Returns:
true if the presentation has that characteristic

preview

public void preview()
             throws QTException
This method previews the presentation with all streams

preview

public void preview(long timeValue,
                    float rate,
                    int flags)
             throws QTException
This method previews the presentation with all streams

preview

public void preview(Stream s,
                    long timeValue,
                    float rate,
                    int flags)
             throws QTException
This method previews the presentation

preroll

public void preroll()
             throws QTException
This method previews all streams in the presentation with default parameters

preroll

public void preroll(int timeValue,
                    float rate,
                    int flags)
             throws QTException
This method previews all streams in the presentation

preroll

public void preroll(Stream s,
                    int timeValue,
                    float rate,
                    int flags)
             throws QTException
This method previews the presentation with a specific stream

preroll

public void preroll(Stream s,
                    long timeValue,
                    float rate,
                    int flags)
             throws QTException
This method previews the presentation with a specific stream

start

public void start()
           throws QTException
This method starts all streams associated with the presentation using no flags

start

public void start(int flags)
           throws QTException
This method starts all streams associated with the presentation
Parameters:
flags - the presentation flags

start

public void start(Stream s,
                  int flags)
           throws QTException
This method starts the specific stream associated with the presentation
Parameters:
s - stream
flags - the presentation flags

idle

public void idle(PresIdleParams params)
Provides processing time to the presentation component After starting a presentation, call this function as often as possible, until you stop the presentation by calling stop.
Parameters:
params - PresIdleParams

invalidateRegion

public void invalidateRegion(Region updateRgn)
                      throws QTException
The invalidate function allows you to tell the presentation that it must refresh its display
Parameters:
updateRgn - Indicates the part of the QDGraphics that has been changed If you set this parameter to null, the presentation uses the current visible region

skipTo

public void skipTo(int timeValue)
            throws QTException
This method skips to a specific point in the presentation
Parameters:
timeValue - the timeValue to skip to

skipTo

public void skipTo(long timeValue)
            throws QTException
This method skips to a specific point in the presentation (64 bit version)
Parameters:
timeValue - the time value to skip to

stop

public void stop()
          throws QTException
This method stops the presentation of all streams

stop

public void stop(Stream s,
                 int flags)
          throws QTException
This method stops the presentation of a specific stream
Parameters:
s - stream
flags - the presentation flags

getNumStreams

public int getNumStreams()
This method gets the number of streams associated with the presentation
Returns:
number of streams

getIndStream

public Stream getIndStream(int index)
                    throws QTException
This method gets a stream owned by the presentation object from an index
Parameters:
index - index of the stream to retrieve
Returns:
stream object

setPreferredRate

public void setPreferredRate(float rate,
                             int flags)
                      throws QTException
This method sets the preferred rate of the presentation
Parameters:
rate - the rate of the presentation
flags - additional flags

getPreferredRate

public float getPreferredRate()
                       throws QTException
This method gets the preferred rate of the presentation
Returns:
rate the rate of the presentation

setEnable

public void setEnable(Stream s,
                      boolean enableMode)
               throws QTException
This method specifies whether the presentation is enabled
Parameters:
s - stream
enableMode - true if the presentation should be enabled

getEnable

public boolean getEnable(Stream s)
                  throws QTException
This method returns true if the presentation is enabled
Parameters:
s - stream
Returns:
enabled state of the presentation

setPresenting

public void setPresenting(Stream s,
                          boolean inPresentingMode)
                   throws QTException
This method toggles the presenter's presentation mode
Parameters:
s - stream
inPresentingMode - sets the presentation mode to be presenting if true

getPresenting

public boolean getPresenting(Stream s)
                      throws QTException
This method returns the presenter's presentation mode
Parameters:
s - stream
Returns:
true if the presenter is presenting, false otherwise

setActiveSegment

public void setActiveSegment(Stream s,
                             long startTime,
                             long duration)
                      throws QTException
This method sets the active segment of the presenter
Parameters:
s - stream
startTime - the start time of the active segment
duration - the duration of the active segment

getActiveSegmentStart

public long getActiveSegmentStart(Stream s)
                           throws QTException
This method gets the start time of the active segment of the presenter
Parameters:
s - stream
Returns:
the start time of the active segment

getActiveSegmentDuration

public long getActiveSegmentDuration(Stream s)
                              throws QTException
This method gets the duration of the active segment of the presenter
Parameters:
s - stream
Returns:
the duration of the active segment

setPlayHints

public void setPlayHints(Stream s,
                         int flags,
                         int mask)
                  throws QTException
This method sets the playing hints of the presenter
Parameters:
s - stream
flags - the flags of the presenter
mask - the masks of the presenter

getPlayHints

public int getPlayHints(Stream s)
                 throws QTException
This method gets the playing hints of the presenter
Parameters:
s - stream
Returns:
play hints

setGWorld

public void setGWorld(Stream s,
                      QDGraphics gWorld,
                      GDevice gd)
               throws QTException
This method sets the GWorld of the presenter
Parameters:
s - stream
gWorld - qdGraphics object representing the gWorld
gd - GDevice

setGWorld

public void setGWorld(Stream s,
                      QDGraphics gWorld)
               throws QTException
This method sets the GWorld of the presenter (uses the main device as the default GDevice)
Parameters:
s - stream
gWorld - qdGraphics object representing the gWorld

setGWorld

public void setGWorld(QDGraphics gWorld)
               throws QTException
This method sets the GWorld of the presenter (uses the main device as the default GDevice)

getGWorld

public QDGraphics getGWorld(Stream s)
                     throws QTException
This method retrieves the GWorld of the presenter
Parameters:
s - stream
Returns:
qdGraphics object representing the gWorld

getGWorld

public QDGraphics getGWorld()
                     throws QTException
This method retrieves the GWorld of the presenter
Parameters:
s - stream
Returns:
qdGraphics object representing the gWorld

setClip

public void setClip(Stream s,
                    Region rgn)
             throws QTException
This method sets the clipping region of the presenter
Parameters:
s - stream
rgn - the clipping region

getClip

public Region getClip(Stream s)
               throws QTException
This method retrieves the clipping region of the presenter
Parameters:
s - stream
Returns:
the clipping region

setMatrix

public void setMatrix(Stream s,
                      Matrix matrix)
               throws QTException
This method sets the matrix of the presenter
Parameters:
s - stream
matrix - the matrix

getMatrix

public Matrix getMatrix(Stream s)
                 throws QTException
This method gets the matrix of the presenter
Parameters:
s - stream
Returns:
matrix the matrix

setDimensions

public void setDimensions(Stream s,
                          float width,
                          float height)
                   throws QTException
This method sets the dimensions of the presenter
Parameters:
s - stream
width - the width of the presenter
height - the height of the presenter

setDimensions

public void setDimensions(Stream s,
                          QDDimension dim)
                   throws QTException
This method sets the dimensions of the presenter
Parameters:
s - stream
dim - dimensions of the presenter

getDimensions

public QDDimension getDimensions(Stream s)
                          throws QTException
This method gets the dimensions of the presenter
Parameters:
s - stream
Returns:
dimensions of the presenter

setGraphicsMode

public void setGraphicsMode(Stream s,
                            int mode,
                            QDColor opColor)
                     throws QTException
This method sets the graphics mode of the presenter
Parameters:
s - stream
mode - the graphics mode of the presenter
opColor - the QDColor associated with the graphics mode (operand color)

getGraphicsMode

public GraphicsMode getGraphicsMode(Stream s)
                             throws QTException
This method gets the graphics mode of the presenter
Parameters:
s - stream
Returns:
the graphics mode of the presenter

getPicture

public Pict getPicture(Stream s)
                throws QTException
This method gets the picture associated with the presenter
Parameters:
s - stream
Returns:
the picture of the presenter

setVolumes

public void setVolumes(Stream s,
                       int leftVol,
                       int rightVol)
                throws QTException
This method sets the right and left volumes of the presenter
Parameters:
s - stream
leftVol - left sound channel volume
rightVol - right sound channel volume

getRightVolume

public int getRightVolume(Stream s)
                   throws QTException
This method gets the right volume of the presenter
Parameters:
s - stream
Returns:
right sound channel volume

getLeftVolume

public int getLeftVolume(Stream s)
                  throws QTException
This method gets the left volume of the presenter
Parameters:
s - stream
Returns:
left sound channel volume

addSource

public void addSource(Stream s,
                      Component sourcer,
                      int flags)
               throws QTException
This method adds a source component to the presenter
Parameters:
s - stream
sourcer - source component to be added
flags - additional flags

removeSource

public void removeSource(Stream s,
                         Component sourcer,
                         int flags)
                  throws QTException
This method removes a source component from the presenter
Parameters:
s - stream
sourcer - source component to be removed
flags - additional flags

getNumSources

public int getNumSources(Stream s)
This method returns the number of source components for the presenter
Parameters:
s - stream
Returns:
number of sources