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

## quicktime.std.qtcomponents
Class DataCodecCompressor

    java.lang.Object
      |
      +--quicktime.QTObject
            |
            +--quicktime.std.comp.ComponentIdentifier
                  |
                  +--quicktime.std.comp.Component
                        |
                        +--quicktime.std.qtcomponents.DataCodecCompressor

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

public class DataCodecCompressor
extends Component
implements quicktime.jdirect.QuickTimeLib

Compresses data using the specified compressor

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

Constructor Summary
`DataCodecCompressor(ComponentIdentifier comp)` Given a component identifier it opens the specified component.
`DataCodecCompressor(int subType)` Opens the specified data codec compressor component, 'dcom', with the given subType.

Method Summary
`DataCodecInfo` | `compress(QTPointerRef srcData, QTPointerRef dstData)` Compress the specified data.
`int` | `getCompressBufferSize(int srcSize)` Returns the estimated maximum size of compressing the specified size bytes using this compressor.

Methods inherited from class quicktime.std.comp.Component
`count`

Methods inherited from class quicktime.std.comp.ComponentIdentifier
`find, find, getInfo, toString`

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

### DataCodecCompressor

    public DataCodecCompressor(int subType)
                        throws QTException

  Opens the specified data codec compressor component, 'dcom', with the given subType.
  QuickTime::OpenADefaultComponent
Parameters:
  `subType` - the compressor type that will be used to compress the data

### DataCodecCompressor

    public DataCodecCompressor(ComponentIdentifier comp)
                        throws QTException

  Given a component identifier it opens the specified component. The component type must be 'dcom' or an exception will be thrown as it is not a DataCodecCompressor.
  QuickTime::OpenAComponent
Parameters:
  `comp` - the component identifier to open

Method Detail

### compress

    public DataCodecInfo compress(QTPointerRef srcData,
                                  QTPointerRef dstData)
                           throws StdQTException

  Compress the specified data. Before calling the DataCodecCompress function, you should call the DataCodecGetCompressBufferSize function to obtain the maximum possible size of the compressed data that will be returned. You can then use this value as the value of the dstBufferSize parameter. Note that a buffer for compressed data that is the same size as the uncompressed data may not be large enough: in some cases, the size of the compressed data can be larger than the size of the decompressed data.
  QuickTime::DataCodecCompress

  Parameters:
    `srcData` - Contains a pointer to the data to be compressed.
    `dstData` - Contains a pointer to the buffer in which to store the compressed data.
  Returns:
    a DataCodecInfo that contains information about the compression.

### getCompressBufferSize

    public int getCompressBufferSize(int srcSize)
                              throws StdQTException

  Returns the estimated maximum size of compressing the specified size bytes using this compressor.
  QuickTime::DataCodecGetCompressBufferSize
  Parameters:
    `srcSize` - the size of the buffer that will be compressed.
  Returns:
    the size of the buffer you should allocate to contain the specified srcSize data

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