home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 1 / BBS in a box - Trilogy I.iso / Files / QuickTime / QT Tools / QuickTime Interfacing / QuickTimeComponents.p < prev    next >
Encoding:
Text File  |  1992-10-20  |  40.1 KB  |  1,027 lines  |  [TEXT/MPS ]

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