Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.util
Class QTHandle

    java.lang.Object
      |
      +--quicktime.QTObject
            |
            +--quicktime.util.QTHandleRef
                  |
                  +--quicktime.util.QTHandle

All Implemented Interfaces:
  quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, com.apple.jdirect.SharedLibrary, quicktime.jdirect.SharedLibrary

Direct Known Subclasses:
  CurvePath, DataRef, MusicData, SndHandle

public class QTHandle
extends QTHandleRef
implements quicktime.jdirect.QuickTimeLib

The QTHandle class implements a handle that can be used in calls to QuickTime.

Fields inherited from interface quicktime.jdirect.QuickTimeLib
`JDirect_MacOSX, libraryInstance, name`

Constructor Summary
`QTHandle()` Allocate a handle of minimum size for general use.
`QTHandle(byte[] byteArray)` Construct a handle from input data.
`QTHandle(int size, boolean clear)` Allocate a handle for general use.
`QTHandle(QTHandleRef firstHandle, QTHandleRef secondHandle)` Construct a handle from the concatenation of the two handles supplied.
`QTHandle(QTPointerRef ptr, int offset, int size)` This constructor is used to create a QTHandle object from a QTPointer.

Method Summary
`java.lang.Object` | `clone()` Implementation of Cloneable Interface.
`void` | `concatenate(QTHandleRef hand)` Concatenates the supplied handle to this handle, resize the size of this handle to accomodate the second handle's data.
`static QTHandle` | `fromEncodedImage(EncodedImage image)` Returns EncodedImage data as a QTHandle.
`static QTHandle` | `fromGraphicsExporterInput(GraphicsExporter g)` Determines the data handle that is the source for input images to graphics export component QuickTime::GraphicsExportGetInputHandle
`static QTHandle` | `fromGraphicsExporterOutput(GraphicsExporter g)` Determines the data handle that is the source for input images to graphics export component QuickTime::GraphicsExportGetOutputHandle
`static QTHandle` | `fromGraphicsExporterText(GraphicsExporter g)` Determines the data handle that is the source for input images to graphics export component QuickTime::GraphicsExportGetSettingsAsText
`static QTHandle` | `fromGraphicsImporterAlias(GraphicsImporter gi)` Determines the aliased data reference.
`static QTHandle` | `fromGraphicsImporterData(GraphicsImporter gi)` Determines the data reference that the graphics resides in.
`static QTHandle` | `fromSoundDescription(SoundDescription sd, int idType)` Retrieve application specific info from a Sound Description object QuickTime::GetSoundDescriptionExtension
`static TimeCodeInfo` | `fromTimeCoderCurrent(TimeCoder tc)` Determines the time code from the time code handler at the current time value.
`static QTHandle` | `fromTimeCoderSource(TimeCoder tc, TimeCodeDescription tcd)` Allows you to retrieve the source information from the time code media sample.
`static TimeCodeInfo` | `fromTimeCoderTime(TimeCoder tc, int mediaTime)` Determines the time code from the time code handler.
`static QTHandle` | `fromTrack(Track t)` This method returns the sound localization settings for the track.
`static void` | `reserveMemory(int size)` Use reserve memory before you allocate a handle that you intend to keep locked for long periods of time.
`void` | `setSize(int size)` Resizes the handle to the specified size.

Methods inherited from class quicktime.util.QTHandleRef
`copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, fromCompressionDialogState, fromSCSequence, getBytes, getSize, inMemory, isLocked, lock, lockHigh, moveHigh, toQTPointer, toQTPointer, toString, unlock`

Methods inherited from class quicktime.QTObject
`disposeQTObject, equals, ID`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### QTHandle

    public QTHandle()
             throws QTException

  Allocate a handle of minimum size for general use.
  Parameters:
    `size` - the size of the handle to create.
    `clear` - clear the handle upon creation.

### QTHandle

    public QTHandle(int size,
                    boolean clear)
             throws QTException

  Allocate a handle for general use.
  QuickTime::NewHandle QuickTime::NewHandle
  QuickTime::NewHandleClear QuickTime::NewHandleClear
Parameters:
  `size` - the size of the handle to create.
  `clear` - clear the handle upon creation.

### QTHandle

    public QTHandle(byte[] byteArray)
             throws QTException

  Construct a handle from input data.
  Parameters:
    `byteArray` - the input data.

### QTHandle

    public QTHandle(QTPointerRef ptr,
                    int offset,
                    int size)
             throws QTException

  This constructor is used to create a QTHandle object from a QTPointer. The contents of the pointer will be copied into the handle. This will copy size bytes from the pointer + offset. It will bounds check the size to be not greater than the size of the pointer.
  QuickTime::PtrToHand
Parameters:
  `ptr` - the pointer to copy.
  `offset` - you can specify an offset within the pointer from which to copy the data
  `size` - the amount of bytes to copy

### QTHandle

    public QTHandle(QTHandleRef firstHandle,
                    QTHandleRef secondHandle)
             throws QTException

  Construct a handle from the concatenation of the two handles supplied. The First handle will appear first in the concatentated result.
  Parameters:
    `firstHandle` - the first Handle
    `secondHandle` - the second Handle

Method Detail

### fromGraphicsExporterText

    public static QTHandle fromGraphicsExporterText(GraphicsExporter g)
                                             throws QTException

  Determines the data handle that is the source for input images to graphics export component
  QuickTime::GraphicsExportGetSettingsAsText

  Returns:
    The handle to a QuickTime data handle.
  See Also:
    `GraphicsExporter.getInputHandle()`

### fromGraphicsExporterInput

    public static QTHandle fromGraphicsExporterInput(GraphicsExporter g)
                                              throws QTException

  Determines the data handle that is the source for input images to graphics export component
  QuickTime::GraphicsExportGetInputHandle

  Returns:
    The handle to a QuickTime data handle.
  See Also:
    `GraphicsExporter.getInputHandle()`

### fromGraphicsExporterOutput

    public static QTHandle fromGraphicsExporterOutput(GraphicsExporter g)
                                               throws QTException

  Determines the data handle that is the source for input images to graphics export component
  QuickTime::GraphicsExportGetOutputHandle

  Returns:
    The handle to a QuickTime data handle.
  See Also:
    `GraphicsExporter.getOutputHandle()`

### fromSoundDescription

    public static QTHandle fromSoundDescription(SoundDescription sd,
                                                int idType)
                                         throws QTException

  Retrieve application specific info from a Sound Description object
  QuickTime::GetSoundDescriptionExtension

  Parameters:
    `idType` - an OSType identifying the information for removal
  Returns:
    a dataref to the Extension
  See Also:
    `SoundDescription.getExtension(int)`

### fromGraphicsImporterData

    public static QTHandle fromGraphicsImporterData(GraphicsImporter gi)
                                             throws QTException

  Determines the data reference that the graphics resides in.
  QuickTime::GraphicsImportGetDataHandle

  Returns:
    The handle to a QuickTime data reference.
  See Also:
    `GraphicsImporter.getDataHandle()`

### fromGraphicsImporterAlias

    public static QTHandle fromGraphicsImporterAlias(GraphicsImporter gi)
                                              throws QTException

  Determines the aliased data reference.
  QuickTime::GraphicsImportGetAliasedDataReference

  Returns:
    The handle to the aliased data reference
  See Also:
    `GraphicsImporter.getAliasedDataReference()`

### fromTimeCoderTime

    public static TimeCodeInfo fromTimeCoderTime(TimeCoder tc,
                                                 int mediaTime)
                                          throws QTException

  Determines the time code from the time code handler.
  QuickTime::TCGetTimeCodeAtTime()

  Parameters:
    `mediaTime` - The time value of the media at which to retrieve the time code information.
  Returns:
    The information object containing the time code, its definition, and data.
  See Also:
    `TimeCoder.getAtTime(int)`

### fromTimeCoderCurrent

    public static TimeCodeInfo fromTimeCoderCurrent(TimeCoder tc)
                                             throws QTException

  Determines the time code from the time code handler at the current time value.
  QuickTime::TCGetCurrentTimeCode()

  Returns:
    The information object containing the time code, its definition, and data.
  See Also:
    `TimeCoder.getCurrent()`

### fromTimeCoderSource

    public static QTHandle fromTimeCoderSource(TimeCoder tc,
                                               TimeCodeDescription tcd)
                                        throws QTException

  Allows you to retrieve the source information from the time code media sample.
  QuickTime::TCGetSourceRef()

  Parameters:
    `tcd` - the description that describes the time code reference to be changed
  Returns:
    the source information that is found in the sample reference
  See Also:
    `TimeCoder.getSourceRef(quicktime.std.qtcomponents.TimeCodeDescription)`

### fromTrack

    public static QTHandle fromTrack(Track t)
                              throws QTException

  This method returns the sound localization settings for the track.
  QuickTime::GetTrackSoundLocalizationSettings()
  Returns:
    the sound localization settings for the track.
  See Also:
    `Track.getSoundLocalizationSettings()`

### fromEncodedImage

    public static QTHandle fromEncodedImage(EncodedImage image)
                                     throws QTException

  Returns EncodedImage data as a QTHandle. This will copy the data.
  Parameters:
    `image` - the encoded image data
  Returns:
    the encoded image data as a Handle

### reserveMemory

    public static void reserveMemory(int size)
                              throws UtilException

  Use reserve memory before you allocate a handle that you intend to keep locked for long periods of time.
  QuickTime::ReserveMem QuickTime::ReserveMem

  Parameters:
    `size` - the size of the handle you will allocate in the new Handle(size...) call

### setSize

    public void setSize(int size)
                 throws UtilException

  Resizes the handle to the specified size.
  QuickTime::SetHandleSize

  Parameters:
    `size` - the new size of the handle.

### concatenate

    public void concatenate(QTHandleRef hand)
                     throws UtilException

  Concatenates the supplied handle to this handle, resize the size of this handle to accomodate the second handle's data. Subclasses should overide this is a straight concatenation of the two handles are insufficient to preserve state.
  QuickTime::HandAndHand

### clone

    public java.lang.Object clone()

  Implementation of Cloneable Interface.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD