home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ImageCodec.h
-
- Contains: QuickTime interfaces
-
- Version:
-
- DRI: Jim Batson
-
- Copyright: © 1984-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Warning: *** APPLE INTERNAL USE ONLY ***
- This file may contain unreleased API's
-
- BuildInfo: Built by: QuickTime
- With Interfacer: 1.1d11
- From: ImageCodec.i
- Revision: 0
- Dated: 08/07/95
- Last change by: JB
- Last comment: This is a fake header used so interfacer is happy.
-
- Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- List the version information (from above) in the Problem Description.
-
- */
-
- #ifndef __IMAGECODEC__
- #define __IMAGECODEC__
-
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- /* #include <ConditionalMacros.h> */
-
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
- /* #include <MixedMode.h> */
- /* #include <QuickdrawText.h> */
-
- #ifndef __QDOFFSCREEN__
- #include <QDOffscreen.h>
- #endif
- /* #include <Errors.h> */
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
- /* #include <Memory.h> */
- /* #include <Events.h> */
- /* #include <OSUtils.h> */
- /* #include <Controls.h> */
- /* #include <Menus.h> */
-
- #ifndef __IMAGECOMPRESSION__
- #include <ImageCompression.h>
- #endif
- /* #include <Components.h> */
- /* #include <StandardFile.h> */
- /* #include <Dialogs.h> */
- /* #include <TextEdit.h> */
- /* #include <Files.h> */
-
- #ifndef __MOVIES__
- #include <Movies.h>
- #endif
- /* #include <Aliases.h> */
- /* #include <AppleTalk.h> */
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if GENERATINGPOWERPC
- #pragma options align=mac68k
- #endif
-
- #ifdef __CFM68K__
- #pragma import on
- #endif
-
-
- enum {
- codecGetCodecInfo = 0x00,
- codecGetCompressionTime = 0x01,
- codecGetMaxCompressionSize = 0x02,
- codecPreCompress = 0x03,
- codecBandCompress = 0x04,
- codecPreDecompress = 0x05,
- codecBandDecompress = 0x06,
- codecCDSequenceBusy = 0x07,
- codecGetCompressedImageSize = 0x08,
- codecGetSimilarity = 0x09,
- codecTrimImage = 0x0A,
- codecRequestSettings = 0x0B,
- codecGetSettings = 0x0C,
- codecSetSettings = 0x0D,
- codecCDSequenceFlush = 0x0E,
- codecSetTimeCode = 0x0F,
- codecIsImageDescriptionEquivalent = 0x10,
- codecNewMemory = 0x11,
- codecDisposeMemory = 0x12,
- codecHitTestData = 0x13
- };
-
- enum {
- codecCanScale = 1L << 0,
- codecCanMask = 1L << 1,
- codecCanMatte = 1L << 2,
- codecCanTransform = 1L << 3,
- codecCanTransferMode = 1L << 4,
- codecCanCopyPrev = 1L << 5,
- codecCanSpool = 1L << 6,
- codecCanClipVertical = 1L << 7,
- codecCanClipRectangular = 1L << 8,
- codecCanRemapColor = 1L << 9,
- codecCanFastDither = 1L << 10,
- codecCanSrcExtract = 1L << 11,
- codecCanCopyPrevComp = 1L << 12,
- codecCanAsync = 1L << 13,
- codecCanMakeMask = 1L << 14,
- codecCanShift = 1L << 15,
- codecCanAsyncWhen = 1L << 16,
- codecCanShieldCursor = 1L << 17,
- codecCanManagePrevBuffer = 1L << 18,
- codecHasVolatileBuffer = 1L << 19,
- codecWantsRegionMask = 1L << 20
- };
-
- struct CodecCapabilities {
- long flags;
- short wantedPixelSize;
- short extendWidth;
- short extendHeight;
- short bandMin;
- short bandInc;
- short pad;
- unsigned long time;
- };
- typedef struct CodecCapabilities CodecCapabilities;
-
-
- enum {
- codecConditionFirstBand = 1L << 0,
- codecConditionLastBand = 1L << 1,
- codecConditionFirstFrame = 1L << 2,
- codecConditionNewDepth = 1L << 3,
- codecConditionNewTransform = 1L << 4,
- codecConditionNewSrcRect = 1L << 5,
- codecConditionNewMask = 1L << 6,
- codecConditionNewMatte = 1L << 7,
- codecConditionNewTransferMode = 1L << 8,
- codecConditionNewClut = 1L << 9,
- codecConditionNewAccuracy = 1L << 10,
- codecConditionNewDestination = 1L << 11,
- codecConditionFirstScreen = 1L << 12,
- codecConditionDoCursor = 1L << 13,
- codecConditionCatchUpDiff = 1L << 14,
- codecConditionMaskMayBeChanged = 1L << 15,
- codecConditionCodecChangedMask = 1L << 31
- };
-
- enum {
- codecInfoResourceType = 'cdci',
- codecInterfaceVersion = 2
- };
-
- struct CDSequenceDataSource {
- long recordSize;
- void *next;
- ImageSequence seqID;
- ImageSequenceDataSource sourceID;
- OSType sourceType;
- long sourceInputNumber;
- void *dataPtr;
- Handle dataDescription;
- long changeSeed;
- ProcPtr transferProc;
- void *refCon;
- };
- typedef struct CDSequenceDataSource CDSequenceDataSource, *CDSequenceDataSourcePtr;
-
- struct CodecCompressParams {
- ImageSequence sequenceID;
- ImageDescriptionHandle imageDescription;
- Ptr data;
- long bufferSize;
- long frameNumber;
- long startLine;
- long stopLine;
- long conditionFlags;
- CodecFlags callerFlags;
- CodecCapabilities *capabilities;
- ICMProgressProcRecord progressProcRecord;
- ICMCompletionProcRecord completionProcRecord;
- ICMFlushProcRecord flushProcRecord;
- PixMap srcPixMap;
- PixMap prevPixMap;
- CodecQ spatialQuality;
- CodecQ temporalQuality;
- Fixed similarity;
- DataRateParamsPtr dataRateParams;
- long reserved;
- UInt16 majorSourceChangeSeed;
- UInt16 minorSourceChangeSeed;
- CDSequenceDataSourcePtr sourceData;
- };
- typedef struct CodecCompressParams CodecCompressParams;
-
- struct CodecDecompressParams {
- ImageSequence sequenceID;
- ImageDescriptionHandle imageDescription;
- Ptr data;
- long bufferSize;
- long frameNumber;
- long startLine;
- long stopLine;
- long conditionFlags;
- CodecFlags callerFlags;
- CodecCapabilities *capabilities;
- ICMProgressProcRecord progressProcRecord;
- ICMCompletionProcRecord completionProcRecord;
- ICMDataProcRecord dataProcRecord;
- CGrafPtr port;
- PixMap dstPixMap;
- BitMapPtr maskBits;
- PixMapPtr mattePixMap;
- Rect srcRect;
- MatrixRecord *matrix;
- CodecQ accuracy;
- short transferMode;
- ICMFrameTimePtr frameTime;
- long reserved[1];
- SInt8 matrixFlags;
- SInt8 matrixType;
- Rect dstRect;
- UInt16 majorSourceChangeSeed;
- UInt16 minorSourceChangeSeed;
- CDSequenceDataSourcePtr sourceData;
- RgnHandle maskRegion;
- };
- typedef struct CodecDecompressParams CodecDecompressParams;
-
-
- enum {
- matrixFlagScale2x = 1L << 7,
- matrixFlagScale1x = 1L << 6,
- matrixFlagScaleHalf = 1L << 5
- };
-
- extern pascal ComponentResult CDGetCodecInfo(Handle storage, CodecInfo *info);
- extern pascal ComponentResult CDGetCompressionTime(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time);
- extern pascal ComponentResult CDGetMaxCompressionSize(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size);
- extern pascal ComponentResult CDPreCompress(Handle storage, CodecCompressParams *params);
- extern pascal ComponentResult CDBandCompress(Handle storage, CodecCompressParams *params);
- extern pascal ComponentResult CDPreDecompress(Handle storage, CodecDecompressParams *params);
- extern pascal ComponentResult CDBandDecompress(Handle storage, CodecDecompressParams *params);
- extern pascal ComponentResult CDCodecBusy(Handle storage, ImageSequence seq);
- extern pascal ComponentResult CDGetCompressedImageSize(Handle storage, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize);
- extern pascal ComponentResult CDGetSimilarity(Handle storage, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity);
- extern pascal ComponentResult CDTrimImage(Handle storage, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc);
- extern pascal ComponentResult CDRequestSettings(Handle storage, Handle settings, Rect *rp, ModalFilterUPP filterProc);
- extern pascal ComponentResult CDGetSettings(Handle storage, Handle settings);
- extern pascal ComponentResult CDSetSettings(Handle storage, Handle settings);
- extern pascal ComponentResult CDCodecFlush(Handle storage);
- extern pascal ComponentResult CDCodecSetTimeCode(Handle storage, void *timeCodeFormat, void *timeCodeTime);
- extern pascal ComponentResult CDCodecIsImageDescriptionEquivalent(Handle storage, ImageDescriptionHandle newDesc, Boolean *equivalent);
- extern pascal ComponentResult CDCodecNewMemory(Handle storage, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon);
- extern pascal ComponentResult CDCodecDisposeMemory(Handle storage, Ptr data);
- extern pascal ComponentResult CDCodecHitTestData(Handle storage, ImageDescriptionHandle desc, void *data, Size dataSize, Point where, Boolean *hit);
-
- #ifdef __CFM68K__
- #pragma import off
- #endif
-
- #if GENERATINGPOWERPC
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __IMAGECODEC__ */
-