ImageCodec.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:99k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       ImageCodec.h
  3.  
  4.      Contains:   QuickTime Interfaces.
  5.  
  6.      Version:    Technology: QuickTime 6.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1990-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __IMAGECODEC__
  18. #define __IMAGECODEC__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __QUICKDRAW__
  23. #include "Quickdraw.h"
  24. #endif
  25. #ifndef __IMAGECOMPRESSION__
  26. #include "ImageCompression.h"
  27. #endif
  28. #ifndef __COMPONENTS__
  29. #include "Components.h"
  30. #endif
  31. #ifndef __MOVIES__
  32. #include "Movies.h"
  33. #endif
  34. #ifndef __GXTYPES__
  35. #include "GXTypes.h"
  36. #endif
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53. /*  codec capabilities flags    */
  54. enum {
  55.     codecCanScale               = 1L << 0,
  56.     codecCanMask                = 1L << 1,
  57.     codecCanMatte               = 1L << 2,
  58.     codecCanTransform           = 1L << 3,
  59.     codecCanTransferMode        = 1L << 4,
  60.     codecCanCopyPrev            = 1L << 5,
  61.     codecCanSpool               = 1L << 6,
  62.     codecCanClipVertical        = 1L << 7,
  63.     codecCanClipRectangular     = 1L << 8,
  64.     codecCanRemapColor          = 1L << 9,
  65.     codecCanFastDither          = 1L << 10,
  66.     codecCanSrcExtract          = 1L << 11,
  67.     codecCanCopyPrevComp        = 1L << 12,
  68.     codecCanAsync               = 1L << 13,
  69.     codecCanMakeMask            = 1L << 14,
  70.     codecCanShift               = 1L << 15,
  71.     codecCanAsyncWhen           = 1L << 16,
  72.     codecCanShieldCursor        = 1L << 17,
  73.     codecCanManagePrevBuffer    = 1L << 18,
  74.     codecHasVolatileBuffer      = 1L << 19,                     /* codec requires redraw after window movement */
  75.     codecWantsRegionMask        = 1L << 20,
  76.     codecImageBufferIsOnScreen  = 1L << 21,                     /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */
  77.     codecWantsDestinationPixels = 1L << 22,
  78.     codecWantsSpecialScaling    = 1L << 23,
  79.     codecHandlesInputs          = 1L << 24,
  80.     codecCanDoIndirectSurface   = 1L << 25,                     /* codec can handle indirect surface (GDI) */
  81.     codecIsSequenceSensitive    = 1L << 26,
  82.     codecRequiresOffscreen      = 1L << 27,
  83.     codecRequiresMaskBits       = 1L << 28,
  84.     codecCanRemapResolution     = 1L << 29,
  85.     codecIsDirectToScreenOnly   = 1L << 30,                     /* codec can only decompress data to the screen */
  86.     codecCanLockSurface         = 1L << 31                      /* codec can lock destination surface, icm doesn't lock for you */
  87. };
  88. /*  codec capabilities flags2   */
  89. enum {
  90.     codecUsesOverlaySurface     = 1L << 0,                      /* codec uses overlay surface */
  91.     codecImageBufferIsOverlaySurface = 1L << 1,                 /* codec image buffer is overlay surface, the bits in the buffer are on the screen */
  92.     codecSrcMustBeImageBuffer   = 1L << 2,                      /* codec can only source data from an image buffer */
  93.     codecImageBufferIsInAGPMemory = 1L << 4,                    /* codec image buffer is in AGP space, byte writes are OK */
  94.     codecImageBufferIsInPCIMemory = 1L << 5,                    /* codec image buffer is across a PCI bus; byte writes are bad */
  95.     codecImageBufferMemoryFlagsValid = 1L << 6,                 /* set by ImageCodecNewImageBufferMemory/NewImageGWorld to indicate that it set the AGP/PCI flags (supported in QuickTime 6.0 and later) */
  96.     codecDrawsHigherQualityScaled = 1L << 7                     /* codec will draw higher-quality image if it performs scaling (eg, wipe effect with border) */
  97. };
  98. struct CodecCapabilities {
  99.     long                            flags;
  100.     short                           wantedPixelSize;
  101.     short                           extendWidth;
  102.     short                           extendHeight;
  103.     short                           bandMin;
  104.     short                           bandInc;
  105.     short                           pad;
  106.     unsigned long                   time;
  107.     long                            flags2;                     /* field new in QuickTime 4.0 */
  108. };
  109. typedef struct CodecCapabilities        CodecCapabilities;
  110. /*  codec condition flags   */
  111. enum {
  112.     codecConditionFirstBand     = 1L << 0,
  113.     codecConditionLastBand      = 1L << 1,
  114.     codecConditionFirstFrame    = 1L << 2,
  115.     codecConditionNewDepth      = 1L << 3,
  116.     codecConditionNewTransform  = 1L << 4,
  117.     codecConditionNewSrcRect    = 1L << 5,
  118.     codecConditionNewMask       = 1L << 6,
  119.     codecConditionNewMatte      = 1L << 7,
  120.     codecConditionNewTransferMode = 1L << 8,
  121.     codecConditionNewClut       = 1L << 9,
  122.     codecConditionNewAccuracy   = 1L << 10,
  123.     codecConditionNewDestination = 1L << 11,
  124.     codecConditionFirstScreen   = 1L << 12,
  125.     codecConditionDoCursor      = 1L << 13,
  126.     codecConditionCatchUpDiff   = 1L << 14,
  127.     codecConditionMaskMayBeChanged = 1L << 15,
  128.     codecConditionToBuffer      = 1L << 16,
  129.     codecConditionCodecChangedMask = 1L << 31
  130. };
  131. enum {
  132.     codecInfoResourceType       = FOUR_CHAR_CODE('cdci'),       /* codec info resource type */
  133.     codecInterfaceVersion       = 2                             /* high word returned in component GetVersion */
  134. };
  135. struct CDSequenceDataSourceQueueEntry {
  136.     void *                          nextBusy;
  137.     long                            descSeed;
  138.     Handle                          dataDesc;
  139.     void *                          data;
  140.     long                            dataSize;
  141.     long                            useCount;
  142.     TimeValue                       frameTime;
  143.     TimeValue                       frameDuration;
  144.     TimeValue                       timeScale;
  145. };
  146. typedef struct CDSequenceDataSourceQueueEntry CDSequenceDataSourceQueueEntry;
  147. typedef CDSequenceDataSourceQueueEntry * CDSequenceDataSourceQueueEntryPtr;
  148. struct CDSequenceDataSource {
  149.     long                            recordSize;
  150.     void *                          next;
  151.     ImageSequence                   seqID;
  152.     ImageSequenceDataSource         sourceID;
  153.     OSType                          sourceType;
  154.     long                            sourceInputNumber;
  155.     void *                          dataPtr;
  156.     Handle                          dataDescription;
  157.     long                            changeSeed;
  158.     ICMConvertDataFormatUPP         transferProc;
  159.     void *                          transferRefcon;
  160.     long                            dataSize;
  161.                                                                 /* fields available in QT 3 and later */
  162.     QHdrPtr                         dataQueue;                  /* queue of CDSequenceDataSourceQueueEntry structures*/
  163.     void *                          originalDataPtr;
  164.     long                            originalDataSize;
  165.     Handle                          originalDataDescription;
  166.     long                            originalDataDescriptionSeed;
  167. };
  168. typedef struct CDSequenceDataSource     CDSequenceDataSource;
  169. typedef CDSequenceDataSource *          CDSequenceDataSourcePtr;
  170. struct ICMFrameTimeInfo {
  171.     wide                            startTime;
  172.     long                            scale;
  173.     long                            duration;
  174. };
  175. typedef struct ICMFrameTimeInfo         ICMFrameTimeInfo;
  176. typedef ICMFrameTimeInfo *              ICMFrameTimeInfoPtr;
  177. struct CodecCompressParams {
  178.     ImageSequence                   sequenceID;                 /* precompress,bandcompress */
  179.     ImageDescriptionHandle          imageDescription;           /* precompress,bandcompress */
  180.     Ptr                             data;
  181.     long                            bufferSize;
  182.     long                            frameNumber;
  183.     long                            startLine;
  184.     long                            stopLine;
  185.     long                            conditionFlags;
  186.     CodecFlags                      callerFlags;
  187.     CodecCapabilities *             capabilities;               /* precompress,bandcompress */
  188.     ICMProgressProcRecord           progressProcRecord;
  189.     ICMCompletionProcRecord         completionProcRecord;
  190.     ICMFlushProcRecord              flushProcRecord;
  191.     PixMap                          srcPixMap;                  /* precompress,bandcompress */
  192.     PixMap                          prevPixMap;
  193.     CodecQ                          spatialQuality;
  194.     CodecQ                          temporalQuality;
  195.     Fixed                           similarity;
  196.     DataRateParamsPtr               dataRateParams;
  197.     long                            reserved;
  198.                                                                 /* The following fields only exist for QuickTime 2.1 and greater */
  199.     UInt16                          majorSourceChangeSeed;
  200.     UInt16                          minorSourceChangeSeed;
  201.     CDSequenceDataSourcePtr         sourceData;
  202.                                                                 /* The following fields only exist for QuickTime 2.5 and greater */
  203.     long                            preferredPacketSizeInBytes;
  204.                                                                 /* The following fields only exist for QuickTime 3.0 and greater */
  205.     long                            requestedBufferWidth;       /* must set codecWantsSpecialScaling to indicate this field is valid*/
  206.     long                            requestedBufferHeight;      /* must set codecWantsSpecialScaling to indicate this field is valid*/
  207.                                                                 /* The following fields only exist for QuickTime 4.0 and greater */
  208.     OSType                          wantedSourcePixelType;
  209.                                                                 /* The following fields only exist for QuickTime 5.0 and greater */
  210.     long                            compressedDataSize;         /* if nonzero, this overrides (*imageDescription)->dataSize*/
  211.     UInt32                          taskWeight;                 /* preferred weight for MP tasks implementing this operation*/
  212.     OSType                          taskName;                   /* preferred name (type) for MP tasks implementing this operation*/
  213. };
  214. typedef struct CodecCompressParams      CodecCompressParams;
  215. struct CodecDecompressParams {
  216.     ImageSequence                   sequenceID;                 /* predecompress,banddecompress */
  217.     ImageDescriptionHandle          imageDescription;           /* predecompress,banddecompress */
  218.     Ptr                             data;
  219.     long                            bufferSize;
  220.     long                            frameNumber;
  221.     long                            startLine;
  222.     long                            stopLine;
  223.     long                            conditionFlags;
  224.     CodecFlags                      callerFlags;
  225.     CodecCapabilities *             capabilities;               /* predecompress,banddecompress */
  226.     ICMProgressProcRecord           progressProcRecord;
  227.     ICMCompletionProcRecord         completionProcRecord;
  228.     ICMDataProcRecord               dataProcRecord;
  229.     CGrafPtr                        port;                       /* predecompress,banddecompress */
  230.     PixMap                          dstPixMap;                  /* predecompress,banddecompress */
  231.     BitMapPtr                       maskBits;
  232.     PixMapPtr                       mattePixMap;
  233.     Rect                            srcRect;                    /* predecompress,banddecompress */
  234.     MatrixRecord *                  matrix;                     /* predecompress,banddecompress */
  235.     CodecQ                          accuracy;                   /* predecompress,banddecompress */
  236.     short                           transferMode;               /* predecompress,banddecompress */
  237.     ICMFrameTimePtr                 frameTime;                  /* banddecompress */
  238.     long                            reserved[1];
  239.                                                                 /* The following fields only exist for QuickTime 2.0 and greater */
  240.     SInt8                           matrixFlags;                /* high bit set if 2x resize */
  241.     SInt8                           matrixType;
  242.     Rect                            dstRect;                    /* only valid for simple transforms */
  243.                                                                 /* The following fields only exist for QuickTime 2.1 and greater */
  244.     UInt16                          majorSourceChangeSeed;
  245.     UInt16                          minorSourceChangeSeed;
  246.     CDSequenceDataSourcePtr         sourceData;
  247.     RgnHandle                       maskRegion;
  248.                                                                 /* The following fields only exist for QuickTime 2.5 and greater */
  249.     OSType **                       wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */
  250.     long                            screenFloodMethod;
  251.     long                            screenFloodValue;
  252.     short                           preferredOffscreenPixelSize;
  253.                                                                 /* The following fields only exist for QuickTime 3.0 and greater */
  254.     ICMFrameTimeInfoPtr             syncFrameTime;              /* banddecompress */
  255.     Boolean                         needUpdateOnTimeChange;     /* banddecompress */
  256.     Boolean                         enableBlackLining;
  257.     Boolean                         needUpdateOnSourceChange;   /* band decompress */
  258.     Boolean                         pad;
  259.     long                            unused;
  260.     CGrafPtr                        finalDestinationPort;
  261.     long                            requestedBufferWidth;       /* must set codecWantsSpecialScaling to indicate this field is valid*/
  262.     long                            requestedBufferHeight;      /* must set codecWantsSpecialScaling to indicate this field is valid*/
  263.                                                                 /* The following fields only exist for QuickTime 4.0 and greater */
  264.     Rect                            displayableAreaOfRequestedBuffer; /* set in predecompress*/
  265.     Boolean                         requestedSingleField;
  266.     Boolean                         needUpdateOnNextIdle;
  267.     Boolean                         pad2[2];
  268.     Fixed                           bufferGammaLevel;
  269.                                                                 /* The following fields only exist for QuickTime 5.0 and greater */
  270.     UInt32                          taskWeight;                 /* preferred weight for MP tasks implementing this operation*/
  271.     OSType                          taskName;                   /* preferred name (type) for MP tasks implementing this operation*/
  272.                                                                 /* The following fields only exist for QuickTime 6.0 and greater */
  273.     Boolean                         bidirectionalPredictionMode;
  274.     UInt8                           destinationBufferMemoryPreference; /* a codec's PreDecompress/Preflight call can set this to express a preference about what kind of memory its destination buffer should go into.  no guarantees.*/
  275.     UInt8                           codecBufferMemoryPreference; /* may indicate preferred kind of memory that NewImageGWorld/NewImageBufferMemory should create its buffer in, if applicable.*/
  276.     Boolean                         onlyUseCodecIfItIsInUserPreferredCodecList; /* set to prevent this codec from being used unless it is in the userPreferredCodec list*/
  277.     QTMediaContextID                mediaContextID;
  278. };
  279. typedef struct CodecDecompressParams    CodecDecompressParams;
  280. enum {
  281.     matrixFlagScale2x           = 1L << 7,
  282.     matrixFlagScale1x           = 1L << 6,
  283.     matrixFlagScaleHalf         = 1L << 5
  284. };
  285. enum {
  286.     kScreenFloodMethodNone      = 0,
  287.     kScreenFloodMethodKeyColor  = 1,
  288.     kScreenFloodMethodAlpha     = 2
  289. };
  290. enum {
  291.     kFlushLastQueuedFrame       = 0,
  292.     kFlushFirstQueuedFrame      = 1
  293. };
  294. enum {
  295.     kNewImageGWorldErase        = 1L << 0
  296. };
  297. /* values for destinationBufferMemoryPreference and codecBufferMemoryPreference */
  298. enum {
  299.     kICMImageBufferNoPreference = 0,
  300.     kICMImageBufferPreferMainMemory = 1,
  301.     kICMImageBufferPreferVideoMemory = 2
  302. };
  303. typedef CALLBACK_API( void , ImageCodecTimeTriggerProcPtr )(void *refcon);
  304. typedef CALLBACK_API( void , ImageCodecDrawBandCompleteProcPtr )(void *refcon, ComponentResult drawBandResult, UInt32 drawBandCompleteFlags);
  305. typedef STACK_UPP_TYPE(ImageCodecTimeTriggerProcPtr)            ImageCodecTimeTriggerUPP;
  306. typedef STACK_UPP_TYPE(ImageCodecDrawBandCompleteProcPtr)       ImageCodecDrawBandCompleteUPP;
  307. #if OPAQUE_UPP_TYPES
  308.     EXTERN_API(ImageCodecTimeTriggerUPP)
  309.     NewImageCodecTimeTriggerUPP    (ImageCodecTimeTriggerProcPtr userRoutine);
  310.     EXTERN_API(ImageCodecDrawBandCompleteUPP)
  311.     NewImageCodecDrawBandCompleteUPP    (ImageCodecDrawBandCompleteProcPtr userRoutine);
  312.     EXTERN_API(void)
  313.     DisposeImageCodecTimeTriggerUPP    (ImageCodecTimeTriggerUPP userUPP);
  314.     EXTERN_API(void)
  315.     DisposeImageCodecDrawBandCompleteUPP    (ImageCodecDrawBandCompleteUPP userUPP);
  316.     EXTERN_API(void)
  317.     InvokeImageCodecTimeTriggerUPP    (void *               refcon,
  318.                                     ImageCodecTimeTriggerUPP userUPP);
  319.     EXTERN_API(void)
  320.     InvokeImageCodecDrawBandCompleteUPP    (void *          refcon,
  321.                                     ComponentResult         drawBandResult,
  322.                                     UInt32                  drawBandCompleteFlags,
  323.                                     ImageCodecDrawBandCompleteUPP userUPP);
  324. #else
  325.     enum { uppImageCodecTimeTriggerProcInfo = 0x000000C0 };         /* pascal no_return_value Func(4_bytes) */
  326.     enum { uppImageCodecDrawBandCompleteProcInfo = 0x00000FC0 };    /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  327.     #define NewImageCodecTimeTriggerUPP(userRoutine)                (ImageCodecTimeTriggerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecTimeTriggerProcInfo, GetCurrentArchitecture())
  328.     #define NewImageCodecDrawBandCompleteUPP(userRoutine)           (ImageCodecDrawBandCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecDrawBandCompleteProcInfo, GetCurrentArchitecture())
  329.     #define DisposeImageCodecTimeTriggerUPP(userUPP)                DisposeRoutineDescriptor(userUPP)
  330.     #define DisposeImageCodecDrawBandCompleteUPP(userUPP)           DisposeRoutineDescriptor(userUPP)
  331.     #define InvokeImageCodecTimeTriggerUPP(refcon, userUPP)         CALL_ONE_PARAMETER_UPP((userUPP), uppImageCodecTimeTriggerProcInfo, (refcon))
  332.     #define InvokeImageCodecDrawBandCompleteUPP(refcon, drawBandResult, drawBandCompleteFlags, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppImageCodecDrawBandCompleteProcInfo, (refcon), (drawBandResult), (drawBandCompleteFlags))
  333. #endif
  334. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  335. #define NewImageCodecTimeTriggerProc(userRoutine)               NewImageCodecTimeTriggerUPP(userRoutine)
  336. #define NewImageCodecDrawBandCompleteProc(userRoutine)          NewImageCodecDrawBandCompleteUPP(userRoutine)
  337. #define CallImageCodecTimeTriggerProc(userRoutine, refcon)      InvokeImageCodecTimeTriggerUPP(refcon, userRoutine)
  338. #define CallImageCodecDrawBandCompleteProc(userRoutine, refcon, drawBandResult, drawBandCompleteFlags) InvokeImageCodecDrawBandCompleteUPP(refcon, drawBandResult, drawBandCompleteFlags, userRoutine)
  339. struct ImageSubCodecDecompressCapabilities {
  340.     long                            recordSize;                 /* sizeof(ImageSubCodecDecompressCapabilities)*/
  341.     long                            decompressRecordSize;       /* size of your codec's decompress record*/
  342.     Boolean                         canAsync;                   /* default true*/
  343.     UInt8                           pad0;
  344.                                                                 /* The following fields only exist for QuickTime 4.0 and greater */
  345.     UInt16                          suggestedQueueSize;
  346.     Boolean                         canProvideTrigger;
  347.                                                                 /* The following fields only exist for QuickTime 5.0 and greater */
  348.     Boolean                         subCodecFlushesScreen;      /* only used on Mac OS X*/
  349.     Boolean                         subCodecCallsDrawBandComplete;
  350.     UInt8                           pad2[1];
  351.                                                                 /* The following fields only exist for QuickTime 6.0 and greater */
  352.     Boolean                         isChildCodec;               /* set by base codec before calling Initialize*/
  353.     UInt8                           pad3[3];
  354. };
  355. typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
  356. enum {
  357.     kCodecFrameTypeUnknown      = 0,
  358.     kCodecFrameTypeKey          = 1,
  359.     kCodecFrameTypeDifference   = 2,
  360.     kCodecFrameTypeDroppableDifference = 3
  361. };
  362. struct ImageSubCodecDecompressRecord {
  363.     Ptr                             baseAddr;
  364.     long                            rowBytes;
  365.     Ptr                             codecData;
  366.     ICMProgressProcRecord           progressProcRecord;
  367.     ICMDataProcRecord               dataProcRecord;
  368.     void *                          userDecompressRecord;       /* pointer to codec-specific per-band data*/
  369.     UInt8                           frameType;
  370.     Boolean                         inhibitMP;                  /* set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame.  (Only has any effect for MP-capable subcodecs.  New in QuickTime 5.0.)*/
  371.     UInt8                           pad[2];
  372.     long                            priv[2];
  373.                                                                 /* The following fields only exist for QuickTime 5.0 and greater */
  374.     ImageCodecDrawBandCompleteUPP   drawBandCompleteUPP;        /* only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. */
  375.     void *                          drawBandCompleteRefCon;     /* Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. */
  376. };
  377. typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
  378. /*
  379.   These data structures are used by code that wants to pass planar pixmap 
  380.    information around.
  381.   The structure below gives the basic idea of what is being done.
  382.   Normal instances of code will use a fixed number of planes (eg YUV420 uses 
  383.    three planes, Y, U and V). Each such code instance will define its own
  384.    version of the PlanarPixMapInfo struct counting the number of planes it 
  385.    needs along with defining constants that specify the meanings of each
  386.    plane.
  387. */
  388. struct PlanarComponentInfo {
  389.     SInt32                          offset;
  390.     UInt32                          rowBytes;
  391. };
  392. typedef struct PlanarComponentInfo      PlanarComponentInfo;
  393. struct PlanarPixMapInfo {
  394.     PlanarComponentInfo             componentInfo[1];
  395. };
  396. typedef struct PlanarPixMapInfo         PlanarPixMapInfo;
  397. struct PlanarPixmapInfoSorensonYUV9 {
  398.     PlanarComponentInfo             componentInfoY;
  399.     PlanarComponentInfo             componentInfoU;
  400.     PlanarComponentInfo             componentInfoV;
  401. };
  402. typedef struct PlanarPixmapInfoSorensonYUV9 PlanarPixmapInfoSorensonYUV9;
  403. struct PlanarPixmapInfoYUV420 {
  404.     PlanarComponentInfo             componentInfoY;
  405.     PlanarComponentInfo             componentInfoCb;
  406.     PlanarComponentInfo             componentInfoCr;
  407. };
  408. typedef struct PlanarPixmapInfoYUV420   PlanarPixmapInfoYUV420;
  409. enum {
  410.     codecSuggestedBufferSentinel = FOUR_CHAR_CODE('sent')       /* codec public resource containing suggested data pattern to put past end of data buffer */
  411. };
  412. /* name of parameters or effect -- placed in root container, required */
  413. enum {
  414.     kParameterTitleName         = FOUR_CHAR_CODE('name'),
  415.     kParameterTitleID           = 1
  416. };
  417. /* codec sub-type of parameters or effect -- placed in root container, required */
  418. enum {
  419.     kParameterWhatName          = FOUR_CHAR_CODE('what'),
  420.     kParameterWhatID            = 1
  421. };
  422. /* effect version -- placed in root container, optional, but recommended */
  423. enum {
  424.     kParameterVersionName       = FOUR_CHAR_CODE('vers'),
  425.     kParameterVersionID         = 1
  426. };
  427. /* is effect repeatable -- placed in root container, optional, default is TRUE*/
  428. enum {
  429.     kParameterRepeatableName    = FOUR_CHAR_CODE('pete'),
  430.     kParameterRepeatableID      = 1
  431. };
  432. enum {
  433.     kParameterRepeatableTrue    = 1,
  434.     kParameterRepeatableFalse   = 0
  435. };
  436. /* substitution codec in case effect is missing -- placed in root container, recommended */
  437. enum {
  438.     kParameterAlternateCodecName = FOUR_CHAR_CODE('subs'),
  439.     kParameterAlternateCodecID  = 1
  440. };
  441. /* maximum number of sources -- placed in root container, required */
  442. enum {
  443.     kParameterSourceCountName   = FOUR_CHAR_CODE('srcs'),
  444.     kParameterSourceCountID     = 1
  445. };
  446. /* EFFECT CLASSES*/
  447. /*
  448.    The effect major class defines the major grouping of the effect.
  449.    Major classes are defined only by Apple and are not extendable by third
  450.    parties.  Major classes are used for filtering of the effect list by
  451.    applications, but do not define what UI sub-group may or may not be
  452.    presented to the user.  For example, the major class may be a transition,
  453.    but the minor class may be a wipe.  
  454. */
  455. /*
  456.    Effects that fail to include a
  457.    kEffectMajorClassType will be classified as kMiscMajorClass.
  458. */
  459. enum {
  460.     kEffectMajorClassType       = FOUR_CHAR_CODE('clsa'),
  461.     kEffectMajorClassID         = 1
  462. };
  463. enum {
  464.     kGeneratorMajorClass        = FOUR_CHAR_CODE('genr'),       /* zero source effects*/
  465.     kFilterMajorClass           = FOUR_CHAR_CODE('filt'),       /* one source effects*/
  466.     kTransitionMajorClass       = FOUR_CHAR_CODE('tran'),       /* multisource morph effects */
  467.     kCompositorMajorClass       = FOUR_CHAR_CODE('comp'),       /* multisource layer effects*/
  468.     kMiscMajorClass             = FOUR_CHAR_CODE('misc')        /* all other effects*/
  469. };
  470. /*
  471.    The effect minor class defines the grouping of effects for the purposes
  472.    of UI.  Apple defines a set of minor classes and will extend it over
  473.    time.  Apple also provides strings within the UI for minor classes
  474.    that it defines.  Third party developers may either classify
  475.    their effects as a type defined by Apple, or may define their own
  476.    minor class.  Effects which define a minor class of their own
  477.    must also then supply a kEffectMinorClassNameType atom.
  478. */
  479. /*
  480.    If a kEffectMinorClassNameType atom is present, but
  481.    the minor type is one defined by Apple, the Apple supplied
  482.    string will be used in the UI.
  483. */
  484. /*
  485.    Effects that fail to supply a kEffectMinorClassType will be 
  486.    classified as kMiscMinorClass.
  487. */
  488. enum {
  489.     kEffectMinorClassType       = FOUR_CHAR_CODE('clsi'),
  490.     kEffectMinorClassID         = 1,
  491.     kEffectMinorClassNameType   = FOUR_CHAR_CODE('clsn'),
  492.     kEffectMinorClassNameID     = 1
  493. };
  494. enum {
  495.     kGeneratorMinorClass        = FOUR_CHAR_CODE('genr'),       /* "Generators"*/
  496.     kRenderMinorClass           = FOUR_CHAR_CODE('rend'),       /* "Render"*/
  497.     kFilterMinorClass           = FOUR_CHAR_CODE('filt'),       /* "Filters"*/
  498.     kArtisticMinorClass         = FOUR_CHAR_CODE('arts'),       /* "Artistic*/
  499.     kBlurMinorClass             = FOUR_CHAR_CODE('blur'),       /* "Blur"*/
  500.     kSharpenMinorClass          = FOUR_CHAR_CODE('shrp'),       /* "Sharpen"*/
  501.     kDistortMinorClass          = FOUR_CHAR_CODE('dist'),       /* "Distort"*/
  502.     kNoiseMinorClass            = FOUR_CHAR_CODE('nois'),       /* "Noise"*/
  503.     kAdjustmentMinorClass       = FOUR_CHAR_CODE('adst'),       /* "Adjustments"*/
  504.     kTransitionMinorClass       = FOUR_CHAR_CODE('tran'),       /* "Transitions"*/
  505.     kWipeMinorClass             = FOUR_CHAR_CODE('wipe'),       /* "Wipes"*/
  506.     k3DMinorClass               = FOUR_CHAR_CODE('pzre'),       /* "3D Transitions"*/
  507.     kCompositorMinorClass       = FOUR_CHAR_CODE('comp'),       /* "Compositors"*/
  508.     kEffectsMinorClass          = FOUR_CHAR_CODE('fxfx'),       /* "Special Effects"*/
  509.     kMiscMinorClass             = FOUR_CHAR_CODE('misc')        /* "Miscellaneous"*/
  510. };
  511. /*
  512.    Effects can define a number of "preset" values which will be presented to the user
  513.    in a simplified UI.  Each preset is an atom within the parameter description list
  514.    and must have an atom ID from 1 going up sequentially.  Inside of this atom are three other
  515.    atoms containing:
  516.     1) the name of the preset as a Pascal string
  517.     2) a preview picture for the preset, 86 x 64 pixels in size
  518.     3) the ENTIRE set of parameter values needed to create a sample of this preset.
  519. */
  520. enum {
  521.     kEffectPresetType           = FOUR_CHAR_CODE('peff'),
  522.     kPresetNameType             = FOUR_CHAR_CODE('pnam'),
  523.     kPresetNameID               = 1,
  524.     kPresetPreviewPictureType   = FOUR_CHAR_CODE('ppct'),
  525.     kPresetPreviewPictureID     = 1,
  526.     kPresetSettingsType         = FOUR_CHAR_CODE('psst'),
  527.     kPresetSettingsID           = 1
  528. };
  529. enum {
  530.     kParameterDependencyName    = FOUR_CHAR_CODE('deep'),
  531.     kParameterDependencyID      = 1
  532. };
  533. enum {
  534.     kParameterListDependsUponColorProfiles = FOUR_CHAR_CODE('prof'),
  535.     kParameterListDependsUponFonts = FOUR_CHAR_CODE('font')
  536. };
  537. struct ParameterDependancyRecord {
  538.     long                            dependCount;
  539.     OSType                          depends[1];
  540. };
  541. typedef struct ParameterDependancyRecord ParameterDependancyRecord;
  542. /*
  543.    enumeration list in container -- placed in root container, optional unless used by a
  544.    parameter in the list
  545. */
  546. enum {
  547.     kParameterEnumList          = FOUR_CHAR_CODE('enum')
  548. };
  549. struct EnumValuePair {
  550.     long                            value;
  551.     Str255                          name;
  552. };
  553. typedef struct EnumValuePair            EnumValuePair;
  554. struct EnumListRecord {
  555.     long                            enumCount;                  /* number of enumeration items to follow*/
  556.     EnumValuePair                   values[1];                  /* values and names for them, packed */
  557. };
  558. typedef struct EnumListRecord           EnumListRecord;
  559. /* atom type of parameter*/
  560. enum {
  561.     kParameterAtomTypeAndID     = FOUR_CHAR_CODE('type')
  562. };
  563. enum {
  564.     kNoAtom                     = FOUR_CHAR_CODE('none'),       /* atom type for no data got/set*/
  565.     kAtomNoFlags                = 0x00000000,
  566.     kAtomNotInterpolated        = 0x00000001,                   /* atom can never be interpolated*/
  567.     kAtomInterpolateIsOptional  = 0x00000002,                   /* atom can be interpolated, but it is an advanced user operation*/
  568.     kAtomMayBeIndexed           = 0x00000004                    /* more than one value of atom can exist with accending IDs (ie, lists of colors)*/
  569. };
  570. struct ParameterAtomTypeAndID {
  571.     QTAtomType                      atomType;                   /* type of atom this data comes from/goes into*/
  572.     QTAtomID                        atomID;                     /* ID of atom this data comes from/goes into*/
  573.     long                            atomFlags;                  /* options for this atom*/
  574.     Str255                          atomName;                   /* name of this value type*/
  575. };
  576. typedef struct ParameterAtomTypeAndID   ParameterAtomTypeAndID;
  577. /* data type of a parameter*/
  578. enum {
  579.     kParameterDataType          = FOUR_CHAR_CODE('data')
  580. };
  581. enum {
  582.     kParameterTypeDataLong      = kTweenTypeLong,               /* integer value*/
  583.     kParameterTypeDataFixed     = kTweenTypeFixed,              /* fixed point value*/
  584.     kParameterTypeDataRGBValue  = kTweenTypeRGBColor,           /* RGBColor data*/
  585.     kParameterTypeDataDouble    = kTweenTypeQTFloatDouble,      /* IEEE 64 bit floating point value*/
  586.     kParameterTypeDataText      = FOUR_CHAR_CODE('text'),       /* editable text item*/
  587.     kParameterTypeDataEnum      = FOUR_CHAR_CODE('enum'),       /* enumerated lookup value*/
  588.     kParameterTypeDataBitField  = FOUR_CHAR_CODE('bool'),       /* bit field value (something that holds boolean(s))*/
  589.     kParameterTypeDataImage     = FOUR_CHAR_CODE('imag')        /* reference to an image via Picture data*/
  590. };
  591. struct ParameterDataType {
  592.     OSType                          dataType;                   /* type of data this item is stored as*/
  593. };
  594. typedef struct ParameterDataType        ParameterDataType;
  595. /*
  596.    alternate (optional) data type -- main data type always required.  
  597.    Must be modified or deleted when modifying main data type.
  598.    Main data type must be modified when alternate is modified.
  599. */
  600. enum {
  601.     kParameterAlternateDataType = FOUR_CHAR_CODE('alt1'),
  602.     kParameterTypeDataColorValue = FOUR_CHAR_CODE('cmlr'),      /* CMColor data (supported on machines with ColorSync)*/
  603.     kParameterTypeDataCubic     = FOUR_CHAR_CODE('cubi'),       /* cubic bezier(s) (no built-in support)*/
  604.     kParameterTypeDataNURB      = FOUR_CHAR_CODE('nurb')        /* nurb(s) (no built-in support)*/
  605. };
  606. struct ParameterAlternateDataEntry {
  607.     OSType                          dataType;                   /* type of data this item is stored as*/
  608.     QTAtomType                      alternateAtom;              /* where to store*/
  609. };
  610. typedef struct ParameterAlternateDataEntry ParameterAlternateDataEntry;
  611. struct ParameterAlternateDataType {
  612.     long                            numEntries;
  613.     ParameterAlternateDataEntry     entries[1];
  614. };
  615. typedef struct ParameterAlternateDataType ParameterAlternateDataType;
  616. /* legal values for the parameter*/
  617. enum {
  618.     kParameterDataRange         = FOUR_CHAR_CODE('rang')
  619. };
  620. enum {
  621.     kNoMinimumLongFixed         = 0x7FFFFFFF,                   /* ignore minimum/maxiumum values*/
  622.     kNoMaximumLongFixed         = (long)0x80000000,
  623.     kNoScaleLongFixed           = 0,                            /* don't perform any scaling of value*/
  624.     kNoPrecision                = (-1)                          /* allow as many digits as format*/
  625. };
  626. /* 'text'*/
  627. struct StringRangeRecord {
  628.     long                            maxChars;                   /* maximum length of string*/
  629.     long                            maxLines;                   /* number of editing lines to use (1 typical, 0 to default)*/
  630. };
  631. typedef struct StringRangeRecord        StringRangeRecord;
  632. /* 'long'*/
  633. struct LongRangeRecord {
  634.     long                            minValue;                   /* no less than this*/
  635.     long                            maxValue;                   /* no more than this*/
  636.     long                            scaleValue;                 /* muliply content by this going in, divide going out*/
  637.     long                            precisionDigits;            /* # digits of precision when editing via typing*/
  638. };
  639. typedef struct LongRangeRecord          LongRangeRecord;
  640. /* 'enum'*/
  641. struct EnumRangeRecord {
  642.     long                            enumID;                     /* 'enum' list in root container to search within*/
  643. };
  644. typedef struct EnumRangeRecord          EnumRangeRecord;
  645. /* 'fixd'*/
  646. struct FixedRangeRecord {
  647.     Fixed                           minValue;                   /* no less than this*/
  648.     Fixed                           maxValue;                   /* no more than this*/
  649.     Fixed                           scaleValue;                 /* muliply content by this going in, divide going out*/
  650.     long                            precisionDigits;            /* # digits of precision when editing via typing*/
  651. };
  652. typedef struct FixedRangeRecord         FixedRangeRecord;
  653. /* 'doub'*/
  654.    #define kNoMinimumDouble        (NAN)                   /* ignore minimum/maxiumum values */
  655.    #define kNoMaximumDouble        (NAN)
  656.   #define kNoScaleDouble          (0)                     /* don't perform any scaling of value */
  657.    struct DoubleRangeRecord
  658.        {
  659.       QTFloatDouble       minValue;           /* no less than this */
  660.         QTFloatDouble       maxValue;           /* no more than this */
  661.         QTFloatDouble       scaleValue;         /* muliply content by this going in, divide going out */
  662.        long                precisionDigits;    /* # digits of precision when editing via typing */
  663.         };
  664.  typedef struct DoubleRangeRecord DoubleRangeRecord;
  665.     
  666. /* 'bool'   */
  667. struct BooleanRangeRecord {
  668.     long                            maskValue;                  /* value to mask on/off to set/clear the boolean*/
  669. };
  670. typedef struct BooleanRangeRecord       BooleanRangeRecord;
  671. /* 'rgb '*/
  672. struct RGBRangeRecord {
  673.     RGBColor                        minColor;
  674.     RGBColor                        maxColor;
  675. };
  676. typedef struct RGBRangeRecord           RGBRangeRecord;
  677. /* 'imag'*/
  678. enum {
  679.     kParameterImageNoFlags      = 0,
  680.     kParameterImageIsPreset     = 1
  681. };
  682. enum {
  683.     kStandardPresetGroup        = FOUR_CHAR_CODE('pset')
  684. };
  685. struct ImageRangeRecord {
  686.     long                            imageFlags;
  687.     OSType                          fileType;                   /* file type to contain the preset group (normally kStandardPresetGroup)*/
  688.     long                            replacedAtoms;              /* # atoms at this level replaced by this preset group*/
  689. };
  690. typedef struct ImageRangeRecord         ImageRangeRecord;
  691. /* union of all of the above*/
  692.    struct ParameterRangeRecord
  693.         {
  694.       union 
  695.          {
  696.           LongRangeRecord     longRange;
  697.          EnumRangeRecord     enumRange;
  698.          FixedRangeRecord    fixedRange;
  699.             DoubleRangeRecord   doubleRange;
  700.            StringRangeRecord   stringRange;
  701.            BooleanRangeRecord  booleanRange;
  702.           RGBRangeRecord      rgbRange;
  703.           ImageRangeRecord    imageRange;
  704.             } u;
  705.        };
  706.  typedef struct ParameterRangeRecord ParameterRangeRecord;
  707.   
  708. /* UI behavior of a parameter*/
  709. enum {
  710.     kParameterDataBehavior      = FOUR_CHAR_CODE('ditl')
  711. };
  712. enum {
  713.                                                                 /* items edited via typing*/
  714.     kParameterItemEditText      = FOUR_CHAR_CODE('edit'),       /* edit text box*/
  715.     kParameterItemEditLong      = FOUR_CHAR_CODE('long'),       /* long number editing box*/
  716.     kParameterItemEditFixed     = FOUR_CHAR_CODE('fixd'),       /* fixed point number editing box*/
  717.     kParameterItemEditDouble    = FOUR_CHAR_CODE('doub'),       /* double number editing box*/
  718.                                                                 /* items edited via control(s)*/
  719.     kParameterItemPopUp         = FOUR_CHAR_CODE('popu'),       /* pop up value for enum types*/
  720.     kParameterItemRadioCluster  = FOUR_CHAR_CODE('radi'),       /* radio cluster for enum types*/
  721.     kParameterItemCheckBox      = FOUR_CHAR_CODE('chex'),       /* check box for booleans*/
  722.     kParameterItemControl       = FOUR_CHAR_CODE('cntl'),       /* item controlled via a standard control of some type*/
  723.                                                                 /* special user items*/
  724.     kParameterItemLine          = FOUR_CHAR_CODE('line'),       /* line*/
  725.     kParameterItemColorPicker   = FOUR_CHAR_CODE('pick'),       /* color swatch & picker*/
  726.     kParameterItemGroupDivider  = FOUR_CHAR_CODE('divi'),       /* start of a new group of items*/
  727.     kParameterItemStaticText    = FOUR_CHAR_CODE('stat'),       /* display "parameter name" as static text*/
  728.     kParameterItemDragImage     = FOUR_CHAR_CODE('imag'),       /* allow image display, along with drag and drop*/
  729.                                                                 /* flags valid for lines and groups*/
  730.     kGraphicsNoFlags            = 0x00000000,                   /* no options for graphics*/
  731.     kGraphicsFlagsGray          = 0x00000001,                   /* draw lines with gray*/
  732.                                                                 /* flags valid for groups*/
  733.     kGroupNoFlags               = 0x00000000,                   /* no options for group -- may be combined with graphics options             */
  734.     kGroupAlignText             = 0x00010000,                   /* edit text items in group have the same size*/
  735.     kGroupSurroundBox           = 0x00020000,                   /* group should be surrounded with a box*/
  736.     kGroupMatrix                = 0x00040000,                   /* side-by-side arrangement of group is okay*/
  737.     kGroupNoName                = 0x00080000,                   /* name of group should not be displayed above box*/
  738.                                                                 /* flags valid for popup/radiocluster/checkbox/control*/
  739.     kDisableControl             = 0x00000001,
  740.     kDisableWhenNotEqual        = (0x00000000 + kDisableControl),
  741.     kDisableWhenEqual           = (0x00000010 + kDisableControl),
  742.     kDisableWhenLessThan        = (0x00000020 + kDisableControl),
  743.     kDisableWhenGreaterThan     = (0x00000030 + kDisableControl), /* flags valid for controls*/
  744.     kCustomControl              = 0x00100000,                   /* flags valid for popups*/
  745.     kPopupStoreAsString         = 0x00010000
  746. };
  747. struct ControlBehaviors {
  748.     QTAtomID                        groupID;                    /* group under control of this item*/
  749.     long                            controlValue;               /* control value for comparison purposes*/
  750.     QTAtomType                      customType;                 /* custom type identifier, for kCustomControl*/
  751.     QTAtomID                        customID;                   /* custom type ID, for kCustomControl*/
  752. };
  753. typedef struct ControlBehaviors         ControlBehaviors;
  754. struct ParameterDataBehavior {
  755.     OSType                          behaviorType;
  756.     long                            behaviorFlags;
  757.     union {
  758.         ControlBehaviors                controls;
  759.     }                                 u;
  760. };
  761. typedef struct ParameterDataBehavior    ParameterDataBehavior;
  762. /* higher level purpose of a parameter or set of parameters*/
  763. enum {
  764.     kParameterDataUsage         = FOUR_CHAR_CODE('use ')
  765. };
  766. enum {
  767.     kParameterUsagePixels       = FOUR_CHAR_CODE('pixl'),
  768.     kParameterUsageRectangle    = FOUR_CHAR_CODE('rect'),
  769.     kParameterUsagePoint        = FOUR_CHAR_CODE('xy  '),
  770.     kParameterUsage3DPoint      = FOUR_CHAR_CODE('xyz '),
  771.     kParameterUsageDegrees      = FOUR_CHAR_CODE('degr'),
  772.     kParameterUsageRadians      = FOUR_CHAR_CODE('rads'),
  773.     kParameterUsagePercent      = FOUR_CHAR_CODE('pcnt'),
  774.     kParameterUsageSeconds      = FOUR_CHAR_CODE('secs'),
  775.     kParameterUsageMilliseconds = FOUR_CHAR_CODE('msec'),
  776.     kParameterUsageMicroseconds = FOUR_CHAR_CODE('祍ec'),
  777.     kParameterUsage3by3Matrix   = FOUR_CHAR_CODE('3by3'),
  778.     kParameterUsageCircularDegrees = FOUR_CHAR_CODE('degc'),
  779.     kParameterUsageCircularRadians = FOUR_CHAR_CODE('radc')
  780. };
  781. struct ParameterDataUsage {
  782.     OSType                          usageType;                  /* higher level purpose of the data or group*/
  783. };
  784. typedef struct ParameterDataUsage       ParameterDataUsage;
  785. /* default value(s) for a parameter*/
  786. enum {
  787.     kParameterDataDefaultItem   = FOUR_CHAR_CODE('dflt')
  788. };
  789. /* atoms that help to fill in data within the info window */
  790. enum {
  791.     kParameterInfoLongName      = FOUR_CHAR_CODE('﹏am'),
  792.     kParameterInfoCopyright     = FOUR_CHAR_CODE('ヽpy'),
  793.     kParameterInfoDescription   = FOUR_CHAR_CODE('﹊nf'),
  794.     kParameterInfoWindowTitle   = FOUR_CHAR_CODE('﹚nt'),
  795.     kParameterInfoPicture       = FOUR_CHAR_CODE('﹑ix'),
  796.     kParameterInfoManufacturer  = FOUR_CHAR_CODE('﹎an'),
  797.     kParameterInfoIDs           = 1
  798. };
  799. /* flags for ImageCodecValidateParameters */
  800. enum {
  801.     kParameterValidationNoFlags = 0x00000000,
  802.     kParameterValidationFinalValidation = 0x00000001
  803. };
  804. typedef long                            QTParameterValidationOptions;
  805. /* QTAtomTypes for atoms in image compressor settings containers*/
  806. enum {
  807.     kImageCodecSettingsFieldCount = FOUR_CHAR_CODE('fiel'),     /* Number of fields (UInt8) */
  808.     kImageCodecSettingsFieldOrdering = FOUR_CHAR_CODE('fdom'),  /* Ordering of fields (UInt8)*/
  809.     kImageCodecSettingsFieldOrderingF1F2 = 1,
  810.     kImageCodecSettingsFieldOrderingF2F1 = 2
  811. };
  812. /* Additional Image Description Extensions*/
  813. enum {
  814.     kColorInfoImageDescriptionExtension = FOUR_CHAR_CODE('colr'), /* image description extension describing the color properties    */
  815.     kPixelAspectRatioImageDescriptionExtension = FOUR_CHAR_CODE('pasp'), /* image description extension describing the pixel aspect ratio*/
  816.     kCleanApertureImageDescriptionExtension = FOUR_CHAR_CODE('clap') /* image description extension describing the pixel aspect ratio*/
  817. };
  818. /* Color Info Image Description Extension types*/
  819. enum {
  820.     kVideoColorInfoImageDescriptionExtensionType = FOUR_CHAR_CODE('nclc'), /* For video color descriptions (defined below)    */
  821.     kICCProfileColorInfoImageDescriptionExtensionType = FOUR_CHAR_CODE('prof') /* For ICC Profile color descriptions (not defined here)*/
  822. };
  823. /* Video Color Info Image Description Extensions*/
  824. struct NCLCColorInfoImageDescriptionExtension {
  825.     OSType                          colorParamType;             /* Type of color parameter 'nclc'               */
  826.     UInt16                          primaries;                  /* CIE 1931 xy chromaticity coordinates          */
  827.     UInt16                          transferFunction;           /* Nonlinear transfer function from RGB to ErEgEb */
  828.     UInt16                          matrix;                     /* Matrix from ErEgEb to EyEcbEcr           */
  829. };
  830. typedef struct NCLCColorInfoImageDescriptionExtension NCLCColorInfoImageDescriptionExtension;
  831. /* Primaries*/
  832. enum {
  833.     kQTPrimaries_ITU_R709_2     = 1,                            /* ITU-R BT.709-2, SMPTE 274M-1995, and SMPTE 296M-1997 */
  834.     kQTPrimaries_Unknown        = 2,                            /* Unknown */
  835.     kQTPrimaries_EBU_3213       = 5,                            /* EBU Tech. 3213 (1981) */
  836.     kQTPrimaries_SMPTE_C        = 6                             /* SMPTE C Primaries from SMPTE RP 145-1993 */
  837. };
  838. /* Transfer Function*/
  839. enum {
  840.     kQTTransferFunction_ITU_R709_2 = 1,                         /* Recommendation ITU-R BT.709-2, SMPTE 274M-1995, SMPTE 296M-1997, SMPTE 293M-1996 and SMPTE 170M-1994 */
  841.     kQTTransferFunction_Unknown = 2,                            /* Unknown */
  842.     kQTTransferFunction_SMPTE_240M_1995 = 7                     /* SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 */
  843. };
  844. /* Matrix*/
  845. enum {
  846.     kQTMatrix_ITU_R_709_2       = 1,                            /* Recommendation ITU-R BT.709-2 (1125/60/2:1 only), SMPTE 274M-1995 and SMPTE 296M-1997 */
  847.     kQTMatrix_Unknown           = 2,                            /* Unknown */
  848.     kQTMatrix_ITU_R_601_4       = 6,                            /* Recommendation ITU-R BT.601-4, Recommendation ITU-R BT.470-4 System B and G, SMPTE 170M-1994 and SMPTE 293M-1996 */
  849.     kQTMatrix_SMPTE_240M_1995   = 7                             /* SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 */
  850. };
  851. /* Field/Frame Info Image Description (this remaps to FieldInfoImageDescriptionExtension)*/
  852. struct FieldInfoImageDescriptionExtension2 {
  853.     UInt8                           fields;
  854.     UInt8                           detail;
  855. };
  856. typedef struct FieldInfoImageDescriptionExtension2 FieldInfoImageDescriptionExtension2;
  857. enum {
  858.     kQTFieldsProgressiveScan    = 1,
  859.     kQTFieldsInterlaced         = 2
  860. };
  861. enum {
  862.     kQTFieldDetailUnknown       = 0,
  863.     kQTFieldDetailTemporalTopFirst = 1,
  864.     kQTFieldDetailTemporalBottomFirst = 6,
  865.     kQTFieldDetailSpatialFirstLineEarly = 9,
  866.     kQTFieldDetailSpatialFirstLineLate = 14
  867. };
  868. /* Pixel Aspect Ratio Image Description Extensions*/
  869. struct PixelAspectRatioImageDescriptionExtension {
  870.     UInt32                          hSpacing;                   /* Horizontal Spacing */
  871.     UInt32                          vSpacing;                   /* Vertical Spacing */
  872. };
  873. typedef struct PixelAspectRatioImageDescriptionExtension PixelAspectRatioImageDescriptionExtension;
  874. /* Clean Aperture Image Description Extensions*/
  875. struct CleanApertureImageDescriptionExtension {
  876.     UInt32                          cleanApertureWidthN;        /* width of clean aperture, numerator, denominator */
  877.     UInt32                          cleanApertureWidthD;
  878.     UInt32                          cleanApertureHeightN;       /* height of clean aperture, numerator, denominator*/
  879.     UInt32                          cleanApertureHeightD;
  880.     UInt32                          horizOffN;                  /* horizontal offset of clean aperture center minus (width-1)/2, numerator, denominator */
  881.     UInt32                          horizOffD;
  882.     UInt32                          vertOffN;                   /* vertical offset of clean aperture center minus (height-1)/2, numerator, denominator */
  883.     UInt32                          vertOffD;
  884. };
  885. typedef struct CleanApertureImageDescriptionExtension CleanApertureImageDescriptionExtension;
  886. typedef CALLBACK_API( ComponentResult , ImageCodecMPDrawBandProcPtr )(void *refcon, ImageSubCodecDecompressRecord *drp);
  887. typedef STACK_UPP_TYPE(ImageCodecMPDrawBandProcPtr)             ImageCodecMPDrawBandUPP;
  888. #if OPAQUE_UPP_TYPES
  889.     EXTERN_API(ImageCodecMPDrawBandUPP)
  890.     NewImageCodecMPDrawBandUPP     (ImageCodecMPDrawBandProcPtr userRoutine);
  891.     EXTERN_API(void)
  892.     DisposeImageCodecMPDrawBandUPP    (ImageCodecMPDrawBandUPP userUPP);
  893.     EXTERN_API(ComponentResult)
  894.     InvokeImageCodecMPDrawBandUPP    (void *                refcon,
  895.                                     ImageSubCodecDecompressRecord * drp,
  896.                                     ImageCodecMPDrawBandUPP userUPP);
  897. #else
  898.     enum { uppImageCodecMPDrawBandProcInfo = 0x000003F0 };          /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  899.     #define NewImageCodecMPDrawBandUPP(userRoutine)                 (ImageCodecMPDrawBandUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecMPDrawBandProcInfo, GetCurrentArchitecture())
  900.     #define DisposeImageCodecMPDrawBandUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  901.     #define InvokeImageCodecMPDrawBandUPP(refcon, drp, userUPP)     (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppImageCodecMPDrawBandProcInfo, (refcon), (drp))
  902. #endif
  903. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  904. #define NewImageCodecMPDrawBandProc(userRoutine)                NewImageCodecMPDrawBandUPP(userRoutine)
  905. #define CallImageCodecMPDrawBandProc(userRoutine, refcon, drp)  InvokeImageCodecMPDrawBandUPP(refcon, drp, userRoutine)
  906. /*  codec selectors 0-127 are reserved by Apple */
  907. /*  codec selectors 128-191 are subtype specific */
  908. /*  codec selectors 192-255 are vendor specific */
  909. /*  codec selectors 256-32767 are available for general use */
  910. /*  negative selectors are reserved by the Component Manager */
  911. EXTERN_API( ComponentResult )
  912. ImageCodecGetCodecInfo          (ComponentInstance      ci,
  913.                                  CodecInfo *            info)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  914. EXTERN_API( ComponentResult )
  915. ImageCodecGetCompressionTime    (ComponentInstance      ci,
  916.                                  PixMapHandle           src,
  917.                                  const Rect *           srcRect,
  918.                                  short                  depth,
  919.                                  CodecQ *               spatialQuality,
  920.                                  CodecQ *               temporalQuality,
  921.                                  unsigned long *        time)                               FIVEWORDINLINE(0x2F3C, 0x0016, 0x0001, 0x7000, 0xA82A);
  922. EXTERN_API( ComponentResult )
  923. ImageCodecGetMaxCompressionSize (ComponentInstance      ci,
  924.                                  PixMapHandle           src,
  925.                                  const Rect *           srcRect,
  926.                                  short                  depth,
  927.                                  CodecQ                 quality,
  928.                                  long *                 size)                               FIVEWORDINLINE(0x2F3C, 0x0012, 0x0002, 0x7000, 0xA82A);
  929. EXTERN_API( ComponentResult )
  930. ImageCodecPreCompress           (ComponentInstance      ci,
  931.                                  CodecCompressParams *  params)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  932. EXTERN_API( ComponentResult )
  933. ImageCodecBandCompress          (ComponentInstance      ci,
  934.                                  CodecCompressParams *  params)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  935. EXTERN_API( ComponentResult )
  936. ImageCodecPreDecompress         (ComponentInstance      ci,
  937.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  938. EXTERN_API( ComponentResult )
  939. ImageCodecBandDecompress        (ComponentInstance      ci,
  940.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  941. EXTERN_API( ComponentResult )
  942. ImageCodecBusy                  (ComponentInstance      ci,
  943.                                  ImageSequence          seq)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  944. EXTERN_API( ComponentResult )
  945. ImageCodecGetCompressedImageSize (ComponentInstance     ci,
  946.                                  ImageDescriptionHandle  desc,
  947.                                  Ptr                    data,
  948.                                  long                   bufferSize,
  949.                                  ICMDataProcRecordPtr   dataProc,
  950.                                  long *                 dataSize)                           FIVEWORDINLINE(0x2F3C, 0x0014, 0x0008, 0x7000, 0xA82A);
  951. EXTERN_API( ComponentResult )
  952. ImageCodecGetSimilarity         (ComponentInstance      ci,
  953.                                  PixMapHandle           src,
  954.                                  const Rect *           srcRect,
  955.                                  ImageDescriptionHandle  desc,
  956.                                  Ptr                    data,
  957.                                  Fixed *                similarity)                         FIVEWORDINLINE(0x2F3C, 0x0014, 0x0009, 0x7000, 0xA82A);
  958. EXTERN_API( ComponentResult )
  959. ImageCodecTrimImage             (ComponentInstance      ci,
  960.                                  ImageDescriptionHandle  Desc,
  961.                                  Ptr                    inData,
  962.                                  long                   inBufferSize,
  963.                                  ICMDataProcRecordPtr   dataProc,
  964.                                  Ptr                    outData,
  965.                                  long                   outBufferSize,
  966.                                  ICMFlushProcRecordPtr  flushProc,
  967.                                  Rect *                 trimRect,
  968.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0024, 0x000A, 0x7000, 0xA82A);
  969. EXTERN_API( ComponentResult )
  970. ImageCodecRequestSettings       (ComponentInstance      ci,
  971.                                  Handle                 settings,
  972.                                  Rect *                 rp,
  973.                                  ModalFilterUPP         filterProc)                         FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
  974. EXTERN_API( ComponentResult )
  975. ImageCodecGetSettings           (ComponentInstance      ci,
  976.                                  Handle                 settings)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  977. EXTERN_API( ComponentResult )
  978. ImageCodecSetSettings           (ComponentInstance      ci,
  979.                                  Handle                 settings)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  980. EXTERN_API( ComponentResult )
  981. ImageCodecFlush                 (ComponentInstance      ci)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x000E, 0x7000, 0xA82A);
  982. EXTERN_API( ComponentResult )
  983. ImageCodecSetTimeCode           (ComponentInstance      ci,
  984.                                  void *                 timeCodeFormat,
  985.                                  void *                 timeCodeTime)                       FIVEWORDINLINE(0x2F3C, 0x0008, 0x000F, 0x7000, 0xA82A);
  986. EXTERN_API( ComponentResult )
  987. ImageCodecIsImageDescriptionEquivalent (ComponentInstance  ci,
  988.                                  ImageDescriptionHandle  newDesc,
  989.                                  Boolean *              equivalent)                         FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  990. EXTERN_API( ComponentResult )
  991. ImageCodecNewMemory             (ComponentInstance      ci,
  992.                                  Ptr *                  data,
  993.                                  Size                   dataSize,
  994.                                  long                   dataUse,
  995.                                  ICMMemoryDisposedUPP   memoryGoneProc,
  996.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0014, 0x0011, 0x7000, 0xA82A);
  997. EXTERN_API( ComponentResult )
  998. ImageCodecDisposeMemory         (ComponentInstance      ci,
  999.                                  Ptr                    data)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  1000. EXTERN_API( ComponentResult )
  1001. ImageCodecHitTestData           (ComponentInstance      ci,
  1002.                                  ImageDescriptionHandle  desc,
  1003.                                  void *                 data,
  1004.                                  Size                   dataSize,
  1005.                                  Point                  where,
  1006.                                  Boolean *              hit)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x0013, 0x7000, 0xA82A);
  1007. EXTERN_API( ComponentResult )
  1008. ImageCodecNewImageBufferMemory  (ComponentInstance      ci,
  1009.                                  CodecDecompressParams * params,
  1010.                                  long                   flags,
  1011.                                  ICMMemoryDisposedUPP   memoryGoneProc,
  1012.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x0014, 0x7000, 0xA82A);
  1013. EXTERN_API( ComponentResult )
  1014. ImageCodecExtractAndCombineFields (ComponentInstance    ci,
  1015.                                  long                   fieldFlags,
  1016.                                  void *                 data1,
  1017.                                  long                   dataSize1,
  1018.                                  ImageDescriptionHandle  desc1,
  1019.                                  void *                 data2,
  1020.                                  long                   dataSize2,
  1021.                                  ImageDescriptionHandle  desc2,
  1022.                                  void *                 outputData,
  1023.                                  long *                 outDataSize,
  1024.                                  ImageDescriptionHandle  descOut)                           FIVEWORDINLINE(0x2F3C, 0x0028, 0x0015, 0x7000, 0xA82A);
  1025. EXTERN_API( ComponentResult )
  1026. ImageCodecGetMaxCompressionSizeWithSources (ComponentInstance  ci,
  1027.                                  PixMapHandle           src,
  1028.                                  const Rect *           srcRect,
  1029.                                  short                  depth,
  1030.                                  CodecQ                 quality,
  1031.                                  CDSequenceDataSourcePtr  sourceData,
  1032.                                  long *                 size)                               FIVEWORDINLINE(0x2F3C, 0x0016, 0x0016, 0x7000, 0xA82A);
  1033. EXTERN_API( ComponentResult )
  1034. ImageCodecSetTimeBase           (ComponentInstance      ci,
  1035.                                  void *                 base)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
  1036. EXTERN_API( ComponentResult )
  1037. ImageCodecSourceChanged         (ComponentInstance      ci,
  1038.                                  UInt32                 majorSourceChangeSeed,
  1039.                                  UInt32                 minorSourceChangeSeed,
  1040.                                  CDSequenceDataSourcePtr  sourceData,
  1041.                                  long *                 flagsOut)                           FIVEWORDINLINE(0x2F3C, 0x0010, 0x0018, 0x7000, 0xA82A);
  1042. EXTERN_API( ComponentResult )
  1043. ImageCodecFlushFrame            (ComponentInstance      ci,
  1044.                                  UInt32                 flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  1045. EXTERN_API( ComponentResult )
  1046. ImageCodecGetSettingsAsText     (ComponentInstance      ci,
  1047.                                  Handle *               text)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  1048. EXTERN_API( ComponentResult )
  1049. ImageCodecGetParameterListHandle (ComponentInstance     ci,
  1050.                                  Handle *               parameterDescriptionHandle)         FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
  1051. EXTERN_API( ComponentResult )
  1052. ImageCodecGetParameterList      (ComponentInstance      ci,
  1053.                                  QTAtomContainer *      parameterDescription)               FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
  1054. EXTERN_API( ComponentResult )
  1055. ImageCodecCreateStandardParameterDialog (ComponentInstance  ci,
  1056.                                  QTAtomContainer        parameterDescription,
  1057.                                  QTAtomContainer        parameters,
  1058.                                  QTParameterDialogOptions  dialogOptions,
  1059.                                  DialogPtr              existingDialog,
  1060.                                  short                  existingUserItem,
  1061.                                  QTParameterDialog *    createdDialog)                      FIVEWORDINLINE(0x2F3C, 0x0016, 0x001D, 0x7000, 0xA82A);
  1062. EXTERN_API( ComponentResult )
  1063. ImageCodecIsStandardParameterDialogEvent (ComponentInstance  ci,
  1064.                                  EventRecord *          pEvent,
  1065.                                  QTParameterDialog      createdDialog)                      FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  1066. EXTERN_API( ComponentResult )
  1067. ImageCodecDismissStandardParameterDialog (ComponentInstance  ci,
  1068.                                  QTParameterDialog      createdDialog)                      FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  1069. EXTERN_API( ComponentResult )
  1070. ImageCodecStandardParameterDialogDoAction (ComponentInstance  ci,
  1071.                                  QTParameterDialog      createdDialog,
  1072.                                  long                   action,
  1073.                                  void *                 params)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0020, 0x7000, 0xA82A);
  1074. EXTERN_API( ComponentResult )
  1075. ImageCodecNewImageGWorld        (ComponentInstance      ci,
  1076.                                  CodecDecompressParams * params,
  1077.                                  GWorldPtr *            newGW,
  1078.                                  long                   flags)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x0021, 0x7000, 0xA82A);
  1079. EXTERN_API( ComponentResult )
  1080. ImageCodecDisposeImageGWorld    (ComponentInstance      ci,
  1081.                                  GWorldPtr              theGW)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
  1082. EXTERN_API( ComponentResult )
  1083. ImageCodecHitTestDataWithFlags  (ComponentInstance      ci,
  1084.                                  ImageDescriptionHandle  desc,
  1085.                                  void *                 data,
  1086.                                  Size                   dataSize,
  1087.                                  Point                  where,
  1088.                                  long *                 hit,
  1089.                                  long                   hitFlags)                           FIVEWORDINLINE(0x2F3C, 0x0018, 0x0023, 0x7000, 0xA82A);
  1090. EXTERN_API( ComponentResult )
  1091. ImageCodecValidateParameters    (ComponentInstance      ci,
  1092.                                  QTAtomContainer        parameters,
  1093.                                  QTParameterValidationOptions  validationFlags,
  1094.                                  StringPtr              errorString)                        FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
  1095. EXTERN_API( ComponentResult )
  1096. ImageCodecGetBaseMPWorkFunction (ComponentInstance      ci,
  1097.                                  ComponentMPWorkFunctionUPP * workFunction,
  1098.                                  void **                refCon,
  1099.                                  ImageCodecMPDrawBandUPP  drawProc,
  1100.                                  void *                 drawProcRefCon)                     FIVEWORDINLINE(0x2F3C, 0x0010, 0x0025, 0x7000, 0xA82A);
  1101. EXTERN_API( ComponentResult )
  1102. ImageCodecRequestGammaLevel     (ComponentInstance      ci,
  1103.                                  Fixed                  srcGammaLevel,
  1104.                                  Fixed                  dstGammaLevel,
  1105.                                  long *                 codecCanMatch)                      FIVEWORDINLINE(0x2F3C, 0x000C, 0x0028, 0x7000, 0xA82A);
  1106. EXTERN_API( ComponentResult )
  1107. ImageCodecGetSourceDataGammaLevel (ComponentInstance    ci,
  1108.                                  Fixed *                sourceDataGammaLevel)               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0029, 0x7000, 0xA82A);
  1109. EXTERN_API( ComponentResult )
  1110. ImageCodecGetDecompressLatency  (ComponentInstance      ci,
  1111.                                  TimeRecord *           latency)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x002B, 0x7000, 0xA82A);
  1112. EXTERN_API( ComponentResult )
  1113. ImageCodecMergeFloatingImageOntoWindow (ComponentInstance  ci,
  1114.                                  UInt32                 flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
  1115. EXTERN_API( ComponentResult )
  1116. ImageCodecRemoveFloatingImage   (ComponentInstance      ci,
  1117.                                  UInt32                 flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
  1118. EXTERN_API( ComponentResult )
  1119. ImageCodecGetDITLForSize        (ComponentInstance      ci,
  1120.                                  Handle *               ditl,
  1121.                                  Point *                requestedSize)                      FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
  1122. EXTERN_API( ComponentResult )
  1123. ImageCodecDITLInstall           (ComponentInstance      ci,
  1124.                                  DialogRef              d,
  1125.                                  short                  itemOffset)                         FIVEWORDINLINE(0x2F3C, 0x0006, 0x002F, 0x7000, 0xA82A);
  1126. EXTERN_API( ComponentResult )
  1127. ImageCodecDITLEvent             (ComponentInstance      ci,
  1128.                                  DialogRef              d,
  1129.                                  short                  itemOffset,
  1130.                                  const EventRecord *    theEvent,
  1131.                                  short *                itemHit,
  1132.                                  Boolean *              handled)                            FIVEWORDINLINE(0x2F3C, 0x0012, 0x0030, 0x7000, 0xA82A);
  1133. EXTERN_API( ComponentResult )
  1134. ImageCodecDITLItem              (ComponentInstance      ci,
  1135.                                  DialogRef              d,
  1136.                                  short                  itemOffset,
  1137.                                  short                  itemNum)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
  1138. EXTERN_API( ComponentResult )
  1139. ImageCodecDITLRemove            (ComponentInstance      ci,
  1140.                                  DialogRef              d,
  1141.                                  short                  itemOffset)                         FIVEWORDINLINE(0x2F3C, 0x0006, 0x0032, 0x7000, 0xA82A);
  1142. EXTERN_API( ComponentResult )
  1143. ImageCodecDITLValidateInput     (ComponentInstance      ci,
  1144.                                  Boolean *              ok)                                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
  1145. EXTERN_API( ComponentResult )
  1146. ImageCodecPreflight             (ComponentInstance      ci,
  1147.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
  1148. EXTERN_API( ComponentResult )
  1149. ImageCodecInitialize            (ComponentInstance      ci,
  1150.                                  ImageSubCodecDecompressCapabilities * cap)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0201, 0x7000, 0xA82A);
  1151. EXTERN_API( ComponentResult )
  1152. ImageCodecBeginBand             (ComponentInstance      ci,
  1153.                                  CodecDecompressParams * params,
  1154.                                  ImageSubCodecDecompressRecord * drp,
  1155.                                  long                   flags)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x0202, 0x7000, 0xA82A);
  1156. EXTERN_API( ComponentResult )
  1157. ImageCodecDrawBand              (ComponentInstance      ci,
  1158.                                  ImageSubCodecDecompressRecord * drp)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x0203, 0x7000, 0xA82A);
  1159. EXTERN_API( ComponentResult )
  1160. ImageCodecEndBand               (ComponentInstance      ci,
  1161.                                  ImageSubCodecDecompressRecord * drp,
  1162.                                  OSErr                  result,
  1163.                                  long                   flags)                              FIVEWORDINLINE(0x2F3C, 0x000A, 0x0204, 0x7000, 0xA82A);
  1164. EXTERN_API( ComponentResult )
  1165. ImageCodecQueueStarting         (ComponentInstance      ci)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0205, 0x7000, 0xA82A);
  1166. EXTERN_API( ComponentResult )
  1167. ImageCodecQueueStopping         (ComponentInstance      ci)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0206, 0x7000, 0xA82A);
  1168. EXTERN_API( ComponentResult )
  1169. ImageCodecDroppingFrame         (ComponentInstance      ci,
  1170.                                  const ImageSubCodecDecompressRecord * drp)                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0207, 0x7000, 0xA82A);
  1171. EXTERN_API( ComponentResult )
  1172. ImageCodecScheduleFrame         (ComponentInstance      ci,
  1173.                                  const ImageSubCodecDecompressRecord * drp,
  1174.                                  ImageCodecTimeTriggerUPP  triggerProc,
  1175.                                  void *                 triggerProcRefCon)                  FIVEWORDINLINE(0x2F3C, 0x000C, 0x0208, 0x7000, 0xA82A);
  1176. EXTERN_API( ComponentResult )
  1177. ImageCodecCancelTrigger         (ComponentInstance      ci)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0209, 0x7000, 0xA82A);
  1178. /* selectors for component calls */
  1179. enum {
  1180.     kImageCodecGetCodecInfoSelect              = 0x0000,
  1181.     kImageCodecGetCompressionTimeSelect        = 0x0001,
  1182.     kImageCodecGetMaxCompressionSizeSelect     = 0x0002,
  1183.     kImageCodecPreCompressSelect               = 0x0003,
  1184.     kImageCodecBandCompressSelect              = 0x0004,
  1185.     kImageCodecPreDecompressSelect             = 0x0005,
  1186.     kImageCodecBandDecompressSelect            = 0x0006,
  1187.     kImageCodecBusySelect                      = 0x0007,
  1188.     kImageCodecGetCompressedImageSizeSelect    = 0x0008,
  1189.     kImageCodecGetSimilaritySelect             = 0x0009,
  1190.     kImageCodecTrimImageSelect                 = 0x000A,
  1191.     kImageCodecRequestSettingsSelect           = 0x000B,
  1192.     kImageCodecGetSettingsSelect               = 0x000C,
  1193.     kImageCodecSetSettingsSelect               = 0x000D,
  1194.     kImageCodecFlushSelect                     = 0x000E,
  1195.     kImageCodecSetTimeCodeSelect               = 0x000F,
  1196.     kImageCodecIsImageDescriptionEquivalentSelect = 0x0010,
  1197.     kImageCodecNewMemorySelect                 = 0x0011,
  1198.     kImageCodecDisposeMemorySelect             = 0x0012,
  1199.     kImageCodecHitTestDataSelect               = 0x0013,
  1200.     kImageCodecNewImageBufferMemorySelect      = 0x0014,
  1201.     kImageCodecExtractAndCombineFieldsSelect   = 0x0015,
  1202.     kImageCodecGetMaxCompressionSizeWithSourcesSelect = 0x0016,
  1203.     kImageCodecSetTimeBaseSelect               = 0x0017,
  1204.     kImageCodecSourceChangedSelect             = 0x0018,
  1205.     kImageCodecFlushFrameSelect                = 0x0019,
  1206.     kImageCodecGetSettingsAsTextSelect         = 0x001A,
  1207.     kImageCodecGetParameterListHandleSelect    = 0x001B,
  1208.     kImageCodecGetParameterListSelect          = 0x001C,
  1209.     kImageCodecCreateStandardParameterDialogSelect = 0x001D,
  1210.     kImageCodecIsStandardParameterDialogEventSelect = 0x001E,
  1211.     kImageCodecDismissStandardParameterDialogSelect = 0x001F,
  1212.     kImageCodecStandardParameterDialogDoActionSelect = 0x0020,
  1213.     kImageCodecNewImageGWorldSelect            = 0x0021,
  1214.     kImageCodecDisposeImageGWorldSelect        = 0x0022,
  1215.     kImageCodecHitTestDataWithFlagsSelect      = 0x0023,
  1216.     kImageCodecValidateParametersSelect        = 0x0024,
  1217.     kImageCodecGetBaseMPWorkFunctionSelect     = 0x0025,
  1218.     kImageCodecRequestGammaLevelSelect         = 0x0028,
  1219.     kImageCodecGetSourceDataGammaLevelSelect   = 0x0029,
  1220.     kImageCodecGetDecompressLatencySelect      = 0x002B,
  1221.     kImageCodecMergeFloatingImageOntoWindowSelect = 0x002C,
  1222.     kImageCodecRemoveFloatingImageSelect       = 0x002D,
  1223.     kImageCodecGetDITLForSizeSelect            = 0x002E,
  1224.     kImageCodecDITLInstallSelect               = 0x002F,
  1225.     kImageCodecDITLEventSelect                 = 0x0030,
  1226.     kImageCodecDITLItemSelect                  = 0x0031,
  1227.     kImageCodecDITLRemoveSelect                = 0x0032,
  1228.     kImageCodecDITLValidateInputSelect         = 0x0033,
  1229.     kImageCodecPreflightSelect                 = 0x0200,
  1230.     kImageCodecInitializeSelect                = 0x0201,
  1231.     kImageCodecBeginBandSelect                 = 0x0202,
  1232.     kImageCodecDrawBandSelect                  = 0x0203,
  1233.     kImageCodecEndBandSelect                   = 0x0204,
  1234.     kImageCodecQueueStartingSelect             = 0x0205,
  1235.     kImageCodecQueueStoppingSelect             = 0x0206,
  1236.     kImageCodecDroppingFrameSelect             = 0x0207,
  1237.     kImageCodecScheduleFrameSelect             = 0x0208,
  1238.     kImageCodecCancelTriggerSelect             = 0x0209
  1239. };
  1240. enum {
  1241.     kMotionJPEGTag              = FOUR_CHAR_CODE('mjpg'),
  1242.     kJPEGQuantizationTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjqt'),
  1243.     kJPEGHuffmanTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjht'),
  1244.     kFieldInfoImageDescriptionExtension = FOUR_CHAR_CODE('fiel') /* image description extension describing the field count and field orderings*/
  1245. };
  1246. enum {
  1247.     kFieldOrderUnknown          = 0,
  1248.     kFieldsStoredF1F2DisplayedF1F2 = 1,
  1249.     kFieldsStoredF1F2DisplayedF2F1 = 2,
  1250.     kFieldsStoredF2F1DisplayedF1F2 = 5,
  1251.     kFieldsStoredF2F1DisplayedF2F1 = 6
  1252. };
  1253. struct MotionJPEGApp1Marker {
  1254.     long                            unused;
  1255.     long                            tag;
  1256.     long                            fieldSize;
  1257.     long                            paddedFieldSize;
  1258.     long                            offsetToNextField;
  1259.     long                            qTableOffset;
  1260.     long                            huffmanTableOffset;
  1261.     long                            sofOffset;
  1262.     long                            sosOffset;
  1263.     long                            soiOffset;
  1264. };
  1265. typedef struct MotionJPEGApp1Marker     MotionJPEGApp1Marker;
  1266. struct FieldInfoImageDescriptionExtension {
  1267.     UInt8                           fieldCount;
  1268.     UInt8                           fieldOrderings;
  1269. };
  1270. typedef struct FieldInfoImageDescriptionExtension FieldInfoImageDescriptionExtension;
  1271. EXTERN_API( ComponentResult )
  1272. QTPhotoSetSampling              (ComponentInstance      codec,
  1273.                                  short                  yH,
  1274.                                  short                  yV,
  1275.                                  short                  cbH,
  1276.                                  short                  cbV,
  1277.                                  short                  crH,
  1278.                                  short                  crV)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
  1279. EXTERN_API( ComponentResult )
  1280. QTPhotoSetRestartInterval       (ComponentInstance      codec,
  1281.                                  unsigned short         restartInterval)                    FIVEWORDINLINE(0x2F3C, 0x0002, 0x0101, 0x7000, 0xA82A);
  1282. EXTERN_API( ComponentResult )
  1283. QTPhotoDefineHuffmanTable       (ComponentInstance      codec,
  1284.                                  short                  componentNumber,
  1285.                                  Boolean                isDC,
  1286.                                  unsigned char *        lengthCounts,
  1287.                                  unsigned char *        values)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
  1288. EXTERN_API( ComponentResult )
  1289. QTPhotoDefineQuantizationTable  (ComponentInstance      codec,
  1290.                                  short                  componentNumber,
  1291.                                  unsigned char *        table)                              FIVEWORDINLINE(0x2F3C, 0x0006, 0x0103, 0x7000, 0xA82A);
  1292. /* selectors for component calls */
  1293. enum {
  1294.     kQTPhotoSetSamplingSelect                  = 0x0100,
  1295.     kQTPhotoSetRestartIntervalSelect           = 0x0101,
  1296.     kQTPhotoDefineHuffmanTableSelect           = 0x0102,
  1297.     kQTPhotoDefineQuantizationTableSelect      = 0x0103
  1298. };
  1299. /* source identifier -- placed in root container of description, one or more required */
  1300. enum {
  1301.     kEffectSourceName           = FOUR_CHAR_CODE('src ')
  1302. };
  1303. /* source type -- placed in the input map to identify the source kind */
  1304. enum {
  1305.     kEffectDataSourceType       = FOUR_CHAR_CODE('dtst')
  1306. };
  1307. /*  default effect types */
  1308. enum {
  1309.     kEffectRawSource            = 0,                            /* the source is raw image data*/
  1310.     kEffectGenericType          = FOUR_CHAR_CODE('geff')        /* generic effect for combining others*/
  1311. };
  1312. typedef struct EffectSource             EffectSource;
  1313. typedef EffectSource *                  EffectSourcePtr;
  1314. union SourceData {
  1315.     CDSequenceDataSourcePtr         image;
  1316.     EffectSourcePtr                 effect;
  1317. };
  1318. typedef union SourceData                SourceData;
  1319. struct EffectSource {
  1320.     long                            effectType;                 /* type of effect or kEffectRawSource if raw ICM data*/
  1321.     Ptr                             data;                       /* track data for this effect*/
  1322.     SourceData                      source;                     /* source/effect pointers*/
  1323.     EffectSourcePtr                 next;                       /* the next source for the parent effect*/
  1324.                                                                 /* fields added for QuickTime 4.0*/
  1325.     TimeValue                       lastTranslatedFrameTime;    /* start frame time of last converted frame, may be -1*/
  1326.     TimeValue                       lastFrameDuration;          /* duration of the last converted frame, may be zero*/
  1327.     TimeValue                       lastFrameTimeScale;         /* time scale of this source frame, only has meaning if above fields are valid*/
  1328. };
  1329. struct EffectsFrameParams {
  1330.     ICMFrameTimeRecord              frameTime;                  /* timing data*/
  1331.     long                            effectDuration;             /* the duration of a single effect frame*/
  1332.     Boolean                         doAsync;                    /* set to true if the effect can go async*/
  1333.     unsigned char                   pad[3];
  1334.     EffectSourcePtr                 source;                     /* ptr to the source input tree*/
  1335.     void *                          refCon;                     /* storage for the effect*/
  1336. };
  1337. typedef struct EffectsFrameParams       EffectsFrameParams;
  1338. typedef EffectsFrameParams *            EffectsFrameParamsPtr;
  1339. EXTERN_API( ComponentResult )
  1340. ImageCodecEffectSetup           (ComponentInstance      effect,
  1341.                                  CodecDecompressParams * p)                                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0300, 0x7000, 0xA82A);
  1342. EXTERN_API( ComponentResult )
  1343. ImageCodecEffectBegin           (ComponentInstance      effect,
  1344.                                  CodecDecompressParams * p,
  1345.                                  EffectsFrameParamsPtr  ePtr)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x0301, 0x7000, 0xA82A);
  1346. EXTERN_API( ComponentResult )
  1347. ImageCodecEffectRenderFrame     (ComponentInstance      effect,
  1348.                                  EffectsFrameParamsPtr  p)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0302, 0x7000, 0xA82A);
  1349. EXTERN_API( ComponentResult )
  1350. ImageCodecEffectConvertEffectSourceToFormat (ComponentInstance  effect,
  1351.                                  EffectSourcePtr        sourceToConvert,
  1352.                                  ImageDescriptionHandle  requestedDesc)                     FIVEWORDINLINE(0x2F3C, 0x0008, 0x0303, 0x7000, 0xA82A);
  1353. EXTERN_API( ComponentResult )
  1354. ImageCodecEffectCancel          (ComponentInstance      effect,
  1355.                                  EffectsFrameParamsPtr  p)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0304, 0x7000, 0xA82A);
  1356. EXTERN_API( ComponentResult )
  1357. ImageCodecEffectGetSpeed        (ComponentInstance      effect,
  1358.                                  QTAtomContainer        parameters,
  1359.                                  Fixed *                pFPS)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x0305, 0x7000, 0xA82A);
  1360. enum {
  1361.     kSMPTENoFlag                = 0,
  1362.     kSMPTESmoothEdgeFlag        = 0x01,                         /* smooth edges of the stroke*/
  1363.     kSMPTEStrokeEdgeFlag        = 0x02                          /* stroke edge with color*/
  1364. };
  1365. typedef long                            SMPTEFlags;
  1366. typedef long                            SMPTEFrameReference;
  1367. enum {
  1368.     kSlideHorizontalWipe        = 1,
  1369.     kSlideVerticalWipe          = 2,
  1370.     kTopLeftWipe                = 3,
  1371.     kTopRightWipe               = 4,
  1372.     kBottomRightWipe            = 5,
  1373.     kBottomLeftWipe             = 6,
  1374.     kFourCornerWipe             = 7,
  1375.     kFourBoxWipe                = 8,
  1376.     kBarnVerticalWipe           = 21,
  1377.     kBarnHorizontalWipe         = 22,
  1378.     kTopCenterWipe              = 23,
  1379.     kRightCenterWipe            = 24,
  1380.     kBottomCenterWipe           = 25,
  1381.     kLeftCenterWipe             = 26,
  1382.     kDiagonalLeftDownWipe       = 41,
  1383.     kDiagonalRightDownWipe      = 42,
  1384.     kTopBottomBowTieWipe        = 43,
  1385.     kLeftRightBowTieWipe        = 44,
  1386.     kDiagonalLeftOutWipe        = 45,
  1387.     kDiagonalRightOutWipe       = 46,
  1388.     kDiagonalCrossWipe          = 47,
  1389.     kDiagonalBoxWipe            = 48,
  1390.     kFilledVWipe                = 61,
  1391.     kFilledVRightWipe           = 62,
  1392.     kFilledVBottomWipe          = 63,
  1393.     kFilledVLeftWipe            = 64,
  1394.     kHollowVWipe                = 65,
  1395.     kHollowVRightWipe           = 66,
  1396.     kHollowVBottomWipe          = 67,
  1397.     kHollowVLeftWipe            = 68,
  1398.     kVerticalZigZagWipe         = 71,
  1399.     kHorizontalZigZagWipe       = 72,
  1400.     kVerticalBarnZigZagWipe     = 73,
  1401.     kHorizontalBarnZigZagWipe   = 74
  1402. };
  1403. enum {
  1404.     kRectangleWipe              = 101,
  1405.     kDiamondWipe                = 102,
  1406.     kTriangleWipe               = 103,
  1407.     kTriangleRightWipe          = 104,
  1408.     kTriangleUpsideDownWipe     = 105,
  1409.     kTriangleLeftWipe           = 106,
  1410.     kSpaceShipWipe              = 107,
  1411.     kSpaceShipRightWipe         = 108,
  1412.     kSpaceShipUpsideDownWipe    = 109,
  1413.     kSpaceShipLeftWipe          = 110,
  1414.     kPentagonWipe               = 111,
  1415.     kPentagonUpsideDownWipe     = 112,
  1416.     kHexagonWipe                = 113,
  1417.     kHexagonSideWipe            = 114,
  1418.     kCircleWipe                 = 119,
  1419.     kOvalWipe                   = 120,
  1420.     kOvalSideWipe               = 121,
  1421.     kCatEyeWipe                 = 122,
  1422.     kCatEyeSideWipe             = 123,
  1423.     kRoundRectWipe              = 124,
  1424.     kRoundRectSideWipe          = 125,
  1425.     kFourPointStarWipe          = 127,
  1426.     kFivePointStarWipe          = 128,
  1427.     kStarOfDavidWipe            = 129,
  1428.     kHeartWipe                  = 130,
  1429.     kKeyholeWipe                = 131
  1430. };
  1431. enum {
  1432.     kRotatingTopWipe            = 201,
  1433.     kRotatingRightWipe          = 202,
  1434.     kRotatingBottomWipe         = 203,
  1435.     kRotatingLeftWipe           = 204,
  1436.     kRotatingTopBottomWipe      = 205,
  1437.     kRotatingLeftRightWipe      = 206,
  1438.     kRotatingQuadrantWipe       = 207,
  1439.     kTopToBottom180Wipe         = 211,
  1440.     kRightToLeft180Wipe         = 212,
  1441.     kTopToBottom90Wipe          = 213,
  1442.     kRightToLeft90Wipe          = 214,
  1443.     kTop180Wipe                 = 221,
  1444.     kRight180Wipe               = 222,
  1445.     kBottom180Wipe              = 223,
  1446.     kLeft180Wipe                = 224,
  1447.     kCounterRotatingTopBottomWipe = 225,
  1448.     kCounterRotatingLeftRightWipe = 226,
  1449.     kDoubleRotatingTopBottomWipe = 227,
  1450.     kDoubleRotatingLeftRightWipe = 228,
  1451.     kVOpenTopWipe               = 231,
  1452.     kVOpenRightWipe             = 232,
  1453.     kVOpenBottomWipe            = 233,
  1454.     kVOpenLeftWipe              = 234,
  1455.     kVOpenTopBottomWipe         = 235,
  1456.     kVOpenLeftRightWipe         = 236,
  1457.     kRotatingTopLeftWipe        = 241,
  1458.     kRotatingBottomLeftWipe     = 242,
  1459.     kRotatingBottomRightWipe    = 243,
  1460.     kRotatingTopRightWipe       = 244,
  1461.     kRotatingTopLeftBottomRightWipe = 245,
  1462.     kRotatingBottomLeftTopRightWipe = 246,
  1463.     kRotatingTopLeftRightWipe   = 251,
  1464.     kRotatingLeftTopBottomWipe  = 252,
  1465.     kRotatingBottomLeftRightWipe = 253,
  1466.     kRotatingRightTopBottomWipe = 254,
  1467.     kRotatingDoubleCenterRightWipe = 261,
  1468.     kRotatingDoubleCenterTopWipe = 262,
  1469.     kRotatingDoubleCenterTopBottomWipe = 263,
  1470.     kRotatingDoubleCenterLeftRightWipe = 264
  1471. };
  1472. enum {
  1473.     kHorizontalMatrixWipe       = 301,
  1474.     kVerticalMatrixWipe         = 302,
  1475.     kTopLeftDiagonalMatrixWipe  = 303,
  1476.     kTopRightDiagonalMatrixWipe = 304,
  1477.     kBottomRightDiagonalMatrixWipe = 305,
  1478.     kBottomLeftDiagonalMatrixWipe = 306,
  1479.     kClockwiseTopLeftMatrixWipe = 310,
  1480.     kClockwiseTopRightMatrixWipe = 311,
  1481.     kClockwiseBottomRightMatrixWipe = 312,
  1482.     kClockwiseBottomLeftMatrixWipe = 313,
  1483.     kCounterClockwiseTopLeftMatrixWipe = 314,
  1484.     kCounterClockwiseTopRightMatrixWipe = 315,
  1485.     kCounterClockwiseBottomRightMatrixWipe = 316,
  1486.     kCounterClockwiseBottomLeftMatrixWipe = 317,
  1487.     kVerticalStartTopMatrixWipe = 320,
  1488.     kVerticalStartBottomMatrixWipe = 321,
  1489.     kVerticalStartTopOppositeMatrixWipe = 322,
  1490.     kVerticalStartBottomOppositeMatrixWipe = 323,
  1491.     kHorizontalStartLeftMatrixWipe = 324,
  1492.     kHorizontalStartRightMatrixWipe = 325,
  1493.     kHorizontalStartLeftOppositeMatrixWipe = 326,
  1494.     kHorizontalStartRightOppositeMatrixWipe = 327,
  1495.     kDoubleDiagonalTopRightMatrixWipe = 328,
  1496.     kDoubleDiagonalBottomRightMatrixWipe = 329,
  1497.     kDoubleSpiralTopMatixWipe   = 340,
  1498.     kDoubleSpiralBottomMatixWipe = 341,
  1499.     kDoubleSpiralLeftMatixWipe  = 342,
  1500.     kDoubleSpiralRightMatixWipe = 343,
  1501.     kQuadSpiralVerticalMatixWipe = 344,
  1502.     kQuadSpiralHorizontalMatixWipe = 345,
  1503.     kVerticalWaterfallLeftMatrixWipe = 350,
  1504.     kVerticalWaterfallRightMatrixWipe = 351,
  1505.     kHorizontalWaterfallLeftMatrixWipe = 352,
  1506.     kHorizontalWaterfallRightMatrixWipe = 353,
  1507.     kRandomWipe                 = 409,                          /* non-SMPTE standard numbers*/
  1508.     kRandomWipeGroupWipe        = 501,
  1509.     kRandomIrisGroupWipe        = 502,
  1510.     kRandomRadialGroupWipe      = 503,
  1511.     kRandomMatrixGroupWipe      = 504
  1512. };
  1513. typedef unsigned long                   SMPTEWipeType;
  1514. EXTERN_API( ComponentResult )
  1515. ImageCodecEffectPrepareSMPTEFrame (ComponentInstance    effect,
  1516.                                  PixMapPtr              destPixMap,
  1517.                                  SMPTEFrameReference *  returnValue)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
  1518. EXTERN_API( ComponentResult )
  1519. ImageCodecEffectDisposeSMPTEFrame (ComponentInstance    effect,
  1520.                                  SMPTEFrameReference    frameRef)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
  1521. EXTERN_API( ComponentResult )
  1522. ImageCodecEffectRenderSMPTEFrame (ComponentInstance     effect,
  1523.                                  PixMapPtr              destPixMap,
  1524.                                  SMPTEFrameReference    frameRef,
  1525.                                  Fixed                  effectPercentageEven,
  1526.                                  Fixed                  effectPercentageOdd,
  1527.                                  Rect *                 pSourceRect,
  1528.                                  MatrixRecord *         pMatrix,
  1529.                                  SMPTEWipeType          effectNumber,
  1530.                                  long                   xRepeat,
  1531.                                  long                   yRepeat,
  1532.                                  SMPTEFlags             flags,
  1533.                                  Fixed                  penWidth,
  1534.                                  long                   strokeValue)                        FIVEWORDINLINE(0x2F3C, 0x0030, 0x0102, 0x7000, 0xA82A);
  1535. /* selectors for component calls */
  1536. enum {
  1537.     kImageCodecEffectSetupSelect               = 0x0300,
  1538.     kImageCodecEffectBeginSelect               = 0x0301,
  1539.     kImageCodecEffectRenderFrameSelect         = 0x0302,
  1540.     kImageCodecEffectConvertEffectSourceToFormatSelect = 0x0303,
  1541.     kImageCodecEffectCancelSelect              = 0x0304,
  1542.     kImageCodecEffectGetSpeedSelect            = 0x0305,
  1543.     kImageCodecEffectPrepareSMPTEFrameSelect   = 0x0100,
  1544.     kImageCodecEffectDisposeSMPTEFrameSelect   = 0x0101,
  1545.     kImageCodecEffectRenderSMPTEFrameSelect    = 0x0102
  1546. };
  1547. /* curve atom types and data structures */
  1548. enum {
  1549.     kCurvePathAtom              = FOUR_CHAR_CODE('path'),
  1550.     kCurveEndAtom               = FOUR_CHAR_CODE('zero'),
  1551.     kCurveAntialiasControlAtom  = FOUR_CHAR_CODE('anti'),
  1552.     kCurveAntialiasOff          = 0,
  1553.     kCurveAntialiasOn           = (long)0xFFFFFFFF,
  1554.     kCurveFillTypeAtom          = FOUR_CHAR_CODE('fill'),
  1555.     kCurvePenThicknessAtom      = FOUR_CHAR_CODE('pent'),
  1556.     kCurveMiterLimitAtom        = FOUR_CHAR_CODE('mitr'),
  1557.     kCurveJoinAttributesAtom    = FOUR_CHAR_CODE('join'),
  1558.     kCurveMinimumDepthAtom      = FOUR_CHAR_CODE('mind'),
  1559.     kCurveDepthAlwaysOffscreenMask = (long)0x80000000,
  1560.     kCurveTransferModeAtom      = FOUR_CHAR_CODE('xfer'),
  1561.     kCurveGradientAngleAtom     = FOUR_CHAR_CODE('angl'),
  1562.     kCurveGradientRadiusAtom    = FOUR_CHAR_CODE('radi'),
  1563.     kCurveGradientOffsetAtom    = FOUR_CHAR_CODE('cent')
  1564. };
  1565. enum {
  1566.     kCurveARGBColorAtom         = FOUR_CHAR_CODE('argb')
  1567. };
  1568. struct ARGBColor {
  1569.     unsigned short                  alpha;
  1570.     unsigned short                  red;
  1571.     unsigned short                  green;
  1572.     unsigned short                  blue;
  1573. };
  1574. typedef struct ARGBColor                ARGBColor;
  1575. enum {
  1576.     kCurveGradientRecordAtom    = FOUR_CHAR_CODE('grad')
  1577. };
  1578. struct GradientColorRecord {
  1579.     ARGBColor                       thisColor;
  1580.     Fixed                           endingPercentage;
  1581. };
  1582. typedef struct GradientColorRecord      GradientColorRecord;
  1583. typedef GradientColorRecord *           GradientColorPtr;
  1584. enum {
  1585.     kCurveGradientTypeAtom      = FOUR_CHAR_CODE('grdt')
  1586. };
  1587. /* currently supported gradient types */
  1588. enum {
  1589.     kLinearGradient             = 0,
  1590.     kCircularGradient           = 1
  1591. };
  1592. typedef long                            GradientType;
  1593. EXTERN_API( ComponentResult )
  1594. CurveGetLength                  (ComponentInstance      effect,
  1595.                                  gxPaths *              target,
  1596.                                  long                   index,
  1597.                                  wide *                 wideLength)                         FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
  1598. EXTERN_API( ComponentResult )
  1599. CurveLengthToPoint              (ComponentInstance      effect,
  1600.                                  gxPaths *              target,
  1601.                                  long                   index,
  1602.                                  Fixed                  length,
  1603.                                  FixedPoint *           location,
  1604.                                  FixedPoint *           tangent)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0101, 0x7000, 0xA82A);
  1605. EXTERN_API( ComponentResult )
  1606. CurveNewPath                    (ComponentInstance      effect,
  1607.                                  Handle *               pPath)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
  1608. EXTERN_API( ComponentResult )
  1609. CurveCountPointsInPath          (ComponentInstance      effect,
  1610.                                  gxPaths *              aPath,
  1611.                                  unsigned long          contourIndex,
  1612.                                  unsigned long *        pCount)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
  1613. EXTERN_API( ComponentResult )
  1614. CurveGetPathPoint               (ComponentInstance      effect,
  1615.                                  gxPaths *              aPath,
  1616.                                  unsigned long          contourIndex,
  1617.                                  unsigned long          pointIndex,
  1618.                                  gxPoint *              thePoint,
  1619.                                  Boolean *              ptIsOnPath)                         FIVEWORDINLINE(0x2F3C, 0x0014, 0x0104, 0x7000, 0xA82A);
  1620. EXTERN_API( ComponentResult )
  1621. CurveInsertPointIntoPath        (ComponentInstance      effect,
  1622.                                  gxPoint *              aPoint,
  1623.                                  Handle                 thePath,
  1624.                                  unsigned long          contourIndex,
  1625.                                  unsigned long          pointIndex,
  1626.                                  Boolean                ptIsOnPath)                         FIVEWORDINLINE(0x2F3C, 0x0012, 0x0105, 0x7000, 0xA82A);
  1627. EXTERN_API( ComponentResult )
  1628. CurveSetPathPoint               (ComponentInstance      effect,
  1629.                                  gxPaths *              aPath,
  1630.                                  unsigned long          contourIndex,
  1631.                                  unsigned long          pointIndex,
  1632.                                  gxPoint *              thePoint,
  1633.                                  Boolean                ptIsOnPath)                         FIVEWORDINLINE(0x2F3C, 0x0012, 0x0106, 0x7000, 0xA82A);
  1634. EXTERN_API( ComponentResult )
  1635. CurveGetNearestPathPoint        (ComponentInstance      effect,
  1636.                                  gxPaths *              aPath,
  1637.                                  FixedPoint *           thePoint,
  1638.                                  unsigned long *        contourIndex,
  1639.                                  unsigned long *        pointIndex,
  1640.                                  Fixed *                theDelta)                           FIVEWORDINLINE(0x2F3C, 0x0014, 0x0107, 0x7000, 0xA82A);
  1641. EXTERN_API( ComponentResult )
  1642. CurvePathPointToLength          (ComponentInstance      ci,
  1643.                                  gxPaths *              aPath,
  1644.                                  Fixed                  startDist,
  1645.                                  Fixed                  endDist,
  1646.                                  FixedPoint *           thePoint,
  1647.                                  Fixed *                pLength)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0108, 0x7000, 0xA82A);
  1648. EXTERN_API( ComponentResult )
  1649. CurveCreateVectorStream         (ComponentInstance      effect,
  1650.                                  Handle *               pStream)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
  1651. EXTERN_API( ComponentResult )
  1652. CurveAddAtomToVectorStream      (ComponentInstance      effect,
  1653.                                  OSType                 atomType,
  1654.                                  Size                   atomSize,
  1655.                                  void *                 pAtomData,
  1656.                                  Handle                 vectorStream)                       FIVEWORDINLINE(0x2F3C, 0x0010, 0x010A, 0x7000, 0xA82A);
  1657. EXTERN_API( ComponentResult )
  1658. CurveAddPathAtomToVectorStream  (ComponentInstance      effect,
  1659.                                  Handle                 pathData,
  1660.                                  Handle                 vectorStream)                       FIVEWORDINLINE(0x2F3C, 0x0008, 0x010B, 0x7000, 0xA82A);
  1661. EXTERN_API( ComponentResult )
  1662. CurveAddZeroAtomToVectorStream  (ComponentInstance      effect,
  1663.                                  Handle                 vectorStream)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x010C, 0x7000, 0xA82A);
  1664. EXTERN_API( ComponentResult )
  1665. CurveGetAtomDataFromVectorStream (ComponentInstance     effect,
  1666.                                  Handle                 vectorStream,
  1667.                                  long                   atomType,
  1668.                                  long *                 dataSize,
  1669.                                  Ptr *                  dataPtr)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x010D, 0x7000, 0xA82A);
  1670. /* selectors for component calls */
  1671. enum {
  1672.     kCurveGetLengthSelect                      = 0x0100,
  1673.     kCurveLengthToPointSelect                  = 0x0101,
  1674.     kCurveNewPathSelect                        = 0x0102,
  1675.     kCurveCountPointsInPathSelect              = 0x0103,
  1676.     kCurveGetPathPointSelect                   = 0x0104,
  1677.     kCurveInsertPointIntoPathSelect            = 0x0105,
  1678.     kCurveSetPathPointSelect                   = 0x0106,
  1679.     kCurveGetNearestPathPointSelect            = 0x0107,
  1680.     kCurvePathPointToLengthSelect              = 0x0108,
  1681.     kCurveCreateVectorStreamSelect             = 0x0109,
  1682.     kCurveAddAtomToVectorStreamSelect          = 0x010A,
  1683.     kCurveAddPathAtomToVectorStreamSelect      = 0x010B,
  1684.     kCurveAddZeroAtomToVectorStreamSelect      = 0x010C,
  1685.     kCurveGetAtomDataFromVectorStreamSelect    = 0x010D
  1686. };
  1687. /* UPP call backs */
  1688. #if PRAGMA_STRUCT_ALIGN
  1689.     #pragma options align=reset
  1690. #elif PRAGMA_STRUCT_PACKPUSH
  1691.     #pragma pack(pop)
  1692. #elif PRAGMA_STRUCT_PACK
  1693.     #pragma pack()
  1694. #endif
  1695. #ifdef PRAGMA_IMPORT_OFF
  1696. #pragma import off
  1697. #elif PRAGMA_IMPORT
  1698. #pragma import reset
  1699. #endif
  1700. #ifdef __cplusplus
  1701. }
  1702. #endif
  1703. #endif /* __IMAGECODEC__ */