quicktime.std.image
Class DataRateParams

java.lang.Object
  |
  +--quicktime.util.QTByteObject
        |
        +--quicktime.std.image.DataRateParams
All Implemented Interfaces:
java.lang.Cloneable, quicktime.jdirect.PrimitivesLib, java.io.Serializable, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class DataRateParams
extends QTByteObject
implements quicktime.jdirect.PrimitivesLib, java.lang.Cloneable

The Image Compression Manager provides this object to allow your application to communicate information to compressors that can constrain compressed data to a specific data rate.

QuickTime:DataRateParams

See Also:
Serialized Form

Field Summary
static int kNativeSize
          This is the size (the number of bytes) that are required for this class
 
Fields inherited from interface quicktime.jdirect.PrimitivesLib
JDirect_MacOSX, libraryInstance
 
Constructor Summary
DataRateParams()
          Creates a DataRateParams object with no values set.
DataRateParams(int dataRate, int dataOverrun, int frameDuration, int keyFrameRate, int minSpatialQuality, int minTemporalQuality)
          Create a DataRateParams object and set the relevant values.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this class.
 int getDataOverrun()
          Gets the current number of bytes above or below the desired rate.
 int getDataRate()
          Gets the bytes per second to which the data rate is constrained.
 int getFrameDuration()
          Gets the duration of the current frame in milliseconds.
 int getKeyFrameRate()
          Gets the frequence of key frames.
 int getMinSpatialQuality()
          Gets the minimum spatial quality the compressor should use to meet the requested data rate.
 int getMinTemporalQuality()
          Gets the minimum temporal quality the compressor should use to meet the requested data rate.
 void setDataOverrun(int dataOverrun)
          Sets the number of bytes above or below the desired data rate.
 void setDataRate(int dataRate)
          Sets the bytes per second to which the data rate must be constrained.
 void setFrameDuration(int frameDuration)
          Sets the duration of the frame in milliseconds.
 void setKeyFrameRate(int keyFrameRate)
          Sets the frequence of key frames.
 void setMinSpatialQuality(int minSpatialQuality)
          Sets the minimum spatial quality the compressor should use to meet the requested data rate.
 void setMinTemporalQuality(int minTemporalQuality)
          Sets the minimum temporal quality the compressor should use to meet the requested data rate.
 
Methods inherited from class quicktime.util.QTByteObject
equals, fromArray, getBytes, getSize, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kNativeSize

public static final int kNativeSize
This is the size (the number of bytes) that are required for this class
Constructor Detail

DataRateParams

public DataRateParams()
Creates a DataRateParams object with no values set.

DataRateParams

public DataRateParams(int dataRate,
                      int dataOverrun,
                      int frameDuration,
                      int keyFrameRate,
                      int minSpatialQuality,
                      int minTemporalQuality)
Create a DataRateParams object and set the relevant values.
Parameters:
dataRate - the bytes/second to which the data rate must be constrained
dataOverrun - number of bytes above or below the desired rate, if your application does not know the data overrun, this value should be zero.
frameDuration - in milliseconds
keyFrameRate - the frequency of key frames
minSpatialQuality - the minimum spatial quality the compressor should use to meet the requested data rate
minTemporalQuality - the minimum temporal quality the compressor should use to meet the requested data rate
Method Detail

getDataRate

public int getDataRate()
Gets the bytes per second to which the data rate is constrained.

getDataOverrun

public int getDataOverrun()
Gets the current number of bytes above or below the desired rate. A value of zero means that the data rate is being met exactly.
Returns:
the data overrun in bytes

getFrameDuration

public int getFrameDuration()
Gets the duration of the current frame in milliseconds.
Returns:
the current frame duration in milliseconds

getKeyFrameRate

public int getKeyFrameRate()
Gets the frequence of key frames. This frequency is normally identical to the key frame rate passed to the compressBegin method.
Returns:
the key frame rate

getMinSpatialQuality

public int getMinSpatialQuality()
Gets the minimum spatial quality the compressor should use to meet the requested data rate.
Returns:
the minimum spatial quality

getMinTemporalQuality

public int getMinTemporalQuality()
Gets the minimum temporal quality the compressor should use to meet the requested data rate.
Returns:
the minimum temporal quality

setDataRate

public void setDataRate(int dataRate)
Sets the bytes per second to which the data rate must be constrained.
Parameters:
dataRate - in bytes/second

setDataOverrun

public void setDataOverrun(int dataOverrun)
Sets the number of bytes above or below the desired data rate. If your application does not know the data overrun, this value should be set to zero.
Parameters:
dataOverrun - number of bytes

setFrameDuration

public void setFrameDuration(int frameDuration)
Sets the duration of the frame in milliseconds.
Parameters:
frameDuration - in milliseconds

setKeyFrameRate

public void setKeyFrameRate(int keyFrameRate)
Sets the frequence of key frames. This frequency is normally identical to the key frame rate passed to the compressBegin method.
Parameters:
keyFrameRate - the frequency

setMinSpatialQuality

public void setMinSpatialQuality(int minSpatialQuality)
Sets the minimum spatial quality the compressor should use to meet the requested data rate.
Parameters:
minSpatialQuality - an int

setMinTemporalQuality

public void setMinTemporalQuality(int minTemporalQuality)
Sets the minimum temporal quality the compressor should use to meet the requested data rate.
Parameters:
minTemporalQuality - an int

clone

public java.lang.Object clone()
Returns a copy of this class.