home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 May: Tool Chest / Dev.CD May 98 TC.toast / Tool Chest / QuickTime / QuickTime Tools / DrawTextCodec Example / Sample code / QuickTimeComponents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-12  |  34.7 KB  |  947 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Saturday, August 17, 1991 at 10:03 AM
  5.  QuickTimeComponents.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.  Copyright Apple Computer, Inc. 1991
  10.  All rights reserved
  11.  
  12.  
  13.  
  14. ************************************************************/
  15.  
  16.  
  17. #ifndef __QUICKTIMECOMPONENTS__
  18. #define __QUICKTIMECOMPONENTS__
  19.  
  20. #ifndef __COMPONENTS__
  21. #include <Components.h>
  22. #endif
  23.  
  24. #ifndef __IMAGECOMPRESSION__
  25. #include <ImageCompression.h>
  26. #endif
  27.  
  28. #ifndef __MOVIES__
  29. #include <Movies.h>
  30. #endif
  31.  
  32. #ifndef __QUICKDRAW__
  33. #include <QuickDraw.h>
  34. #endif
  35.  
  36. #ifndef __VIDEO__
  37. #include <Video.h>
  38. #endif
  39.  
  40.  
  41. enum {
  42.  
  43.  
  44. /*****
  45.  
  46.  Clock Component
  47.  
  48. *****/
  49.  
  50. #define clockComponentType 'clok'
  51. #define systemTickClock 'tick'            /* subtype: 60ths since boot */
  52. #define systemMicrosecondClock 'micr'    /* subtype: 1000000ths since boot */
  53.  
  54.  
  55.  kClockRateIsLinear = 1,
  56.  kClockImplementsCallBacks = 2
  57.  
  58. };
  59.  
  60. enum {kClockGetClockTimeSelect = 1,kClockSetClockTimeSelect = 2,kClockNewCallBackSelect,
  61.  kClockDisposeCallBackSelect,kClockCallMeWhenSelect,kClockCancelCallBackSelect,
  62.  kClockRateChangedSelect,kClockTimeChangedSelect,kClockSetTimeBaseSelect, kClockStartStopChangedSelect};
  63. typedef unsigned  ClockComponentSelectors;
  64.  
  65.  
  66. #ifdef __cplusplus
  67. extern "C" {
  68. #endif
  69. pascal ComponentResult GetClockTime(ComponentInstance aClock,TimeRecord *out)
  70.  = {0x2F3C,0x4,0x1,0x7000,0xA82A}; 
  71. pascal QTCallBack ClockNewCallBack(ComponentInstance aClock,TimeBase tb,
  72.  short callBackType)
  73.  = {0x2F3C,0x6,0x2,0x7000,0xA82A}; 
  74. pascal ComponentResult ClockDisposeCallBack(ComponentInstance aClock,QTCallBack cb)
  75.  = {0x2F3C,0x4,0x3,0x7000,0xA82A}; 
  76. pascal ComponentResult ClockCallMeWhen(ComponentInstance clock,QTCallBack cb,
  77.  long param1,long param2,long param3)
  78.  = {0x2F3C,0x10,0x4,0x7000,0xA82A}; 
  79. pascal ComponentResult ClockCancelCallBack(ComponentInstance clock,QTCallBack cb)
  80.  = {0x2F3C,0x4,0x5,0x7000,0xA82A}; 
  81. pascal ComponentResult ClockRateChanged(ComponentInstance clock,QTCallBack cb)
  82.  = {0x2F3C,0x4,0x6,0x7000,0xA82A}; 
  83. pascal ComponentResult ClockTimeChanged(ComponentInstance clock,QTCallBack cb)
  84.  = {0x2F3C,0x4,0x7,0x7000,0xA82A}; 
  85. pascal ComponentResult ClockSetTimeBase(ComponentInstance clock,TimeBase tb)
  86.  = {0x2F3C,0x4,0x8,0x7000,0xA82A}; 
  87. pascal ComponentResult ClockStartStopChanged(ComponentInstance clock, QTCallBack cb, Boolean startChanged, Boolean stopChanged)
  88.  = {0x2F3C,0x8,0x9,0x7000,0xA82A}; 
  89.  
  90. #ifdef __cplusplus
  91. }
  92. #endif
  93. enum {
  94.  
  95.  
  96. /*
  97.  Video Digitizer Component
  98.  
  99.  
  100.   Standard type for video digitizers */
  101.  
  102.  videoDigitizerComponentType = 'vdig',
  103.  vdigInterfaceRev = 2L,
  104.  
  105.  
  106. /* Input Format Standards */
  107.  
  108.  ntscIn = 0    ,                        /* ntsc input format */
  109.  palIn = 1    ,                        /* pal input format */
  110.  secamIn = 2,                            /* secam input format */
  111.  
  112.  
  113. /* Input Formats */
  114.  compositeIn = 0    ,                    /* input is composite format */
  115.  sVideoIn = 1    ,                    /* input is sVideo format */
  116.  rgbComponentIn = 2        ,            /* input is rgb component format */
  117.     
  118.  
  119. /* Video Digitizer PlayThru States */
  120.  vdPlayThruOff = 0,
  121.  vdPlayThruOn = 1,
  122.  
  123.  
  124. /* Input Color Space Modes */
  125.  vdDigitizerBW = 0    ,                /* black and white */
  126.  vdDigitizerRGB = 1    ,                /* rgb color */
  127.  
  128.  
  129. /* Phase Lock Loop Modes */
  130.  vdBroadcastMode = 0,                    /* Broadcast / Laser Disk video mode */
  131.  vdVTRMode = 1        ,                /* VCR / Magnetic media mode */
  132.  
  133. /* Field Select Options */
  134.  vdUseAnyField = 0,
  135.  vdUseOddField = 1,
  136.  vdUseEvenField = 2,
  137.  
  138. /* vdig types */
  139.  vdTypeBasic = 0,                        /* basic, no clipping */
  140.  vdTypeAlpha = 1,                        /* supports clipping with alpha channel */
  141.  vdTypeMask = 2    ,                    /* supports clipping with mask plane */
  142.  vdTypeKey = 3    ,                    /* supports clipping with key color(s) */
  143.  
  144.  
  145. /* Digitizer Error Codes */
  146.  
  147.  digiUnimpErr = -2201,                /* feature unimplemented */
  148.  qtParamErr = -2202    ,            /* bad input parameter ( out of range, etc ) */
  149.  matrixErr = -2203    ,                /* bad matrix, digitizer did nothing */
  150.  notExactMatrix = -2204    ,        /* warning of bad matrix, digitizer did its best */
  151.  noMoreKeyColors = -2205,            /* all key indexes in use */
  152.  notExactSize = -2206    ,            /* Can’t do exact size requested */
  153.  badDepth = -2207,                    /* Can’t digitize into this depth */
  154.  noDMA = -2208    ,                    /* Can’t do DMA digitizing ( i.e. can't go to requested dest) */
  155.  badCallOrder = -2209,            /* Usually due to a status call being called prior to being setup first */
  156.  
  157.  
  158. /* Digitizer Input Capability/Current Flags */
  159.  digiInDoesNTSC= (1L<<0),            /* digitizer supports NTSC input format */
  160.  digiInDoesPAL= (1L<<1)    ,        /* digitizer supports PAL input format */
  161.  digiInDoesSECAM= (1L<<2),            /* digitizer supports SECAM input format */
  162.  digiInDoesGenLock= (1L<<7)    ,    /* digitizer does genlock */
  163.  
  164.  digiInDoesComposite= (1L<<8),        /* digitizer supports composite input type */
  165.  digiInDoesSVideo = (1L<<9)    ,    /* digitizer supports S-Video input type */
  166.  digiInDoesComponent = (1L<<10)    ,/* digitizer supports component (rgb) input type */
  167.  digiInVTR_Broadcast = (1L<<11),/* digitizer can differentiate between the two */
  168.  
  169.  digiInDoesColor = (1L<<12)    ,    /* digitizer supports color */
  170.  digiInDoesBW = (1L<<13)    ,        /* digitizer supports black & white */
  171.  
  172.  
  173. /* Digitizer Input Current Flags (these are valid only during active operating conditions) */
  174.  digiInSignalLock = (1L<<31),        /* digitizer detects input signal is locked - this bit = horiz lock || vertical lock */
  175.  
  176.  
  177. /* Digitizer Output Capability/Current Flags */
  178.  digiOutDoes1 = (1L<<0)    ,        /* digitizer supports 1 bit pixels */
  179.  digiOutDoes2 = (1L<<1)    ,        /* digitizer supports 2 bit pixels */
  180.  digiOutDoes4 = (1L<<2)    ,        /* digitizer supports 4 bit pixels */
  181.  digiOutDoes8 = (1L<<3)    ,        /* digitizer supports 8 bit pixels */
  182.  digiOutDoes16 = (1L<<4)    ,        /* digitizer supports 16 bit pixels */
  183.  digiOutDoes32 = (1L<<5)    ,        /* digitizer supports 32 bit pixels */
  184.  digiOutDoesDither = (1L<<6),        /* digitizer dithers in indexed modes */
  185.  digiOutDoesStretch = (1L<<7),        /* digitizer can arbitrarily stretch */
  186.  digiOutDoesShrink = (1L<<8),        /* digitizer can arbitrarily shrink */
  187.  digiOutDoesMask = (1L<<9)    ,        /* digitizer can mask to clipping regions */
  188.  
  189.  digiOutDoesDouble = (1L<<11),        /* digitizer can stretch to exactly double size */
  190.  digiOutDoesQuad = (1L<<12)        ,/* digitizer can stretch exactly quadruple size */
  191.  digiOutDoesQuarter = (1L<<13)    ,    /* digitizer can shrink to exactly quarter size */
  192.  digiOutDoesSixteenth = (1L<<14),    /* digitizer can shrink to exactly sixteenth size */
  193.  
  194.  digiOutDoesRotate = (1L<<15)    ,    /* digitizer supports rotate transformations */
  195.  digiOutDoesHorizFlip = (1L<<16),    /* digitizer supports horizontal flips Sx < 0 */
  196.  digiOutDoesVertFlip = (1L<<17),    /* digitizer supports vertical flips Sy < 0 */
  197.  digiOutDoesSkew = (1L<<18)        ,/* digitizer supports skew (shear, twist) */
  198.  digiOutDoesBlend = (1L<<19),
  199.  digiOutDoesWarp = (1L<<20),
  200.  
  201.  digiOutDoesHW_DMA = (1L<<21)    ,    /* digitizer not constrained to local device */
  202.  digiOutDoesHWPlayThru = (1L<<22),    /* digitizer doesn't need time to play thru */
  203.  digiOutDoesILUT = (1L<<23)        ,    /* digitizer does inverse LUT for index modes */
  204.  digiOutDoesKeyColor = (1L<<24)    ,    /* digitizer does key color functions too */
  205.  digiOutDoesAsyncGrabs = (1L<<25)    /* digitizer supports async grabs */
  206.  
  207. };
  208.  
  209. typedef ComponentInstance VideoDigitizerComponent;
  210. typedef ComponentResult VideoDigitizerError;
  211.  
  212. /* Types */
  213. struct DigitizerInfo {
  214.  short vdigType;
  215.  long inputCapabilityFlags;
  216.  long outputCapabilityFlags;
  217.  long inputCurrentFlags;
  218.  long outputCurrentFlags;
  219.  short slot;                            /* temporary for connection purposes */
  220.  GDHandle gdh;                            /* temporary for digitizers that have preferred screen */
  221.  GDHandle maskgdh;                        /* temporary for digitizers that have mask planes */
  222.  short minDestHeight;                    /* Smallest resizable height */
  223.  short minDestWidth;                    /* Smallest resizable width */
  224.  short maxDestHeight;                    /* Largest resizable height */
  225.  short maxDestWidth;                    /* Largest resizable height */
  226.  short blendLevels;                        /* Number of blend levels supported (2 if 1 bit mask) */
  227.  long Private;                            /* reserved */
  228. };
  229.  
  230. typedef struct DigitizerInfo DigitizerInfo;
  231.  
  232. typedef struct {
  233.     PixMapHandle    dest;
  234.     Point            location;
  235.     long            reserved;
  236. } VdigBufferRec;
  237.  
  238. struct VdigBufferRecList {
  239.     short            count;
  240.     MatrixRecordPtr    matrix;
  241.     RgnHandle        mask;
  242.     VdigBufferRec    list[1];
  243. };
  244.  
  245. typedef struct VdigBufferRecList VdigBufferRecList;
  246. typedef VdigBufferRecList *VdigBufferRecListPtr, **VdigBufferRecListHandle;
  247. typedef pascal void (*VdigIntProc)(long flags, long refcon);
  248.  
  249. enum {
  250.  
  251.  
  252. /* Video Digitizer Interface */
  253.  kSelectVDGetMaxSrcRect = 1,
  254.  kSelectVDGetActiveSrcRect = 2,
  255.  kSelectVDSetDigitizerRect = 3,
  256.  kSelectVDGetDigitizerRect = 4,
  257.  kSelectVDGetVBlankRect = 5,
  258.  kSelectVDGetMaskPixMap = 6,
  259.  
  260. /* 1 available selector here */
  261.  
  262.  kSelectVDGetPlayThruDestination = 8,
  263.  kSelectVDUseThisCLUT = 9,
  264.  kSelectVDSetInputGammaValue = 10,
  265.  kSelectVDGetInputGammaValue = 11,
  266.  kSelectVDSetBrightness = 12,
  267.  kSelectVDGetBrightness = 13,
  268.  kSelectVDSetContrast = 14,
  269.  kSelectVDSetHue = 15,
  270.  kSelectVDSetSharpness = 16,
  271.  kSelectVDSetSaturation = 17,
  272.  kSelectVDGetContrast = 18,
  273.  kSelectVDGetHue = 19,
  274.  kSelectVDGetSharpness = 20
  275. };
  276. enum {
  277.  kSelectVDGetSaturation = 21,
  278.  kSelectVDGrabOneFrame = 22,
  279.  kSelectVDGetMaxAuxBuffer = 23,
  280.  
  281. /* 1 available selector here */
  282.  
  283.  kSelectVDGetDigitizerInfo = 25,
  284.  kSelectVDGetCurrentFlags = 26,
  285.  kSelectVDSetKeyColor = 27,
  286.  kSelectVDGetKeyColor = 28,
  287.  kSelectVDAddKeyColor = 29,
  288.  kSelectVDGetNextKeyColor = 30,
  289.  kSelectVDSetKeyColorRange = 31,
  290.  kSelectVDGetKeyColorRange = 32,
  291.  kSelectVDSetDigitizerUserInterrupt = 33,
  292.  kSelectVDSetInputColorSpaceMode = 34,
  293.  kSelectVDGetInputColorSpaceMode = 35,
  294.  kSelectVDSetClipState = 36,
  295.  kSelectVDGetClipState = 37,
  296.  kSelectVDSetClipRgn = 38,
  297.  kSelectVDClearClipRgn = 39,
  298.  kSelectVDGetCLUTInUse = 40
  299. };
  300. enum {
  301.  kSelectVDSetPLLFilterType = 41,
  302.  kSelectVDGetPLLFilterType = 42,
  303.  kSelectVDGetMaskandValue = 43,
  304.  kSelectVDSetMasterBlendLevel = 44,
  305.  kSelectVDSetPlayThruDestination = 45,
  306.  kSelectVDSetPlayThruOnOff = 46,
  307.  kSelectVDSetFieldPreference = 47,
  308.  kSelectVDGetFieldPreference = 48,
  309.  
  310. /* 1 available selectors here */
  311.  
  312.  kSelectVDPreflightDestination = 50,
  313.  kSelectVDPreflightGlobalRect = 51,
  314.  kSelectVDSetPlayThruGlobalRect = 52,
  315.  kSelectVDSetInputGammaRecord = 53,
  316.  kSelectVDGetInputGammaRecord = 54,
  317.  kSelectVDSetBlackLevelValue = 55,
  318.  kSelectVDGetBlackLevelValue = 56,
  319.  kSelectVDSetWhiteLevelValue = 57,
  320.  kSelectVDGetWhiteLevelValue = 58,
  321.  kSelectVDGetVideoDefaults = 59,
  322.  kSelectVDGetNumberOfInputs = 60
  323. };
  324. enum {
  325.  kSelectVDGetInputFormat = 61,
  326.  kSelectVDSetInput = 62,
  327.  kSelectVDGetInput = 63,
  328.  kSelectVDSetInputStandard = 64,
  329.  kSelectVDSetupBuffers = 65,
  330.  kSelectVDGrabOneFrameAsync = 66,
  331.  kSelectVDDone = 67,
  332.  
  333.  kvdigSelectors = 67
  334. };
  335.  
  336. #ifdef __cplusplus
  337. extern "C" {
  338. #endif
  339. pascal VideoDigitizerError VDGetMaxSrcRect(VideoDigitizerComponent ci,short inputStd,
  340.  Rect *maxSrcRect)
  341.  = {0x2F3C,0x6,0x1,0x7000,0xA82A}; 
  342. pascal VideoDigitizerError VDGetActiveSrcRect(VideoDigitizerComponent ci,short inputStd,
  343.  Rect *activeSrcRect)
  344.  = {0x2F3C,0x6,0x2,0x7000,0xA82A}; 
  345. pascal VideoDigitizerError VDSetDigitizerRect(VideoDigitizerComponent ci,Rect *digitizerRect)
  346.  = {0x2F3C,0x4,0x3,0x7000,0xA82A}; 
  347. pascal VideoDigitizerError VDGetDigitizerRect(VideoDigitizerComponent ci,Rect *digitizerRect)
  348.  = {0x2F3C,0x4,0x4,0x7000,0xA82A}; 
  349. pascal VideoDigitizerError VDGetVBlankRect(VideoDigitizerComponent ci,short inputStd,
  350.  Rect *vBlankRect)
  351.  = {0x2F3C,0x6,0x5,0x7000,0xA82A}; 
  352. pascal VideoDigitizerError VDGetMaskPixMap(VideoDigitizerComponent ci,PixMapHandle maskPixMap)
  353.  = {0x2F3C,0x4,0x6,0x7000,0xA82A}; 
  354. pascal VideoDigitizerError VDGetPlayThruDestination(VideoDigitizerComponent ci,
  355.  PixMapHandle *dest,Rect *destRect,MatrixRecord *m,RgnHandle *mask)
  356.  = {0x2F3C,0x10,0x8,0x7000,0xA82A}; 
  357. pascal VideoDigitizerError VDUseThisCLUT(VideoDigitizerComponent ci,CTabHandle colorTableHandle)
  358.  = {0x2F3C,0x4,0x9,0x7000,0xA82A}; 
  359. pascal VideoDigitizerError VDSetInputGammaValue(VideoDigitizerComponent ci,
  360.  Fixed channel1,Fixed channel2,Fixed channel3)
  361.  = {0x2F3C,0xC,0xA,0x7000,0xA82A}; 
  362. pascal VideoDigitizerError VDGetInputGammaValue(VideoDigitizerComponent ci,
  363.  Fixed *channel1,Fixed *channel2,Fixed *channel3)
  364.  = {0x2F3C,0xC,0xB,0x7000,0xA82A}; 
  365. pascal VideoDigitizerError VDSetBrightness(VideoDigitizerComponent ci,unsigned short *brightness)
  366.  = {0x2F3C,0x4,0xC,0x7000,0xA82A}; 
  367. pascal VideoDigitizerError VDGetBrightness(VideoDigitizerComponent ci,unsigned short *brightness)
  368.  = {0x2F3C,0x4,0xD,0x7000,0xA82A}; 
  369. pascal VideoDigitizerError VDSetContrast(VideoDigitizerComponent ci,unsigned short *contrast)
  370.  = {0x2F3C,0x4,0xE,0x7000,0xA82A}; 
  371. pascal VideoDigitizerError VDSetHue(VideoDigitizerComponent ci,unsigned short *hue)
  372.  = {0x2F3C,0x4,0xF,0x7000,0xA82A}; 
  373. pascal VideoDigitizerError VDSetSharpness(VideoDigitizerComponent ci,unsigned short *sharpness)
  374.  = {0x2F3C,0x4,0x10,0x7000,0xA82A}; 
  375. pascal VideoDigitizerError VDSetSaturation(VideoDigitizerComponent ci,unsigned short *saturation)
  376.  = {0x2F3C,0x4,0x11,0x7000,0xA82A}; 
  377. pascal VideoDigitizerError VDGetContrast(VideoDigitizerComponent ci,unsigned short *contrast)
  378.  = {0x2F3C,0x4,0x12,0x7000,0xA82A}; 
  379. pascal VideoDigitizerError VDGetHue(VideoDigitizerComponent ci,unsigned short *hue)
  380.  = {0x2F3C,0x4,0x13,0x7000,0xA82A}; 
  381. pascal VideoDigitizerError VDGetSharpness(VideoDigitizerComponent ci,unsigned short *sharpness)
  382.  = {0x2F3C,0x4,0x14,0x7000,0xA82A}; 
  383. pascal VideoDigitizerError VDGetSaturation(VideoDigitizerComponent ci,unsigned short *saturation)
  384.  = {0x2F3C,0x4,0x15,0x7000,0xA82A}; 
  385. pascal VideoDigitizerError VDGrabOneFrame(VideoDigitizerComponent ci)
  386.  = {0x2F3C,0x0,0x16,0x7000,0xA82A}; 
  387. pascal VideoDigitizerError VDGetMaxAuxBuffer(VideoDigitizerComponent ci,PixMapHandle *pm,
  388.  Rect *r)
  389.  = {0x2F3C,0x8,0x17,0x7000,0xA82A}; 
  390. pascal VideoDigitizerError VDGetDigitizerInfo(VideoDigitizerComponent ci,DigitizerInfo *info)
  391.  = {0x2F3C,0x4,0x19,0x7000,0xA82A}; 
  392. pascal VideoDigitizerError VDGetCurrentFlags(VideoDigitizerComponent ci,long *inputCurrentFlag,
  393.  long *outputCurrentFlag)
  394.  = {0x2F3C,0x8,0x1A,0x7000,0xA82A}; 
  395. pascal VideoDigitizerError VDSetKeyColor(VideoDigitizerComponent ci,long index)
  396.  = {0x2F3C,0x4,0x1B,0x7000,0xA82A}; 
  397. pascal VideoDigitizerError VDGetKeyColor(VideoDigitizerComponent ci,long *index)
  398.  = {0x2F3C,0x4,0x1C,0x7000,0xA82A}; 
  399. pascal VideoDigitizerError VDAddKeyColor(VideoDigitizerComponent ci,long *index)
  400.  = {0x2F3C,0x4,0x1D,0x7000,0xA82A}; 
  401. pascal VideoDigitizerError VDGetNextKeyColor(VideoDigitizerComponent ci,long index)
  402.  = {0x2F3C,0x4,0x1E,0x7000,0xA82A}; 
  403. pascal VideoDigitizerError VDSetKeyColorRange(VideoDigitizerComponent ci,RGBColor *minRGB,
  404.  RGBColor *maxRGB)
  405.  = {0x2F3C,0x8,0x1F,0x7000,0xA82A}; 
  406. pascal VideoDigitizerError VDGetKeyColorRange(VideoDigitizerComponent ci,RGBColor *minRGB,
  407.  RGBColor *maxRGB)
  408.  = {0x2F3C,0x8,0x20,0x7000,0xA82A}; 
  409. pascal VideoDigitizerError    VDSetDigitizerUserInterrupt(VideoDigitizerComponent ci,
  410.  long flags, VdigIntProc userInterruptProc, long refcon)
  411.  = {0x2F3C,0xC,0x21,0x7000,0xA82A}; 
  412. pascal VideoDigitizerError VDSetInputColorSpaceMode(VideoDigitizerComponent ci,
  413.  short colorSpaceMode)
  414.  = {0x2F3C,0x2,0x22,0x7000,0xA82A}; 
  415. pascal VideoDigitizerError VDGetInputColorSpaceMode(VideoDigitizerComponent ci,
  416.  short *colorSpaceMode)
  417.  = {0x2F3C,0x4,0x23,0x7000,0xA82A}; 
  418. pascal VideoDigitizerError VDSetClipState(VideoDigitizerComponent ci,short clipEnable)
  419.  = {0x2F3C,0x2,0x24,0x7000,0xA82A}; 
  420. pascal VideoDigitizerError VDGetClipState(VideoDigitizerComponent ci,short *clipEnable)
  421.  = {0x2F3C,0x4,0x25,0x7000,0xA82A}; 
  422. pascal VideoDigitizerError VDSetClipRgn(VideoDigitizerComponent ci,RgnHandle clipRegion)
  423.  = {0x2F3C,0x4,0x26,0x7000,0xA82A}; 
  424. pascal VideoDigitizerError VDClearClipRgn(VideoDigitizerComponent ci,RgnHandle clipRegion)
  425.  = {0x2F3C,0x4,0x27,0x7000,0xA82A}; 
  426. pascal VideoDigitizerError VDGetCLUTInUse(VideoDigitizerComponent ci,CTabHandle *colorTableHandle)
  427.  = {0x2F3C,0x4,0x28,0x7000,0xA82A}; 
  428. pascal VideoDigitizerError VDSetPLLFilterType(VideoDigitizerComponent ci,short pllType)
  429.  = {0x2F3C,0x2,0x29,0x7000,0xA82A}; 
  430. pascal VideoDigitizerError VDGetPLLFilterType(VideoDigitizerComponent ci,short *pllType)
  431.  = {0x2F3C,0x4,0x2A,0x7000,0xA82A}; 
  432. pascal VideoDigitizerError VDGetMaskandValue(VideoDigitizerComponent ci,unsigned short blendLevel,
  433.  long *mask,long *value)
  434.  = {0x2F3C,0xA,0x2B,0x7000,0xA82A}; 
  435. pascal VideoDigitizerError VDSetMasterBlendLevel(VideoDigitizerComponent ci,
  436.  unsigned short *blendLevel)
  437.  = {0x2F3C,0x4,0x2C,0x7000,0xA82A}; 
  438. pascal VideoDigitizerError VDSetPlayThruDestination(VideoDigitizerComponent ci,
  439.  PixMapHandle dest,Rect *destRect,MatrixRecord *m,RgnHandle mask)
  440.  = {0x2F3C,0x10,0x2D,0x7000,0xA82A}; 
  441. pascal VideoDigitizerError VDSetPlayThruOnOff(VideoDigitizerComponent ci,short state)
  442.  = {0x2F3C,0x2,0x2E,0x7000,0xA82A}; 
  443. pascal VideoDigitizerError VDSetFieldPreference(VideoDigitizerComponent ci,short fieldFlag)
  444.  = {0x2F3C,0x2,0x2F,0x7000,0xA82A}; 
  445. pascal VideoDigitizerError VDGetFieldPreference(VideoDigitizerComponent ci,short *fieldFlag)
  446.  = {0x2F3C,0x4,0x30,0x7000,0xA82A}; 
  447.  
  448. /* 1 available selectors here */
  449.  
  450. pascal VideoDigitizerError VDPreflightDestination(VideoDigitizerComponent ci,
  451.  Rect *digitizerRect,PixMapHandle dest,Rect *destRect,MatrixRecord *m)
  452.  = {0x2F3C,0x10,0x32,0x7000,0xA82A}; 
  453. pascal VideoDigitizerError VDPreflightGlobalRect(VideoDigitizerComponent ci,
  454.  GrafPtr theWindow,Rect *globalRect)
  455.  = {0x2F3C,0x8,0x33,0x7000,0xA82A}; 
  456. pascal VideoDigitizerError VDSetPlayThruGlobalRect(VideoDigitizerComponent ci,
  457.  GrafPtr theWindow,Rect *globalRect)
  458.  = {0x2F3C,0x8,0x34,0x7000,0xA82A}; 
  459. pascal VideoDigitizerError VDSetInputGammaRecord(VideoDigitizerComponent ci,
  460.  VDGamRecPtr inputGammaPtr)
  461.  = {0x2F3C,0x4,0x35,0x7000,0xA82A}; 
  462. pascal VideoDigitizerError VDGetInputGammaRecord(VideoDigitizerComponent ci,
  463.  VDGamRecPtr *inputGammaPtr)
  464.  = {0x2F3C,0x4,0x36,0x7000,0xA82A}; 
  465. pascal VideoDigitizerError VDSetBlackLevelValue(VideoDigitizerComponent ci,
  466.  unsigned short *blackLevel)
  467.  = {0x2F3C,0x4,0x37,0x7000,0xA82A}; 
  468. pascal VideoDigitizerError VDGetBlackLevelValue(VideoDigitizerComponent ci,
  469.  unsigned short *blackLevel)
  470.  = {0x2F3C,0x4,0x38,0x7000,0xA82A}; 
  471. pascal VideoDigitizerError VDSetWhiteLevelValue(VideoDigitizerComponent ci,
  472.  unsigned short *whiteLevel)
  473.  = {0x2F3C,0x4,0x39,0x7000,0xA82A}; 
  474. pascal VideoDigitizerError VDGetWhiteLevelValue(VideoDigitizerComponent ci,
  475.  unsigned short *whiteLevel)
  476.  = {0x2F3C,0x4,0x3A,0x7000,0xA82A}; 
  477. pascal VideoDigitizerError VDGetVideoDefaults(VideoDigitizerComponent ci,unsigned short *blackLevel,
  478.  unsigned short *whiteLevel,unsigned short *brightness,unsigned short *hue,
  479.  unsigned short *saturation,unsigned short *contrast,unsigned short *sharpness)
  480.  = {0x2F3C,0x1C,0x3B,0x7000,0xA82A}; 
  481. pascal VideoDigitizerError VDGetNumberOfInputs(VideoDigitizerComponent ci,short *inputs)
  482.  = {0x2F3C,0x4,0x3C,0x7000,0xA82A}; 
  483. pascal VideoDigitizerError VDGetInputFormat(VideoDigitizerComponent ci,short input,
  484.  short *format)
  485.  = {0x2F3C,0x6,0x3D,0x7000,0xA82A}; 
  486. pascal VideoDigitizerError VDSetInput(VideoDigitizerComponent ci,short input)
  487.  = {0x2F3C,0x2,0x3E,0x7000,0xA82A}; 
  488. pascal VideoDigitizerError VDGetInput(VideoDigitizerComponent ci,short *input)
  489.  = {0x2F3C,0x4,0x3F,0x7000,0xA82A}; 
  490. pascal VideoDigitizerError VDSetInputStandard(VideoDigitizerComponent ci,short inputStandard)
  491.  = {0x2F3C,0x2,0x40,0x7000,0xA82A}; 
  492. pascal VideoDigitizerError    VDSetupBuffers(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList)
  493.  = {0x2F3C,0x4,0x41,0x7000,0xA82A}; 
  494. pascal VideoDigitizerError    VDGrabOneFrameAsync(VideoDigitizerComponent ci, short buffer)
  495.  = {0x2F3C,0x2,0x42,0x7000,0xA82A}; 
  496. pascal long    VDDone(VideoDigitizerComponent ci, short buffer)
  497.  = {0x2F3C,0x2,0x43,0x7000,0xA82A}; 
  498. #ifdef __cplusplus
  499. }
  500. #endif
  501. /* Sequence Grab Component */
  502. typedef ComponentInstance SeqGrabComponent;
  503. typedef ComponentInstance SGChannel;
  504.  
  505.  
  506.  
  507.  
  508. #define SeqGrabComponentType 'barg'
  509. #define SeqGrabChannelType 'sgch'
  510.  
  511. #define grabPictOffScreen (1)
  512. #define sgFlagControlledGrab (1)
  513.  
  514. #define channelPlayNormal 0
  515. #define channelPlayFast 1
  516. #define channelPlayHighQuality 2
  517. #define channelPlayAllData 4
  518.  
  519. enum {seqGrabToDisk = 1,seqGrabToMemory = 2,seqGrabDontUseTempMemory = 4,
  520.  seqGrabAppendToFile = 8,seqGrabDontAddMovieResource = 16};
  521. typedef unsigned char SeqGrabDataOutputEnum;
  522.  
  523. enum {seqGrabRecord = 1,seqGrabPreview = 2,seqGrabPlayDuringRecord = 4};
  524. typedef unsigned char SeqGrabUsageEnum;
  525.  
  526. enum {seqGrabHasBounds = 1,seqGrabHasVolume = 2, seqGrabHasDiscreteSamples = 4};
  527. typedef unsigned char SeqGrabChannelInfoEnum;
  528.  
  529.  
  530. struct SeqGrabFrameInfo {
  531.  long frameOffset;
  532.  long frameTime;
  533.  long frameSize;
  534.  SGChannel frameChannel;
  535.  long frameRefCon;
  536. };
  537.  
  538. enum {
  539.  noDeviceForChannel = -9400,
  540.  grabTimeComplete = -9401,
  541.  cantDoThatInCurrentMode = -9402,
  542.  notEnoughMemoryToGrab = -9403,
  543.  notEnoughDiskSpaceToGrab = -9404,
  544.  couldntGetRequiredComponent = -9405,
  545.  badSGChannel = -9406,
  546.  seqGrabInfoNotAvailable = -9407,
  547.  deviceCantMeetRequest = -9408
  548. };
  549.  
  550. typedef struct SeqGrabFrameInfo SeqGrabFrameInfo;
  551.  
  552.  
  553. #ifdef __cplusplus
  554. extern "C" {
  555. #endif
  556. pascal ComponentResult SGInitialize(SeqGrabComponent s)
  557.  = {0x2F3C,0x0,0x1,0x7000,0xA82A}; 
  558.  
  559. pascal ComponentResult SGSetDataOutput(SeqGrabComponent s,FSSpec *movieFile,
  560.  long whereFlags)
  561.  = {0x2F3C,0x8,0x2,0x7000,0xA82A}; 
  562. pascal ComponentResult SGGetDataOutput(SeqGrabComponent s,FSSpec *movieFile,
  563.  long *whereFlags)
  564.  = {0x2F3C,0x8,0x3,0x7000,0xA82A}; 
  565.  
  566. pascal ComponentResult SGSetGWorld(SeqGrabComponent s,CGrafPtr gp,GDHandle gd)
  567.  = {0x2F3C,0x8,0x4,0x7000,0xA82A}; 
  568. pascal ComponentResult SGGetGWorld(SeqGrabComponent s,CGrafPtr *gp,GDHandle *gd)
  569.  = {0x2F3C,0x8,0x5,0x7000,0xA82A}; 
  570.  
  571. pascal ComponentResult SGNewChannel(SeqGrabComponent s,OSType channelType,
  572.  SGChannel *ref)
  573.  = {0x2F3C,0x8,0x6,0x7000,0xA82A}; 
  574. pascal ComponentResult SGDisposeChannel(SeqGrabComponent s,SGChannel c)
  575.  = {0x2F3C,0x4,0x7,0x7000,0xA82A}; 
  576.  
  577. pascal ComponentResult SGStartPreview(SeqGrabComponent s)
  578.  = {0x2F3C,0x0,0x10,0x7000,0xA82A}; 
  579. pascal ComponentResult SGStartRecord(SeqGrabComponent s)
  580.  = {0x2F3C,0x0,0x11,0x7000,0xA82A}; 
  581. pascal ComponentResult SGIdle(SeqGrabComponent s)
  582.  = {0x2F3C,0x0,0x12,0x7000,0xA82A}; 
  583. pascal ComponentResult SGStop(SeqGrabComponent s)
  584.  = {0x2F3C,0x0,0x13,0x7000,0xA82A}; 
  585.  
  586. pascal ComponentResult SGPause(SeqGrabComponent s,Boolean pause)
  587.  = {0x2F3C,0x2,0x14,0x7000,0xA82A}; 
  588.  
  589. pascal ComponentResult SGPrepare(SeqGrabComponent s,Boolean prepareForPreview,
  590.  Boolean prepareForRecord)
  591.  = {0x2F3C,0x4,0x15,0x7000,0xA82A}; 
  592. pascal ComponentResult SGRelease(SeqGrabComponent s)
  593.  = {0x2F3C,0x0,0x16,0x7000,0xA82A}; 
  594.  
  595. pascal Movie SGGetMovie(SeqGrabComponent s)
  596.  = {0x2F3C,0x0,0x17,0x7000,0xA82A}; 
  597.  
  598. pascal ComponentResult SGSetMaximumRecordTime(SeqGrabComponent s,unsigned long ticks)
  599.  = {0x2F3C,0x4,0x18,0x7000,0xA82A}; 
  600. pascal ComponentResult SGGetMaximumRecordTime(SeqGrabComponent s,unsigned long *ticks)
  601.  = {0x2F3C,0x4,0x19,0x7000,0xA82A}; 
  602.  
  603. pascal ComponentResult SGGetStorageSpaceRemaining(SeqGrabComponent s,unsigned long *bytes)
  604.  = {0x2F3C,0x4,0x1A,0x7000,0xA82A}; 
  605. pascal ComponentResult SGGetTimeRemaining(SeqGrabComponent s,long *ticksLeft)
  606.  = {0x2F3C,0x4,0x1B,0x7000,0xA82A}; 
  607. pascal ComponentResult SGGrabPict(SeqGrabComponent s, PicHandle *p, const Rect *bounds,
  608.  short offscreenDepth, long grabPictFlags) =
  609.  {0x2F3C,0xE,0x1C,0x7000,0xA82A};
  610.  
  611. pascal ComponentResult SGGetLastMovieResID(SeqGrabComponent s, short *resID) =
  612.  {0x2F3C,0x4,0x1D,0x7000,0xA82A};
  613.  
  614. pascal ComponentResult SGSetFlags(SeqGrabComponent s, long sgFlags) =
  615.  {0x2F3C,0x4,0x1E,0x7000,0xA82A};
  616.  
  617. pascal ComponentResult SGGetFlags(SeqGrabComponent s, long *sgFlags) =
  618.  {0x2F3C,0x4,0x1F,0x7000,0xA82A};
  619.  
  620.  
  621. /*   General Channel Routines   */
  622. pascal ComponentResult SGSetChannelUsage(SGChannel c,long usage)
  623.  = {0x2F3C,0x4,0x80,0x7000,0xA82A}; 
  624. pascal ComponentResult SGGetChannelUsage(SGChannel c,long *usage)
  625.  = {0x2F3C,0x4,0x81,0x7000,0xA82A}; 
  626.  
  627. pascal ComponentResult SGSetChannelBounds(SGChannel c,Rect *bounds)
  628.  = {0x2F3C,0x4,0x82,0x7000,0xA82A}; 
  629. pascal ComponentResult SGGetChannelBounds(SGChannel c,const Rect *bounds)
  630.  = {0x2F3C,0x4,0x83,0x7000,0xA82A}; 
  631.  
  632. pascal ComponentResult SGSetChannelVolume(SGChannel c,short volume)
  633.  = {0x2F3C,0x2,0x84,0x7000,0xA82A}; 
  634. pascal ComponentResult SGGetChannelVolume(SGChannel c,short *volume)
  635.  = {0x2F3C,0x4,0x85,0x7000,0xA82A}; 
  636.  
  637. pascal ComponentResult SGGetChannelInfo(SGChannel c,long *channelInfo)
  638.  = {0x2F3C,0x4,0x86,0x7000,0xA82A}; 
  639.  
  640. pascal ComponentResult SGSetChannelPlayFlags(SGChannel c, long playFlags)
  641.  = {0x2F3C,0x4,0x87,0x7000,0xA82A}; 
  642. pascal ComponentResult SGGetChannelPlayFlags(SGChannel c, long *playFlags)
  643.  = {0x2F3C,0x4,0x88,0x7000,0xA82A}; 
  644.  
  645. pascal ComponentResult SGSetChannelMaxFrames(SGChannel c, long frameCount)
  646.  = {0x2F3C,0x4,0x89,0x7000,0xA82A}; 
  647. pascal ComponentResult SGGetChannelMaxFrames(SGChannel c, long *frameCount)
  648.  = {0x2F3C,0x4,0x8A,0x7000,0xA82A}; 
  649.  
  650. pascal ComponentResult SGSetChannelRefCon(SGChannel c, long refCon)
  651.  = {0x2F3C,0x4,0x8B,0x7000,0xA82A}; 
  652.  
  653. #ifdef __cplusplus
  654. }
  655. #endif
  656. /* Video Routines */
  657.  
  658. struct SGCompressInfo {
  659.     Ptr                buffer;
  660.     unsigned long    bufferSize;
  661.     unsigned char    similarity;
  662.     unsigned char    reserved;
  663. };
  664. typedef struct SGCompressInfo SGCompressInfo;
  665.  
  666. typedef pascal ComponentResult (*GrabProc)(SGChannel c, short bufferNum, long refCon);
  667. typedef pascal ComponentResult (*GrabCompleteProc)(SGChannel c, short bufferNum, Boolean *done, long refCon);
  668. typedef pascal ComponentResult (*DisplayProc)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  669. typedef pascal ComponentResult (*CompressProc)(SGChannel c, short bufferNum, long refCon);
  670. typedef pascal ComponentResult (*CompressCompleteProc)(SGChannel c, short bufferNum,
  671.                                         Boolean *done, SGCompressInfo *ci, long refCon);
  672. typedef pascal ComponentResult (*AddFrameProc)(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale,
  673.                             const SGCompressInfo *ci, long refCon);
  674. typedef pascal ComponentResult (*TransferFrameProc)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  675.  
  676. struct VideoBottles {
  677.  short procCount;
  678.  GrabProc grabProc;
  679.  GrabCompleteProc grabCompleteProc;
  680.  DisplayProc displayProc;
  681.  CompressProc compressProc;
  682.  CompressCompleteProc compressCompleteProc;
  683.  AddFrameProc addFrameProc;
  684.  TransferFrameProc transferFrameProc;
  685. };
  686.  
  687. typedef struct VideoBottles VideoBottles;
  688.  
  689.  
  690. #ifdef __cplusplus
  691. extern "C" {
  692. #endif
  693. pascal ComponentResult SGGetSrcVideoBounds(SGChannel c,Rect *r)
  694.  = {0x2F3C,0x4,0x100,0x7000,0xA82A}; 
  695. pascal ComponentResult SGSetVideoRect(SGChannel c,Rect *r)
  696.  = {0x2F3C,0x4,0x101,0x7000,0xA82A}; 
  697. pascal ComponentResult SGGetVideoRect(SGChannel c,Rect *r)
  698.  = {0x2F3C,0x4,0x102,0x7000,0xA82A}; 
  699.  
  700. pascal ComponentResult SGGetVideoCompressorType(SGChannel c,OSType *compressorType)
  701.  = {0x2F3C,0x4,0x103,0x7000,0xA82A}; 
  702. pascal ComponentResult SGSetVideoCompressorType(SGChannel c,OSType compressorType)
  703.  = {0x2F3C,0x4,0x104,0x7000,0xA82A}; 
  704.  
  705. pascal ComponentResult SGSetVideoCompressor(SGChannel c,short depth,CompressorComponent compressor,
  706.  CodecQ spatialQuality,CodecQ temporalQuality,long keyFrameRate)
  707.  = {0x2F3C,0x12,0x105,0x7000,0xA82A}; 
  708. pascal ComponentResult SGGetVideoCompressor(SGChannel c,short *depth,CompressorComponent *compressor,
  709.  CodecQ *spatialQuality,CodecQ *temporalQuality,long *keyFrameRate)
  710.  = {0x2F3C,0x14,0x106,0x7000,0xA82A}; 
  711.  
  712. pascal ComponentInstance SGGetVideoDigitizerComponent(SGChannel c) 
  713.  = {0x2F3C,0,263,0x7000,0xA82A};
  714. pascal ComponentResult SGSetVideoDigitizerComponent(SGChannel c, ComponentInstance vdig)
  715.  = {0x2F3C,4,264,0x7000,0xA82A};
  716. pascal ComponentResult SGVideoDigitizerChanged(SGChannel c)
  717.  = {0x2F3C,0,265,0x7000,0xA82A};
  718.  
  719. pascal ComponentResult SGSetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  720.  = {0x2F3C,4,266,0x7000,0xA82A};
  721. pascal ComponentResult SGGetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  722.  = {0x2F3C,4,267,0x7000,0xA82A};
  723.  
  724. pascal ComponentResult SGGrabFrame(SGChannel c, short bufferNum)
  725.  = {0x2F3C,2,268,0x7000,0xA82A};
  726. pascal ComponentResult SGGrabFrameComplete(SGChannel c, short bufferNum, Boolean *done)
  727.  = {0x2F3C,6,269,0x7000,0xA82A};
  728.  
  729. pascal ComponentResult SGDisplayFrame(SGChannel c, short bufferNum, MatrixRecord *mp, 
  730.  RgnHandle clipRgn)
  731.  = {0x2F3C,10,270,0x7000,0xA82A};
  732.  
  733. pascal ComponentResult SGCompressFrame(SGChannel c, short bufferNum)
  734.  = {0x2F3C,2,271,0x7000,0xA82A};
  735. pascal ComponentResult SGCompressFrameComplete(SGChannel c, short bufferNum, 
  736.  Boolean *done, SGCompressInfo *ci)
  737.  = {0x2F3C,10,272,0x7000,0xA82A};
  738.  
  739. pascal ComponentResult SGAddFrame(SGChannel c, short bufferNum, TimeValue atTime, 
  740.  TimeScale scale, const SGCompressInfo *ci)
  741.  = {0x2F3C,14,273,0x7000,0xA82A};
  742.  
  743. pascal ComponentResult SGTransferFrameForCompress(SGChannel c, short bufferNum, 
  744.  MatrixRecord *mp, RgnHandle clipRgn)
  745.  = {0x2F3C,10,274,0x7000,0xA82A};
  746.  
  747. pascal ComponentResult SGSetCompressBuffer(SGChannel c, short depth, const Rect *compressSize)
  748.  = {0x2F3C,6,275,0x7000,0xA82A};
  749.  
  750. pascal ComponentResult SGGetCompressBuffer(SGChannel c, short *depth, Rect *compressSize)
  751.  = {0x2F3C,8,276,0x7000,0xA82A};
  752.  
  753. pascal ComponentResult SGGetBufferInfo(SGChannel c, short bufferNum, 
  754.  PixMapHandle *bufferPM, Rect *bufferRect,GWorldPtr *compressBuffer,
  755.  Rect *compressBufferRect) 
  756.  = {0x2F3C,18,277,0x7000,0xA82A};
  757.  
  758. /*   Sound Routines   */
  759. pascal ComponentResult SGSetSoundInputDriver(SGChannel c,const Str255 driverName)
  760.  = {0x2F3C,0x4,0x100,0x7000,0xA82A}; 
  761. pascal long SGGetSoundInputDriver(SGChannel c)
  762.  = {0x2F3C,0x0,0x101,0x7000,0xA82A}; 
  763. pascal ComponentResult SGSoundInputDriverChanged(SGChannel c)
  764.  = {0x2F3C,0x0,0x102,0x7000,0xA82A}; 
  765.  
  766. pascal ComponentResult SGSetSoundRecordChunkSize(SGChannel c,long seconds)
  767.  = {0x2F3C,0x4,0x103,0x7000,0xA82A}; 
  768. pascal long SGGetSoundRecordChunkSize(SGChannel c)
  769.  = {0x2F3C,0x0,0x104,0x7000,0xA82A}; 
  770.  
  771. pascal ComponentResult SGSetSoundInputRate(SGChannel c,Fixed rate)
  772.  = {0x2F3C,0x4,0x105,0x7000,0xA82A}; 
  773. pascal Fixed SGGetSoundInputRate(SGChannel c)
  774.  = {0x2F3C,0x0,0x106,0x7000,0xA82A}; 
  775.  
  776. /*   calls from seqGrab to Channel   */
  777. pascal ComponentResult SGInitChannel(SGChannel c,SeqGrabComponent owner)
  778.  = {0x2F3C,0x4,0x180,0x7000,0xA82A}; 
  779. pascal ComponentResult SGWriteSamples(SGChannel c,Movie m,AliasHandle theFile)
  780.  = {0x2F3C,0x8,0x181,0x7000,0xA82A}; 
  781. pascal ComponentResult SGGetDataRate(SGChannel c,long *bytesPerSecond)
  782.  = {0x2F3C,0x4,0x182,0x7000,0xA82A}; 
  783.  
  784. /*   calls from Channel to seqGrab   */
  785. pascal ComponentResult SGWriteMovieData(SeqGrabComponent s,SGChannel c,
  786.  Ptr p,long len,long *offset)
  787.  = {0x2F3C,0x10,0x100,0x7000,0xA82A}; 
  788. pascal ComponentResult SGAddFrameReference(SeqGrabComponent s,SeqGrabFrameInfo *frameInfo)
  789.  = {0x2F3C,0x4,0x101,0x7000,0xA82A}; 
  790. pascal ComponentResult SGGetNextFrameReference(SeqGrabComponent s,SeqGrabFrameInfo *frameInfo,
  791.  TimeValue *frameDuration,long *frameNumber)
  792.  = {0x2F3C,0xC,0x102,0x7000,0xA82A}; 
  793. pascal ComponentResult SGGetTimeBase(SeqGrabComponent s,TimeBase *tb)
  794.  = {0x2F3C,0x4,0x103,0x7000,0xA82A}; 
  795. #ifdef __cplusplus
  796. }
  797. #endif
  798.  
  799. enum {
  800. kSGInitializeSelect = 0x1,
  801. kSGSetDataOutputSelect = 0x2,
  802. kSGGetDataOutputSelect = 0x3,
  803. kSGSetGWorldSelect = 0x4,
  804. kSGGetGWorldSelect = 0x5,
  805. kSGNewChannelSelect = 0x6,
  806. kSGDisposeChannelSelect = 0x7,
  807. kSGStartPreviewSelect = 0x10,
  808. kSGStartRecordSelect = 0x11,
  809. kSGIdleSelect = 0x12,
  810. kSGStopSelect = 0x13,
  811. kSGPauseSelect = 0x14,
  812. kSGPrepareSelect = 0x15,
  813. kSGReleaseSelect = 0x16,
  814. kSGGetMovieSelect = 0x17,
  815. kSGSetMaximumRecordTimeSelect = 0x18,
  816. kSGGetMaximumRecordTimeSelect = 0x19,
  817. kSGGetStorageSpaceRemainingSelect = 0x1a,
  818. kSGGetTimeRemainingSelect = 0x1b,
  819. kSGGrabPictSelect = 0x1c,
  820. kSGGetLastMovieResIDSelect = 0x1d,
  821. kSGSetFlagsSelect = 0x1e,
  822. kSGGetFlagsSelect = 0x1f,
  823.  
  824. kSGCSetChannelUsageSelect = 0x80,
  825. kSGCGetChannelUsageSelect = 0x81,
  826. kSGCSetChannelBoundsSelect = 0x82,
  827. kSGCGetChannelBoundsSelect = 0x83,
  828. kSGCSetChannelVolumeSelect = 0x84,
  829. kSGCGetChannelVolumeSelect = 0x85,
  830. kSGCGetChannelInfoSelect = 0x86,
  831. kSGCSetChannelPlayFlagsSelect = 0x87,
  832. kSGCGetChannelPlayFlagsSelect = 0x88,
  833. kSGCSetChannelMaxFramesSelect = 0x89,
  834. kSGCGetChannelMaxFramesSelect = 0x8a,
  835. kSGCSetChannelRefConSelect = 0x8b,
  836.  
  837. kSGCGetSrcVideoBoundsSelect = 0x100,
  838. kSGCSetVideoRectSelect = 0x101,
  839. kSGCGetVideoRectSelect = 0x102,
  840. kSGCGetVideoCompressorTypeSelect = 0x103,
  841. kSGCSetVideoCompressorTypeSelect = 0x104,
  842. kSGCSetVideoCompressorSelect = 0x105,
  843. kSGCGetVideoCompressorSelect = 0x106,
  844. kSGCGetVideoDigitizerComponentSelect = 0x107,
  845. kSGCSetVideoDigitizerComponentSelect = 0x108,
  846. kSGCVideoDigitizerChangedSelect = 0x109,
  847. kSGCSetVideoBottlenecksSelect = 0x10a,
  848. kSGCGetVideoBottlenecksSelect = 0x10b,
  849. kSGCGrabFrameSelect = 0x10c,
  850. kSGCGrabFrameCompleteSelect = 0x10d,
  851. kSGCDisplayFrameSelect = 0x10e,
  852. kSGCCompressFrameSelect = 0x10f,
  853. kSGCCompressFrameCompleteSelect = 0x110,
  854. kSGCAddFrameSelect = 0x111,
  855. kSGCTransferFrameForCompressSelect = 0x112,
  856. kSGCSetCompressBufferSelect = 0x113,
  857. kSGCGetCompressBufferSelect = 0x114,
  858. kSGCGetBufferInfoSelect = 0x115,
  859.  
  860. kSGCSetSoundInputDriverSelect = 0x100,
  861. kSGCGetSoundInputDriverSelect = 0x101,
  862. kSGCSoundInputDriverChangedSelect = 0x102,
  863. kSGCSetSoundRecordChunkSizeSelect = 0x103,
  864. kSGCGetSoundRecordChunkSizeSelect = 0x104,
  865. kSGCSetSoundInputRateSelect = 0x105,
  866. kSGCGetSoundInputRateSelect = 0x106,
  867.  
  868. kSGCInitChannelSelect = 0x180,
  869. kSGCWriteSamplesSelect = 0x181,
  870. kSGCGetDataRateSelect = 0x182,
  871.  
  872. kSGWriteMovieDataSelect = 0x100,
  873. kSGAddFrameReferenceSelect = 0x101,
  874. kSGGetNextFrameReferenceSelect = 0x102,
  875. kSGGetTimeBaseSelect = 0x103
  876. };
  877.  
  878.  
  879.  
  880. struct SCParams {
  881.     long            flags;
  882.     CodecType        theCodecType;
  883.     CodecComponent    theCodec;
  884.     CodecQ            spatialQuality;
  885.     CodecQ            temporalQuality;
  886.     short            depth;
  887.     Fixed            frameRate;
  888.     long            keyFrameRate;
  889.     long            reserved1;
  890.     long            reserved2;
  891. };
  892. typedef struct SCParams SCParams;
  893.  
  894. typedef pascal Boolean (*SCModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit, long refcon);
  895. typedef pascal short (*SCModalHookProcPtr)(DialogPtr theDialog, short itemHit, SCParams *params, long refcon);
  896.  
  897.  
  898. enum {
  899. scShowMotionSettings = (1L<<0),
  900. scListEveryCodec = (1L<<1),
  901. scAllowZeroFrameRate = (1L<<2),
  902. scAllowZeroKeyFrameRate = (1L<<3),
  903. scShowBestDepth = (1L<<4),
  904.  
  905. scPreferCropping = (1<<0),
  906. scPreferScaling = (1<<1),
  907. scPreferScalingAndCropping = (scPreferScaling + scPreferCropping),
  908.  
  909. scTestImageWidth = 80,
  910. scTestImageHeight = 80,
  911.  
  912. scSettingsChangedItem = -1,
  913. scOKItem = 1,
  914. scCancelItem = 2,
  915. scCustomItem = 3
  916. };
  917.  
  918. #ifdef __cplusplus
  919. extern "C" {
  920. #endif
  921.  
  922. pascal ComponentInstance OpenStdCompression(void);
  923. pascal ComponentResult SCGetCompressionExtended(ComponentInstance ci,SCParams *params,Point where,
  924.  SCModalFilterProcPtr filterProc,SCModalHookProcPtr hookProc,long refcon,StringPtr customName)
  925.  = {0x2F3C,24,1,0x7000,0xA82A};
  926. pascal ComponentResult SCGetCompression(ComponentInstance ci,SCParams *params,Point where)
  927.  = {0x42A7,0x42A7,0x42A7,0x42A7,0x2F3C,24,1,0x7000,0xA82A};
  928. pascal ComponentResult SCPositionRect(ComponentInstance ci,Rect *rp,Point *where)
  929.  = {0x2F3C,8,2,0x7000,0xA82A};
  930. pascal ComponentResult SCPositionDialog(ComponentInstance ci,short id,Point *where)
  931.  = {0x2F3C,6,3,0x7000,0xA82A};
  932. pascal ComponentResult SCSetTestImagePictHandle(ComponentInstance ci, PicHandle testPict, Rect *testRect, short testFlags)
  933.  = {0x2F3C,10,4,0x7000,0xA82A};
  934. pascal ComponentResult SCSetTestImagePictFile(ComponentInstance ci, short testFileRef, Rect *testRect, short testFlags)
  935.  = {0x2F3C,8,5,0x7000,0xA82A};
  936. pascal ComponentResult SCSetTestImagePixMap(ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags)
  937.  = {0x2F3C,10,6,0x7000,0xA82A};
  938. pascal ComponentResult SCGetBestDeviceRect(ComponentInstance ci, Rect *r) 
  939.   = {0x2F3C,4,7,0x7000,0xA82A};
  940.  
  941. #ifdef __cplusplus
  942. }
  943. #endif
  944.  
  945.  
  946. #endif
  947.