home *** CD-ROM | disk | FTP | other *** search
-
- /************************************************************
-
- Created: Saturday, August 17, 1991 at 10:03 AM
- QuickTimeComponents.h
- C Interface to the Macintosh Libraries
-
-
- Copyright Apple Computer, Inc. 1991
- All rights reserved
-
- ************************************************************/
-
-
- #ifndef __QUICKTIMECOMPONENTS__
- #define __QUICKTIMECOMPONENTS__
-
- #ifndef __COMPONENTS__
- #include <Components.h>
- #endif
-
- #ifndef __IMAGECOMPRESSION__
- #include <ImageCompression.h>
- #endif
-
- #ifndef __MOVIES__
- #include <Movies.h>
- #endif
-
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
-
- #ifndef __VIDEO__
- #include <Video.h>
- #endif
-
-
- enum {
-
-
- /*****
-
- Clock Component
-
- *****/
-
- #define clockComponentType 'clok'
- #define systemTickClock 'tick' /* subtype: 60ths since boot */
- #define systemSecondClock 'seco' /* subtype: seconds since 1904 */
- #define systemMillisecondClock 'mill' /* subtype: 1000ths since boot */
- #define systemMicrosecondClock 'micr' /* subtype: 1000000ths since boot */
-
-
- kClockRateIsLinear = 1,
- kClockImplementsCallBacks = 2
-
- };
-
- enum {kClockGetClockTimeSelect = 1,kClockSetClockTimeSelect = 2,kClockNewCallBackSelect,
- kClockDisposeCallBackSelect,kClockCallMeWhenSelect,kClockCancelCallBackSelect,
- kClockRateChangedSelect,kClockTimeChangedSelect,kClockSetTimeBaseSelect};
- typedef unsigned ClockComponentSelectors;
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- pascal ComponentResult GetClockTime(ComponentInstance aClock,TimeRecord *out)
- = {0x2F3C,0x4,0x1,0x7000,0xA82A};
- pascal QTCallBack ClockNewCallBack(ComponentInstance aClock,TimeBase tb,
- short callBackType)
- = {0x2F3C,0x6,0x1,0x7000,0xA82A};
- pascal ComponentResult ClockDisposeCallBack(ComponentInstance aClock,QTCallBack cb)
- = {0x2F3C,0x4,0x1,0x7000,0xA82A};
- pascal ComponentResult ClockCallMeWhen(ComponentInstance clock,QTCallBack cb,
- long param1,long param2,long param3)
- = {0x2F3C,0x10,0x1,0x7000,0xA82A};
- pascal ComponentResult ClockCancelCallBack(ComponentInstance clock,QTCallBack cb)
- = {0x2F3C,0x4,0x1,0x7000,0xA82A};
- pascal ComponentResult ClockRateChanged(ComponentInstance clock,QTCallBack cb)
- = {0x2F3C,0x4,0x1,0x7000,0xA82A};
- pascal ComponentResult ClockTimeChanged(ComponentInstance clock,QTCallBack cb)
- = {0x2F3C,0x4,0x1,0x7000,0xA82A};
- pascal ComponentResult ClockSetTimeBase(ComponentInstance clock,TimeBase tb)
- = {0x2F3C,0x4,0x1,0x7000,0xA82A};
-
- #ifdef __cplusplus
- }
- #endif
- enum {
-
-
- /*
- Video Digitizer Component
-
-
- Standard type for video digitizers */
-
- #define videoDigitizerComponentType 'vdig'
- #define vdigInterfaceRev 2L
-
-
- /* Input Format Standards */
-
- ntscIn = 0, /* ntsc input format */
- palIn = 1, /* pal input format */
- secamIn = 2, /* secam input format */
- autoDetectIn = 3, /* auto detect */
-
-
- /* Input Formats */
- compositeIn = 0, /* input is composite format */
- sVideoIn = 1, /* input is sVideo format */
- rgbComponentIn = 2, /* input is rgb component format */
-
-
- /* Video Digitizer PlayThru States */
- vdPlayThruOff = 0,
- vdPlayThruOn = 1,
-
-
- /* Input Color Space Modes */
- vdDigitizerBW = 0, /* black and white */
- vdDigitizerRGB = 1, /* rgb color */
-
-
- /* Phase Lock Loop Modes */
- vdBroadcastMode = 0, /* Broadcast / Laser Disk video mode */
- vdVTRMode = 1, /* VCR / Magnetic media mode */
-
-
- /* vdig types */
- vdTypeBasic = 0, /* basic, no clipping */
- vdTypeAlpha = 1, /* supports clipping with alpha channel */
- vdTypeMask = 2, /* supports clipping with mask plane */
- vdTypeKey = 3 /* supports clipping with key color(s) */
-
-
- /* Digitizer Error Codes */
-
- #define digiUnimpErr -2201 /* feature unimplemented */
- #define qtParamErr -2202 /* bad input parameter ( out of range, etc ) */
- #define matrixErr -2203 /* bad matrix, digitizer did nothing */
- #define notExactMatrix -2204 /* warning of bad matrix, digitizer did its best */
- #define noMoreKeyColors -2205 /* all key indexes in use */
- #define notExactSize -2206 /* Can’t do exact size requested */
- #define badDepth -2207 /* Can’t digitize into this depth */
- #define noDMA -2208 /* Can’t do DMA digitizing ( i.e. can't go to requested dest */
-
-
- /* Digitizer Input Capability/Current Flags */
- #define digiInDoesNTSC (1L<<0) /* digitizer supports NTSC input format */
- #define digiInDoesPAL (1L<<1) /* digitizer supports PAL input format */
- #define digiInDoesSECAM (1L<<2) /* digitizer supports SECAM input format */
- #define digiInDoesGenLock (1L<<7) /* digitizer does genlock */
-
- #define digiInDoesComposite (1L<<8) /* digitizer supports composite input type */
- #define digiInDoesSVideo (1L<<9) /* digitizer supports S-Video input type */
- #define digiInDoesComponent (1L<<10) /* digitizer supports component (rgb) input type */
- #define digiInVTR_Broadcast (1L<<11) /* digitizer can differentiate between the two */
-
- #define digiInDoesColor (1L<<12) /* digitizer supports color */
- #define digiInDoesBW (1L<<13) /* digitizer supports black & white */
-
-
- /* Digitizer Input Current Flags (these are valid only during active operating conditions) */
- #define digiInGenLocked (1L<<30) /* digitizer signal is in genlock mode */
- #define digiInSignalLock (1L<<31) /* digitizer detects input signal is locked - this bit = horiz lock || vertical lock */
-
-
- /* Digitizer Output Capability/Current Flags */
- #define digiOutDoes1 (1L<<0) /* digitizer supports 1 bit pixels */
- #define digiOutDoes2 (1L<<1) /* digitizer supports 2 bit pixels */
- #define digiOutDoes4 (1L<<2) /* digitizer supports 4 bit pixels */
- #define digiOutDoes8 (1L<<3) /* digitizer supports 8 bit pixels */
- #define digiOutDoes16 (1L<<4) /* digitizer supports 16 bit pixels */
- #define digiOutDoes32 (1L<<5) /* digitizer supports 32 bit pixels */
- #define digiOutDoesDither (1L<<6) /* digitizer dithers in indexed modes */
- #define digiOutDoesStretch (1L<<7) /* digitizer can arbitrarily stretch */
- #define digiOutDoesShrink (1L<<8) /* digitizer can arbitrarily shrink */
- #define digiOutDoesMask (1L<<9) /* digitizer can mask to clipping regions */
-
- #define digiOutDoesDouble (1L<<11) /* digitizer can stretch to exactly double size */
- #define digiOutDoesQuad (1L<<12) /* digitizer can stretch exactly quadruple size */
- #define digiOutDoesQuarter (1L<<13) /* digitizer can shrink to exactly quarter size */
- #define digiOutDoesSixteenth (1L<<14) /* digitizer can shrink to exactly sixteenth size */
-
- #define digiOutDoesRotate (1L<<15) /* digitizer supports rotate transformations */
- #define digiOutDoesHorizFlip (1L<<16) /* digitizer supports horizontal flips Sx < 0 */
- #define digiOutDoesVertFlip (1L<<17) /* digitizer supports vertical flips Sy < 0 */
- #define digiOutDoesSkew (1L<<18) /* digitizer supports skew (shear, twist) */
- #define digiOutDoesBlend (1L<<19)
- #define digiOutDoesWarp (1L<<20)
-
- #define digiOutDoesHW_DMA (1L<<21) /* digitizer not constrained to local device */
- #define digiOutDoesHWPlayThru (1L<<22) /* digitizer doesn't need time to play thru */
- #define digiOutDoesILUT (1L<<23) /* digitizer does inverse LUT for index modes */
- #define digiOutDoesKeyColor (1L<<24) /* digitizer does key color functions too */
- #define digiOutDoesAsyncGrabs (1L<<25) /* digitizer supports async grabs */
- };
-
- typedef ComponentInstance VideoDigitizerThing;
- typedef ComponentResult VideoDigitizerError;
-
- /* Types */
- struct DigitizerInfo {
- short vdigType;
- long inputCapabilityFlags;
- long outputCapabilityFlags;
- long inputCurrentFlags;
- long outputCurrentFlags;
- short slot; /* temporary for connection purposes */
- GDHandle gdh; /* temporary for digitizers that have preferred screen */
- GDHandle maskgdh; /* temporary for digitizers that have mask planes */
- short minDestHeight; /* Smallest resizable height */
- short minDestWidth; /* Smallest resizable width */
- short maxDestHeight; /* Largest resizable height */
- short maxDestWidth; /* Largest resizable height */
- short blendLevels; /* Number of blend levels supported (2 if 1 bit mask) */
- long Private; /* reserved */
- };
-
- typedef struct DigitizerInfo DigitizerInfo;
-
- struct VdigType {
- long digType;
- long Private;
- };
-
- typedef struct VdigType VdigType;
-
- struct VdigTypeList {
- short count;
- VdigType list[1];
- };
-
- typedef struct VdigTypeList VdigTypeList;
- typedef VdigTypeList *VdigTypeListPtr, **VdigTypeListHandle;
-
- typedef struct {
- PixMapHandle dest;
- Point location;
- long reserved;
- } VdigBufferRec;
-
- struct VdigBufferRecList {
- short count;
- MatrixRecordPtr matrix;
- RgnHandle mask;
- VdigBufferRec list[1];
- };
-
- typedef struct VdigBufferRecList VdigBufferRecList;
- typedef VdigBufferRecList *VdigBufferRecListPtr, **VdigBufferRecListHandle;
-
- enum {
-
-
- /* Video Digitizer Interface */
- kSelectVDGetMaxSrcRect = 1,
- kSelectVDGetActiveSrcRect = 2,
- kSelectVDSetDigitizerRect = 3,
- kSelectVDGetDigitizerRect = 4,
- kSelectVDGetVBlankRect = 5,
- kSelectVDGetMaskPixMap = 6,
- kSelectVDDone = 7,
- kSelectVDGetPlayThruDestination = 8,
- kSelectVDUseThisCLUT = 9,
- kSelectVDSetInputGammaValue = 10,
- kSelectVDGetInputGammaValue = 11,
- kSelectVDSetBrightness = 12,
- kSelectVDGetBrightness = 13,
- kSelectVDSetContrast = 14,
- kSelectVDSetHue = 15,
- kSelectVDSetSharpness = 16,
- kSelectVDSetSaturation = 17,
- kSelectVDGetContrast = 18,
- kSelectVDGetHue = 19,
- kSelectVDGetSharpness = 20
- };
- enum {
- kSelectVDGetSaturation = 21,
- kSelectVDGrabOneFrame = 22,
- kSelectVDGetMaxAuxBuffer = 23,
- kSelectVDGrabOneFrameAsync = 24,
- kSelectVDGetDigitizerInfo = 25,
- kSelectVDGetCurrentFlags = 26,
- kSelectVDSetKeyColor = 27,
- kSelectVDGetKeyColor = 28,
- kSelectVDAddKeyColor = 29,
- kSelectVDGetNextKeyColor = 30,
- kSelectVDSetKeyColorRange = 31,
- kSelectVDGetKeyColorRange = 32,
- kSelectVDSetDigitizerUserInterrupt = 33,
- kSelectVDSetInputColorSpaceMode = 34,
- kSelectVDGetInputColorSpaceMode = 35,
- kSelectVDSetClipState = 36,
- kSelectVDGetClipState = 37,
- kSelectVDSetClipRgn = 38,
- kSelectVDClearClipRgn = 39,
- kSelectVDGetCLUTInUse = 40
- };
- enum {
- kSelectVDSetPLLFilterType = 41,
- kSelectVDGetPLLFilterType = 42,
- kSelectVDGetMaskandValue = 43,
- kSelectVDSetMasterBlendLevel = 44,
- kSelectVDSetPlayThruDestination = 45,
- kSelectVDSetPlayThruOnOff = 46,
- kSelectVDGetAltDataTypes = 47,
- kSelectVDSetAltDataDestination = 48,
- kSelectVDSetAltDataOnOff = 49,
- kSelectVDPreflightDestination = 50,
- kSelectVDPreflightGlobalRect = 51,
- kSelectVDSetPlayThruGlobalRect = 52,
- kSelectVDSetInputGammaRecord = 53,
- kSelectVDGetInputGammaRecord = 54,
- kSelectVDSetBlackLevelValue = 55,
- kSelectVDGetBlackLevelValue = 56,
- kSelectVDSetWhiteLevelValue = 57,
- kSelectVDGetWhiteLevelValue = 58,
- kSelectVDGetVideoDefaults = 59,
- kSelectVDGetNumberOfInputs = 60
- };
- enum {
- kSelectVDGetInputFormat = 61,
- kSelectVDSetInput = 62,
- kSelectVDGetInput = 63,
- kSelectVDSetInputStandard = 64,
- kSelectVDSetupBuffers = 65,
- kSelectVDGrabOneFrameAsync2 = 66,
- kSelectVDDone2 = 67,
-
- kvdigSelectors = 67
- };
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- pascal VideoDigitizerError VDGetMaxSrcRect(VideoDigitizerThing ti,short inputStd,
- Rect *maxSrcRect)
- = {0x2F3C,0x6,0x1,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetActiveSrcRect(VideoDigitizerThing ti,short inputStd,
- Rect *activeSrcRect)
- = {0x2F3C,0x6,0x2,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetDigitizerRect(VideoDigitizerThing ti,Rect *digitizerRect)
- = {0x2F3C,0x4,0x3,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetDigitizerRect(VideoDigitizerThing ti,Rect *digitizerRect)
- = {0x2F3C,0x4,0x4,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetVBlankRect(VideoDigitizerThing ti,short inputStd,
- Rect *vBlankRect)
- = {0x2F3C,0x6,0x5,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetMaskPixMap(VideoDigitizerThing ti,PixMapHandle maskPixMap)
- = {0x2F3C,0x4,0x6,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetPlayThruDestination(VideoDigitizerThing ti,
- PixMapHandle *dest,Rect *destRect,MatrixRecord *m,RgnHandle *mask)
- = {0x2F3C,0x10,0x8,0x7000,0xA82A};
- pascal VideoDigitizerError VDUseThisCLUT(VideoDigitizerThing ti,CTabHandle colorTableHandle)
- = {0x2F3C,0x4,0x9,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetInputGammaValue(VideoDigitizerThing ti,
- Fixed channel1,Fixed channel2,Fixed channel3)
- = {0x2F3C,0xC,0xA,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetInputGammaValue(VideoDigitizerThing ti,
- Fixed *channel1,Fixed *channel2,Fixed *channel3)
- = {0x2F3C,0xC,0xB,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetBrightness(VideoDigitizerThing ti,unsigned short *brightness)
- = {0x2F3C,0x4,0xC,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetBrightness(VideoDigitizerThing ti,unsigned short *brightness)
- = {0x2F3C,0x4,0xD,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetContrast(VideoDigitizerThing ti,unsigned short *contrast)
- = {0x2F3C,0x4,0xE,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetHue(VideoDigitizerThing ti,unsigned short *hue)
- = {0x2F3C,0x4,0xF,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetSharpness(VideoDigitizerThing ti,unsigned short *sharpness)
- = {0x2F3C,0x4,0x10,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetSaturation(VideoDigitizerThing ti,unsigned short *saturation)
- = {0x2F3C,0x4,0x11,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetContrast(VideoDigitizerThing ti,unsigned short *contrast)
- = {0x2F3C,0x4,0x12,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetHue(VideoDigitizerThing ti,unsigned short *hue)
- = {0x2F3C,0x4,0x13,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetSharpness(VideoDigitizerThing ti,unsigned short *sharpness)
- = {0x2F3C,0x4,0x14,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetSaturation(VideoDigitizerThing ti,unsigned short *saturation)
- = {0x2F3C,0x4,0x15,0x7000,0xA82A};
- pascal VideoDigitizerError VDGrabOneFrame(VideoDigitizerThing ti)
- = {0x2F3C,0x0,0x16,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetMaxAuxBuffer(VideoDigitizerThing ti,PixMapHandle *pm,
- Rect *r)
- = {0x2F3C,0x8,0x17,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetDigitizerInfo(VideoDigitizerThing ti,DigitizerInfo *info)
- = {0x2F3C,0x4,0x19,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetCurrentFlags(VideoDigitizerThing ti,long *inputCurrentFlag,
- long *outputCurrentFlag)
- = {0x2F3C,0x8,0x1A,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetKeyColor(VideoDigitizerThing ti,long index)
- = {0x2F3C,0x4,0x1B,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetKeyColor(VideoDigitizerThing ti,long *index)
- = {0x2F3C,0x4,0x1C,0x7000,0xA82A};
- pascal VideoDigitizerError VDAddKeyColor(VideoDigitizerThing ti,long *index)
- = {0x2F3C,0x4,0x1D,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetNextKeyColor(VideoDigitizerThing ti,long index)
- = {0x2F3C,0x4,0x1E,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetKeyColorRange(VideoDigitizerThing ti,RGBColor *minRGB,
- RGBColor *maxRGB)
- = {0x2F3C,0x8,0x1F,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetKeyColorRange(VideoDigitizerThing ti,RGBColor *minRGB,
- RGBColor *maxRGB)
- = {0x2F3C,0x8,0x20,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetDigitizerUserInterrupt(VideoDigitizerThing ti,
- short whichOne,ProcPtr userInterruptProc,Ptr params)
- = {0x2F3C,0xA,0x21,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetInputColorSpaceMode(VideoDigitizerThing ti,
- short colorSpaceMode)
- = {0x2F3C,0x2,0x22,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetInputColorSpaceMode(VideoDigitizerThing ti,
- short *colorSpaceMode)
- = {0x2F3C,0x4,0x23,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetClipState(VideoDigitizerThing ti,short clipEnable)
- = {0x2F3C,0x2,0x24,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetClipState(VideoDigitizerThing ti,short *clipEnable)
- = {0x2F3C,0x4,0x25,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetClipRgn(VideoDigitizerThing ti,RgnHandle clipRegion)
- = {0x2F3C,0x4,0x26,0x7000,0xA82A};
- pascal VideoDigitizerError VDClearClipRgn(VideoDigitizerThing ti,RgnHandle clipRegion)
- = {0x2F3C,0x4,0x27,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetCLUTInUse(VideoDigitizerThing ti,CTabHandle *colorTableHandle)
- = {0x2F3C,0x4,0x28,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetPLLFilterType(VideoDigitizerThing ti,short pllType)
- = {0x2F3C,0x2,0x29,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetPLLFilterType(VideoDigitizerThing ti,short *pllType)
- = {0x2F3C,0x4,0x2A,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetMaskandValue(VideoDigitizerThing ti,short blendLevel,
- long *mask,long *value)
- = {0x2F3C,0xA,0x2B,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetMasterBlendLevel(VideoDigitizerThing ti,
- short *blendLevel)
- = {0x2F3C,0x4,0x2C,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetPlayThruDestination(VideoDigitizerThing ti,
- PixMapHandle dest,Rect *destRect,MatrixRecord *m,RgnHandle mask)
- = {0x2F3C,0x10,0x2D,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetPlayThruOnOff(VideoDigitizerThing ti,short state)
- = {0x2F3C,0x2,0x2E,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetAltDataTypes(VideoDigitizerThing ti,VdigTypeListHandle list)
- = {0x2F3C,0x4,0x2F,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetAltDataDestination(VideoDigitizerThing ti,
- long dstType,Ptr startAddr,short rowBytes,short PixelSize,long bufferSize,
- Rect *destRect,MatrixRecord *m,ProcPtr frameDonePtr)
- = {0x2F3C,0x1C,0x30,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetAltDataOnOff(VideoDigitizerThing ti,short state)
- = {0x2F3C,0x2,0x31,0x7000,0xA82A};
- pascal VideoDigitizerError VDPreflightDestination(VideoDigitizerThing ti,
- Rect *digitizerRect,PixMapHandle dest,Rect *destRect,MatrixRecord *m)
- = {0x2F3C,0x10,0x32,0x7000,0xA82A};
- pascal VideoDigitizerError VDPreflightGlobalRect(VideoDigitizerThing ti,
- GrafPtr theWindow,Rect *globalRect)
- = {0x2F3C,0x8,0x33,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetPlayThruGlobalRect(VideoDigitizerThing ti,
- GrafPtr theWindow,Rect *globalRect)
- = {0x2F3C,0x8,0x34,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetInputGammaRecord(VideoDigitizerThing ti,
- VDGamRecPtr inputGammaPtr)
- = {0x2F3C,0x4,0x35,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetInputGammaRecord(VideoDigitizerThing ti,
- VDGamRecPtr *inputGammaPtr)
- = {0x2F3C,0x4,0x36,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetBlackLevelValue(VideoDigitizerThing ti,
- unsigned short *blackLevel)
- = {0x2F3C,0x4,0x37,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetBlackLevelValue(VideoDigitizerThing ti,
- unsigned short *blackLevel)
- = {0x2F3C,0x4,0x38,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetWhiteLevelValue(VideoDigitizerThing ti,
- unsigned short *whiteLevel)
- = {0x2F3C,0x4,0x39,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetWhiteLevelValue(VideoDigitizerThing ti,
- unsigned short *whiteLevel)
- = {0x2F3C,0x4,0x3A,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetVideoDefaults(VideoDigitizerThing ti,unsigned short *blackLevel,
- unsigned short *whiteLevel,unsigned short *brightness,unsigned short *hue,
- unsigned short *saturation,unsigned short *contrast,unsigned short *sharpness)
- = {0x2F3C,0x1C,0x3B,0x7000,0xA82A};
- pascal VideoDigitizerError VDGrabOneFrameAsync(VideoDigitizerThing ti,Boolean bufferingOn,
- PixMapHandle nextDest,Point nextPt)
- = {0x2F3C,0xA,0x18,0x7000,0xA82A};
- pascal long VDDone(VideoDigitizerThing ti)
- = {0x2F3C,0x0,0x7,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetNumberOfInputs(VideoDigitizerThing ti,short *inputs)
- = {0x2F3C,0x4,0x3C,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetInputFormat(VideoDigitizerThing ti,short input,
- short *format)
- = {0x2F3C,0x6,0x3D,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetInput(VideoDigitizerThing ti,short input)
- = {0x2F3C,0x2,0x3E,0x7000,0xA82A};
- pascal VideoDigitizerError VDGetInput(VideoDigitizerThing ti,short *input)
- = {0x2F3C,0x4,0x3F,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetInputStandard(VideoDigitizerThing ti,short inputStandard)
- = {0x2F3C,0x2,0x40,0x7000,0xA82A};
- pascal VideoDigitizerError VDSetupBuffers(VideoDigitizerThing ti, VdigBufferRecListHandle bufferList)
- = {0x2F3C,0x4,0x41,0x7000,0xA82A};
- pascal VideoDigitizerError VDGrabOneFrameAsync2(VideoDigitizerThing ti, short buffer)
- = {0x2F3C,0x2,0x42,0x7000,0xA82A};
- pascal long VDDone2(VideoDigitizerThing ti, short buffer)
- = {0x2F3C,0x2,0x43,0x7000,0xA82A};
- #ifdef __cplusplus
- }
- #endif
- /* Sequence Grab Component */
- typedef ComponentInstance SeqGrabComponent;
- typedef ComponentInstance SGChannel;
-
-
-
-
- #define SeqGrabComponentType 'barg'
- #define SeqGrabChannelType 'sgch'
-
- #define grabPictOffScreen (1)
- #define sgFlagControlledGrab (1)
-
- #define channelPlayNormal 0
- #define channelPlayFast 1
- #define channelPlayHighQuality 2
- #define channelPlayAllData 4
-
- enum {seqGrabToDisk = 1,seqGrabToMemory = 2,seqGrabDontUseTempMemory = 4,
- seqGrabAppendToFile = 8,seqGrabDontAddMovieResource = 16};
- typedef unsigned char SeqGrabDataOutputEnum;
-
- enum {seqGrabRecord = 1,seqGrabPreview = 2,seqGrabPlayDuringRecord = 4};
- typedef unsigned char SeqGrabUsageEnum;
-
- enum {seqGrabHasBounds = 1,seqGrabHasVolume = 2, seqGrabHasDiscreteSamples = 4};
- typedef unsigned char SeqGrabChannelInfoEnum;
-
-
- struct SeqGrabFrameInfo {
- long frameOffset;
- long frameTime;
- long frameSize;
- SGChannel frameChannel;
- long frameRefCon;
- };
-
- enum {
- noDeviceForChannel = -9400,
- grabTimeComplete = -9401,
- cantDoThatInCurrentMode = -9402,
- notEnoughMemoryToGrab = -9403,
- notEnoughDiskSpaceToGrab = -9404,
- couldntGetRequiredComponent = -9405,
- badSGChannel = -9406,
- seqGrabInfoNotAvailable = -9407,
- deviceCantMeetRequest = -9408
- };
-
- typedef struct SeqGrabFrameInfo SeqGrabFrameInfo;
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- pascal ComponentResult SGInitialize(SeqGrabComponent s)
- = {0x2F3C,0x0,0x1,0x7000,0xA82A};
-
- pascal ComponentResult SGSetDataOutput(SeqGrabComponent s,FSSpec *movieFile,
- long whereFlags)
- = {0x2F3C,0x8,0x2,0x7000,0xA82A};
- pascal ComponentResult SGGetDataOutput(SeqGrabComponent s,FSSpec *movieFile,
- long *whereFlags)
- = {0x2F3C,0x8,0x3,0x7000,0xA82A};
-
- pascal ComponentResult SGSetGWorld(SeqGrabComponent s,CGrafPtr gp,GDHandle gd)
- = {0x2F3C,0x8,0x4,0x7000,0xA82A};
- pascal ComponentResult SGGetGWorld(SeqGrabComponent s,CGrafPtr *gp,GDHandle *gd)
- = {0x2F3C,0x8,0x5,0x7000,0xA82A};
-
- pascal ComponentResult SGNewChannel(SeqGrabComponent s,OSType channelType,
- SGChannel *ref)
- = {0x2F3C,0x8,0x6,0x7000,0xA82A};
- pascal ComponentResult SGDisposeChannel(SeqGrabComponent s,SGChannel c)
- = {0x2F3C,0x4,0x7,0x7000,0xA82A};
-
- pascal ComponentResult SGStartPreview(SeqGrabComponent s)
- = {0x2F3C,0x0,0x10,0x7000,0xA82A};
- pascal ComponentResult SGStartRecord(SeqGrabComponent s)
- = {0x2F3C,0x0,0x11,0x7000,0xA82A};
- pascal ComponentResult SGIdle(SeqGrabComponent s)
- = {0x2F3C,0x0,0x12,0x7000,0xA82A};
- pascal ComponentResult SGStop(SeqGrabComponent s)
- = {0x2F3C,0x0,0x13,0x7000,0xA82A};
-
- pascal ComponentResult SGPause(SeqGrabComponent s,Boolean pause)
- = {0x2F3C,0x2,0x14,0x7000,0xA82A};
-
- pascal ComponentResult SGPrepare(SeqGrabComponent s,Boolean prepareForPreview,
- Boolean prepareForRecord)
- = {0x2F3C,0x4,0x15,0x7000,0xA82A};
- pascal ComponentResult SGRelease(SeqGrabComponent s)
- = {0x2F3C,0x0,0x16,0x7000,0xA82A};
-
- pascal Movie SGGetMovie(SeqGrabComponent s)
- = {0x2F3C,0x0,0x17,0x7000,0xA82A};
-
- pascal ComponentResult SGSetMaximumRecordTime(SeqGrabComponent s,unsigned long ticks)
- = {0x2F3C,0x4,0x18,0x7000,0xA82A};
- pascal ComponentResult SGGetMaximumRecordTime(SeqGrabComponent s,unsigned long *ticks)
- = {0x2F3C,0x4,0x19,0x7000,0xA82A};
-
- pascal ComponentResult SGGetStorageSpaceRemaining(SeqGrabComponent s,unsigned long *bytes)
- = {0x2F3C,0x4,0x1A,0x7000,0xA82A};
- pascal ComponentResult SGGetTimeRemaining(SeqGrabComponent s,long *ticksLeft)
- = {0x2F3C,0x4,0x1B,0x7000,0xA82A};
- pascal ComponentResult SGGrabPict(SeqGrabComponent s, PicHandle *p, const Rect *bounds,
- short offscreenDepth, long grabPictFlags) =
- {0x2F3C,0xe,0x1C,0x7000,0xA82A};
-
- pascal ComponentResult SGGetLastMovieResID(SeqGrabComponent s, short *resID) =
- {0x2F3C,0x4,0x1D,0x7000,0xA82A};
-
- pascal ComponentResult SGSetFlags(SeqGrabComponent s, long sgFlags) =
- {0x2F3C,0x4,0x1E,0x7000,0xA82A};
-
- pascal ComponentResult SGGetFlags(SeqGrabComponent s, long *sgFlags) =
- {0x2F3C,0x4,0x1F,0x7000,0xA82A};
-
-
- /* General Channel Routines */
- pascal ComponentResult SGSetChannelUsage(SGChannel c,long usage)
- = {0x2F3C,0x4,0x80,0x7000,0xA82A};
- pascal ComponentResult SGGetChannelUsage(SGChannel c,long *usage)
- = {0x2F3C,0x4,0x81,0x7000,0xA82A};
-
- pascal ComponentResult SGSetChannelBounds(SGChannel c,Rect *bounds)
- = {0x2F3C,0x4,0x82,0x7000,0xA82A};
- pascal ComponentResult SGGetChannelBounds(SGChannel c,const Rect *bounds)
- = {0x2F3C,0x4,0x83,0x7000,0xA82A};
-
- pascal ComponentResult SGSetChannelVolume(SGChannel c,short volume)
- = {0x2F3C,0x2,0x84,0x7000,0xA82A};
- pascal ComponentResult SGGetChannelVolume(SGChannel c,short *volume)
- = {0x2F3C,0x4,0x85,0x7000,0xA82A};
-
- pascal ComponentResult SGGetChannelInfo(SGChannel c,long *channelInfo)
- = {0x2F3C,0x4,0x86,0x7000,0xA82A};
-
- pascal ComponentResult SGSetChannelPlayFlags(SGChannel c, long playFlags)
- = {0x2F3C,0x4,0x87,0x7000,0xA82A};
- pascal ComponentResult SGGetChannelPlayFlags(SGChannel c, long *playFlags)
- = {0x2F3C,0x4,0x88,0x7000,0xA82A};
-
- pascal ComponentResult SGSetChannelMaxFrames(SGChannel c, long frameCount)
- = {0x2F3C,0x4,0x89,0x7000,0xA82A};
- pascal ComponentResult SGGetChannelMaxFrames(SGChannel c, long *frameCount)
- = {0x2F3C,0x4,0x8A,0x7000,0xA82A};
-
- pascal ComponentResult SGSetChannelRefCon(SGChannel c, long refCon)
- = {0x2F3C,0x4,0x8B,0x7000,0xA82A};
-
- #ifdef __cplusplus
- }
- #endif
- /* Video Routines */
-
- struct SGCompressInfo {
- Ptr buffer;
- unsigned long bufferSize;
- unsigned char similarity;
- unsigned char reserved;
- };
- typedef struct SGCompressInfo SGCompressInfo;
-
- typedef pascal ComponentResult (*GrabProc)(SGChannel c, short bufferNum, long refCon);
- typedef pascal ComponentResult (*GrabCompleteProc)(SGChannel c, short bufferNum, Boolean *done, long refCon);
- typedef pascal ComponentResult (*DisplayProc)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
- typedef pascal ComponentResult (*CompressProc)(SGChannel c, short bufferNum, long refCon);
- typedef pascal ComponentResult (*CompressCompleteProc)(SGChannel c, short bufferNum,
- Boolean *done, SGCompressInfo *ci, long refCon);
- typedef pascal ComponentResult (*AddFrameProc)(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale,
- const SGCompressInfo *ci, long refCon);
- typedef pascal ComponentResult (*TransferFrameProc)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
-
- struct VideoBottles {
- short procCount;
- GrabProc grabProc;
- GrabCompleteProc grabCompleteProc;
- DisplayProc displayProc;
- CompressProc compressProc;
- CompressCompleteProc compressCompleteProc;
- AddFrameProc addFrameProc;
- TransferFrameProc transferFrameProc;
- };
-
- typedef struct VideoBottles VideoBottles;
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- pascal ComponentResult SGGetSrcVideoBounds(SGChannel c,Rect *r)
- = {0x2F3C,0x4,0x100,0x7000,0xA82A};
- pascal ComponentResult SGSetVideoRect(SGChannel c,Rect *r)
- = {0x2F3C,0x4,0x101,0x7000,0xA82A};
- pascal ComponentResult SGGetVideoRect(SGChannel c,Rect *r)
- = {0x2F3C,0x4,0x102,0x7000,0xA82A};
-
- pascal ComponentResult SGGetVideoCompressorType(SGChannel c,OSType *compressorType)
- = {0x2F3C,0x4,0x103,0x7000,0xA82A};
- pascal ComponentResult SGSetVideoCompressorType(SGChannel c,OSType compressorType)
- = {0x2F3C,0x4,0x104,0x7000,0xA82A};
-
- pascal ComponentResult SGSetVideoCompressor(SGChannel c,short depth,CompressorComponent compressor,
- CodecQ spatialQuality,CodecQ temporalQuality,long keyFrameRate)
- = {0x2F3C,0x12,0x105,0x7000,0xA82A};
- pascal ComponentResult SGGetVideoCompressor(SGChannel c,short *depth,CompressorComponent *compressor,
- CodecQ *spatialQuality,CodecQ *temporalQuality,long *keyFrameRate)
- = {0x2F3C,0x14,0x106,0x7000,0xA82A};
-
- pascal ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
- = {0x2f3c,0,263,0x7000,0xa82a};
- pascal ComponentResult SGSetVideoDigitizerComponent(SGChannel c, ComponentInstance vdig)
- = {0x2f3c,4,264,0x7000,0xa82a};
- pascal ComponentResult SGVideoDigitizerChanged(SGChannel c)
- = {0x2f3c,0,265,0x7000,0xa82a};
-
- pascal ComponentResult SGSetVideoBottlenecks(SGChannel c, VideoBottles *vb)
- = {0x2f3c,4,266,0x7000,0xa82a};
- pascal ComponentResult SGGetVideoBottlenecks(SGChannel c, VideoBottles *vb)
- = {0x2f3c,4,267,0x7000,0xa82a};
-
- pascal ComponentResult SGGrabFrame(SGChannel c, short bufferNum)
- = {0x2f3c,2,268,0x7000,0xa82a};
- pascal ComponentResult SGGrabFrameComplete(SGChannel c, short bufferNum, Boolean *done)
- = {0x2f3c,6,269,0x7000,0xa82a};
-
- pascal ComponentResult SGDisplayFrame(SGChannel c, short bufferNum, MatrixRecord *mp,
- RgnHandle clipRgn)
- = {0x2f3c,10,270,0x7000,0xa82a};
-
- pascal ComponentResult SGCompressFrame(SGChannel c, short bufferNum)
- = {0x2f3c,2,271,0x7000,0xa82a};
- pascal ComponentResult SGCompressFrameComplete(SGChannel c, short bufferNum,
- Boolean *done, SGCompressInfo *ci)
- = {0x2f3c,10,272,0x7000,0xa82a};
-
- pascal ComponentResult SGAddFrame(SGChannel c, short bufferNum, TimeValue atTime,
- TimeScale scale, const SGCompressInfo *ci)
- = {0x2f3c,14,273,0x7000,0xa82a};
-
- pascal ComponentResult SGTransferFrameForCompress(SGChannel c, short bufferNum,
- MatrixRecord *mp, RgnHandle clipRgn)
- = {0x2f3c,10,274,0x7000,0xa82a};
-
- pascal ComponentResult SGSetCompressBuffer(SGChannel c, short depth, const Rect *compressSize)
- = {0x2f3c,6,279,0x7000,0xa82a};
-
- pascal ComponentResult SGGetCompressBuffer(SGChannel c, short *depth, Rect *compressSize)
- = {0x2f3c,8,280,0x7000,0xa82a};
-
- pascal ComponentResult SGGetBufferInfo(SGChannel c, short bufferNum,
- PixMapHandle *bufferPM, Rect *bufferRect,GWorldPtr *compressBuffer,
- Rect *compressBufferRect)
- = {0x2f3c,18,281,0x7000,0xa82a};
-
- /* Sound Routines */
- pascal ComponentResult SGSetSoundInputDriver(SGChannel c,const Str255 driverName)
- = {0x2F3C,0x4,0x100,0x7000,0xA82A};
- pascal long SGGetSoundInputDriver(SGChannel c)
- = {0x2F3C,0x0,0x101,0x7000,0xA82A};
- pascal ComponentResult SGSoundInputDriverChanged(SGChannel c)
- = {0x2F3C,0x0,0x102,0x7000,0xA82A};
-
- pascal ComponentResult SGSetSoundRecordChunkSize(SGChannel c,long seconds)
- = {0x2F3C,0x4,0x103,0x7000,0xA82A};
- pascal long SGGetSoundRecordChunkSize(SGChannel c)
- = {0x2F3C,0x0,0x104,0x7000,0xA82A};
-
- pascal ComponentResult SGSetSoundInputRate(SGChannel c,Fixed rate)
- = {0x2F3C,0x4,0x105,0x7000,0xA82A};
- pascal Fixed SGGetSoundInputRate(SGChannel c)
- = {0x2F3C,0x0,0x106,0x7000,0xA82A};
-
- /* calls from seqGrab to Channel */
- pascal ComponentResult SGInitChannel(SGChannel c,SeqGrabComponent owner)
- = {0x2F3C,0x4,0xC8,0x7000,0xA82A};
- pascal ComponentResult SGWriteSamples(SGChannel c,Movie m,AliasHandle theFile)
- = {0x2F3C,0x8,0xC9,0x7000,0xA82A};
- pascal ComponentResult SGGetDataRate(SGChannel c,long *bytesPerSecond)
- = {0x2F3C,0x4,0xCA,0x7000,0xA82A};
-
- /* calls from Channel to seqGrab */
- pascal ComponentResult SGWriteMovieData(SeqGrabComponent s,SGChannel c,
- Ptr p,long len,long *offset)
- = {0x2F3C,0x10,0x80,0x7000,0xA82A};
- pascal ComponentResult SGAddFrameReference(SeqGrabComponent s,SeqGrabFrameInfo *frameInfo)
- = {0x2F3C,0x4,0x81,0x7000,0xA82A};
- pascal ComponentResult SGGetNextFrameReference(SeqGrabComponent s,SeqGrabFrameInfo *frameInfo,
- TimeValue *frameDuration,long *frameNumber)
- = {0x2F3C,0xC,0x82,0x7000,0xA82A};
- pascal ComponentResult SGGetTimeBase(SeqGrabComponent s,TimeBase *tb)
- = {0x2F3C,0x4,0x83,0x7000,0xA82A};
- #ifdef __cplusplus
- }
- #endif
-
- /* Preview Component*/
- struct ResourceDesc {
- ResType resourceType;
- short resourceId;
- };
- typedef struct ResourceDesc ResourceDesc;
-
- struct ThumbnailList {
- unsigned long date; /* When the resource was last modified. */
- short version; /* Always 3 when using version shown here. */
- ResType prevComponentType; /* The type of Preview Component that made the preview */
- Str31 fileTypeDesc; /* Vernacular description of the type of the file */
- short fileTypeDescScript; /* Script code for the file desc string */
- short count; /* number of elements in the following array */
- ResourceDesc resources[1]; /* an array of resource descriptions */
- };
- typedef struct ThumbnailList ThumbnailList;
- typedef ThumbnailList *ThumbnailListPtr, **ThumbnailListHandle;
-
- struct Str31WithScript
- {
- Str31 theString;
- short scriptCode;
- };
- typedef struct Str31WithScript Str31WithScript;
- typedef Str31WithScript *Str31WithScriptPtr, **Str31WithScriptHandle;
-
- struct PreviewStatusRec {
- StandardFileReply fileInfo; /* See StandardFile.h */
- long fileSize; /* File size in bytes */
- short resRefNum; /* resource RefNum or 0 if no resource fork */
- ThumbnailListHandle PRVLHandle; /* handle to the PRVL or 0 if none */
- };
- typedef struct PreviewStatusRec PreviewStatusRec;
- typedef PreviewStatusRec *PreviewStatusPtr, **PreviewStatusHandle;
-
- #define PreviewComponentType 'prvt'
-
- /* The subtypes of the preview components provided by Apple */
- #define FileInfoPrevCompSubType 'finf' /* Shows file type (from PRVL) and size */
- #define PICTPrevCompSubType 'PICT' /* Creates / Shows PICT thumbnails */
- #define MoviePrevCompSubType 'MooV' /* Creates thumbnails for movie files */
-
- typedef ComponentInstance Previewer;
-
-
- #define prevComponentCreatePreviewRefNum 2
- #define prevComponentGetPreviewData 3
- #define prevComponentAddPreviewRefNum 5
- #define prevComponentStartPreviewing 11
- #define prevComponentDoDraw 12
- #define prevComponentTimeSlice 13
- #define prevComponentDoMouseDown 14
- #define prevComponentLastCall 15
-
- enum {
- prevComponentCantPreviewThisFile = -9999,
- prevComponentCouldGeneratePreviewForThisFile = -9998
- };
- enum {
- prevComponentDontNeedTimeSlice = -9993
- };
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- pascal ComponentResult PreviewerCreatePreviewForResRefNum(Previewer p,short resRefNum,
- FSSpecPtr theFile,Boolean removeOldPreviews,Str31WithScriptPtr fileTypeDescription,
- ProgressProcRecordPtr progressProc)
- = {0x2F3C,0x10,prevComponentCreatePreviewRefNum,0x7000,0xA82A};
- pascal ComponentResult PreviewerGetPreviewData(Previewer p,FSSpecPtr theFile,
- Handle previewData,Handle auxData,ProgressProcRecordPtr progressProc)
- = {0x2F3C,0x10,prevComponentGetPreviewData,0x7000,0xA82A};
- pascal ComponentResult PreviewerAddPreviewDataRefNum(Previewer p,short resRefNum,
- FSSpecPtr theFile,Boolean removeOldPreviews,Str31WithScriptPtr fileTypeDescription,
- Handle previewData,Handle auxData)
- = {0x2F3C,0x14,prevComponentAddPreviewRefNum,0x7000,0xA82A};
- pascal ComponentResult PreviewerStartPreviewing(Previewer p,PreviewStatusPtr status,
- WindowPtr window,Rect * boundsRect,Boolean * NeedInitialUpdate)
- = {0x2F3C,0x10,prevComponentStartPreviewing,0x7000,0xA82A};
- pascal ComponentResult PreviewerDoDraw(Previewer p, PreviewStatusPtr status)
- = {0x2F3C,0x4,prevComponentDoDraw,0x7000,0xA82A};
- pascal ComponentResult PreviewerTimeSlice(Previewer p, PreviewStatusPtr status)
- = {0x2F3C,0x4,prevComponentTimeSlice,0x7000,0xA82A};
- pascal ComponentResult PreviewerLastCall(Previewer p, PreviewStatusPtr status)
- = {0x2F3C,0x4,prevComponentLastCall,0x7000,0xA82A};
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif
-