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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       MediaHandlers.h
  3.  
  4.      Contains:   QuickTime Interfaces.
  5.  
  6.      Version:    Technology: QuickTime 6.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1990-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __MEDIAHANDLERS__
  18. #define __MEDIAHANDLERS__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __MACTYPES__
  23. #include "MacTypes.h"
  24. #endif
  25. #ifndef __COMPONENTS__
  26. #include "Components.h"
  27. #endif
  28. #ifndef __MOVIES__
  29. #include "Movies.h"
  30. #endif
  31. #ifndef __SOUND__
  32. #include "Sound.h"
  33. #endif
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50. typedef CALLBACK_API( void , PrePrerollCompleteProcPtr )(MediaHandler mh, OSErr err, void *refcon);
  51. typedef STACK_UPP_TYPE(PrePrerollCompleteProcPtr)               PrePrerollCompleteUPP;
  52. enum {
  53.     handlerHasSpatial           = 1 << 0,
  54.     handlerCanClip              = 1 << 1,
  55.     handlerCanMatte             = 1 << 2,
  56.     handlerCanTransferMode      = 1 << 3,
  57.     handlerNeedsBuffer          = 1 << 4,
  58.     handlerNoIdle               = 1 << 5,
  59.     handlerNoScheduler          = 1 << 6,
  60.     handlerWantsTime            = 1 << 7,
  61.     handlerCGrafPortOnly        = 1 << 8,
  62.     handlerCanSend              = 1 << 9,
  63.     handlerCanHandleComplexMatrix = 1 << 10,
  64.     handlerWantsDestinationPixels = 1 << 11,
  65.     handlerCanSendImageData     = 1 << 12,
  66.     handlerCanPicSave           = 1 << 13
  67. };
  68. /* media task flags */
  69. enum {
  70.     mMustDraw                   = 1 << 3,
  71.     mAtEnd                      = 1 << 4,
  72.     mPreflightDraw              = 1 << 5,
  73.     mSyncDrawing                = 1 << 6,
  74.     mPrecompositeOnly           = 1 << 9,
  75.     mSoundOnly                  = 1 << 10,
  76.     mDoIdleActionsBeforeDraws   = 1 << 11,
  77.     mDisableIdleActions         = 1 << 12
  78. };
  79. /* media task result flags */
  80. enum {
  81.     mDidDraw                    = 1 << 0,
  82.     mNeedsToDraw                = 1 << 2,
  83.     mDrawAgain                  = 1 << 3,
  84.     mPartialDraw                = 1 << 4,
  85.     mWantIdleActions            = 1 << 5
  86. };
  87. enum {
  88.     forceUpdateRedraw           = 1 << 0,
  89.     forceUpdateNewBuffer        = 1 << 1
  90. };
  91. /* media hit test flags */
  92. enum {
  93.     mHitTestBounds              = 1L << 0,                      /*    point must only be within targetRefCon's bounding box */
  94.     mHitTestImage               = 1L << 1,                      /*  point must be within the shape of the targetRefCon's image */
  95.     mHitTestInvisible           = 1L << 2,                      /*  invisible targetRefCon's may be hit tested */
  96.     mHitTestIsClick             = 1L << 3                       /*  for codecs that want mouse events */
  97. };
  98. /* media is opaque flags */
  99. enum {
  100.     mOpaque                     = 1L << 0,
  101.     mInvisible                  = 1L << 1
  102. };
  103. /* MediaSetPublicInfo/MediaGetPublicInfo selectors */
  104. enum {
  105.     kMediaQTIdleFrequencySelector = FOUR_CHAR_CODE('idfq')
  106. };
  107. struct GetMovieCompleteParams {
  108.     short                           version;
  109.     Movie                           theMovie;
  110.     Track                           theTrack;
  111.     Media                           theMedia;
  112.     TimeScale                       movieScale;
  113.     TimeScale                       mediaScale;
  114.     TimeValue                       movieDuration;
  115.     TimeValue                       trackDuration;
  116.     TimeValue                       mediaDuration;
  117.     Fixed                           effectiveRate;
  118.     TimeBase                        timeBase;
  119.     short                           volume;
  120.     Fixed                           width;
  121.     Fixed                           height;
  122.     MatrixRecord                    trackMovieMatrix;
  123.     CGrafPtr                        moviePort;
  124.     GDHandle                        movieGD;
  125.     PixMapHandle                    trackMatte;
  126.     QTAtomContainer                 inputMap;
  127.     QTMediaContextID                mediaContextID;
  128. };
  129. typedef struct GetMovieCompleteParams   GetMovieCompleteParams;
  130. enum {
  131.     kMediaVideoParamBrightness  = 1,
  132.     kMediaVideoParamContrast    = 2,
  133.     kMediaVideoParamHue         = 3,
  134.     kMediaVideoParamSharpness   = 4,
  135.     kMediaVideoParamSaturation  = 5,
  136.     kMediaVideoParamBlackLevel  = 6,
  137.     kMediaVideoParamWhiteLevel  = 7
  138. };
  139. /* These are for MediaGetInfo() and MediaSetInfo().*/
  140. enum {
  141.     kMHInfoEncodedFrameRate     = FOUR_CHAR_CODE('orat')        /* Parameter is a MHInfoEncodedFrameRateRecord*.*/
  142. };
  143. /* This holds the frame rate at which the track was encoded.*/
  144. struct MHInfoEncodedFrameRateRecord {
  145.     Fixed                           encodedFrameRate;
  146. };
  147. typedef struct MHInfoEncodedFrameRateRecord MHInfoEncodedFrameRateRecord;
  148. typedef Handle *                        dataHandlePtr;
  149. typedef dataHandlePtr *                 dataHandleHandle;
  150. struct QTCustomActionTargetRecord {
  151.     Movie                           movie;
  152.     DoMCActionUPP                   doMCActionCallbackProc;
  153.     long                            callBackRefcon;
  154.     Track                           track;
  155.     long                            trackObjectRefCon;
  156.     Track                           defaultTrack;
  157.     long                            defaultObjectRefCon;
  158.     long                            reserved1;
  159.     long                            reserved2;
  160. };
  161. typedef struct QTCustomActionTargetRecord QTCustomActionTargetRecord;
  162. typedef QTCustomActionTargetRecord *    QTCustomActionTargetPtr;
  163. struct MediaEQSpectrumBandsRecord {
  164.     short                           count;
  165.     UnsignedFixedPtr                frequency;                  /* pointer to array of frequencies*/
  166. };
  167. typedef struct MediaEQSpectrumBandsRecord MediaEQSpectrumBandsRecord;
  168. typedef MediaEQSpectrumBandsRecord *    MediaEQSpectrumBandsRecordPtr;
  169. EXTERN_API( ComponentResult )
  170. CallComponentExecuteWiredAction (ComponentInstance      ci,
  171.                                  QTAtomContainer        actionContainer,
  172.                                  QTAtom                 actionAtom,
  173.                                  QTCustomActionTargetPtr  target,
  174.                                  QTEventRecordPtr       event)                              FIVEWORDINLINE(0x2F3C, 0x0010, 0xFFF7, 0x7000, 0xA82A);
  175. /* MediaCallRange2 */
  176. /* These are unique to each type of media handler */
  177. /* They are also included in the public interfaces */
  178. /* Flags for MediaSetChunkManagementFlags*/
  179. enum {
  180.     kEmptyPurgableChunksOverAllowance = 1
  181. };
  182. EXTERN_API( ComponentResult )
  183. MediaSetChunkManagementFlags    (MediaHandler           mh,
  184.                                  UInt32                 flags,
  185.                                  UInt32                 flagsMask)                          FIVEWORDINLINE(0x2F3C, 0x0008, 0x0415, 0x7000, 0xA82A);
  186. EXTERN_API( ComponentResult )
  187. MediaGetChunkManagementFlags    (MediaHandler           mh,
  188.                                  UInt32 *               flags)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0416, 0x7000, 0xA82A);
  189. EXTERN_API( ComponentResult )
  190. MediaSetPurgeableChunkMemoryAllowance (MediaHandler     mh,
  191.                                  Size                   allowance)                          FIVEWORDINLINE(0x2F3C, 0x0004, 0x0417, 0x7000, 0xA82A);
  192. EXTERN_API( ComponentResult )
  193. MediaGetPurgeableChunkMemoryAllowance (MediaHandler     mh,
  194.                                  Size *                 allowance)                          FIVEWORDINLINE(0x2F3C, 0x0004, 0x0418, 0x7000, 0xA82A);
  195. EXTERN_API( ComponentResult )
  196. MediaEmptyAllPurgeableChunks    (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0419, 0x7000, 0xA82A);
  197. /***** These are the calls for dealing with the Generic media handler *****/
  198. EXTERN_API( ComponentResult )
  199. MediaInitialize                 (MediaHandler           mh,
  200.                                  GetMovieCompleteParams * gmc)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0501, 0x7000, 0xA82A);
  201. EXTERN_API( ComponentResult )
  202. MediaSetHandlerCapabilities     (MediaHandler           mh,
  203.                                  long                   flags,
  204.                                  long                   flagsMask)                          FIVEWORDINLINE(0x2F3C, 0x0008, 0x0502, 0x7000, 0xA82A);
  205. EXTERN_API( ComponentResult )
  206. MediaIdle                       (MediaHandler           mh,
  207.                                  TimeValue              atMediaTime,
  208.                                  long                   flagsIn,
  209.                                  long *                 flagsOut,
  210.                                  const TimeRecord *     movieTime)                          FIVEWORDINLINE(0x2F3C, 0x0010, 0x0503, 0x7000, 0xA82A);
  211. EXTERN_API( ComponentResult )
  212. MediaGetMediaInfo               (MediaHandler           mh,
  213.                                  Handle                 h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0504, 0x7000, 0xA82A);
  214. EXTERN_API( ComponentResult )
  215. MediaPutMediaInfo               (MediaHandler           mh,
  216.                                  Handle                 h)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0505, 0x7000, 0xA82A);
  217. EXTERN_API( ComponentResult )
  218. MediaSetActive                  (MediaHandler           mh,
  219.                                  Boolean                enableMedia)                        FIVEWORDINLINE(0x2F3C, 0x0002, 0x0506, 0x7000, 0xA82A);
  220. EXTERN_API( ComponentResult )
  221. MediaSetRate                    (MediaHandler           mh,
  222.                                  Fixed                  rate)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0507, 0x7000, 0xA82A);
  223. EXTERN_API( ComponentResult )
  224. MediaGGetStatus                 (MediaHandler           mh,
  225.                                  ComponentResult *      statusErr)                          FIVEWORDINLINE(0x2F3C, 0x0004, 0x0508, 0x7000, 0xA82A);
  226. EXTERN_API( ComponentResult )
  227. MediaTrackEdited                (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0509, 0x7000, 0xA82A);
  228. EXTERN_API( ComponentResult )
  229. MediaSetMediaTimeScale          (MediaHandler           mh,
  230.                                  TimeScale              newTimeScale)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x050A, 0x7000, 0xA82A);
  231. EXTERN_API( ComponentResult )
  232. MediaSetMovieTimeScale          (MediaHandler           mh,
  233.                                  TimeScale              newTimeScale)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x050B, 0x7000, 0xA82A);
  234. EXTERN_API( ComponentResult )
  235. MediaSetGWorld                  (MediaHandler           mh,
  236.                                  CGrafPtr               aPort,
  237.                                  GDHandle               aGD)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x050C, 0x7000, 0xA82A);
  238. EXTERN_API( ComponentResult )
  239. MediaSetDimensions              (MediaHandler           mh,
  240.                                  Fixed                  width,
  241.                                  Fixed                  height)                             FIVEWORDINLINE(0x2F3C, 0x0008, 0x050D, 0x7000, 0xA82A);
  242. EXTERN_API( ComponentResult )
  243. MediaSetClip                    (MediaHandler           mh,
  244.                                  RgnHandle              theClip)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x050E, 0x7000, 0xA82A);
  245. EXTERN_API( ComponentResult )
  246. MediaSetMatrix                  (MediaHandler           mh,
  247.                                  MatrixRecord *         trackMovieMatrix)                   FIVEWORDINLINE(0x2F3C, 0x0004, 0x050F, 0x7000, 0xA82A);
  248. EXTERN_API( ComponentResult )
  249. MediaGetTrackOpaque             (MediaHandler           mh,
  250.                                  Boolean *              trackIsOpaque)                      FIVEWORDINLINE(0x2F3C, 0x0004, 0x0510, 0x7000, 0xA82A);
  251. EXTERN_API( ComponentResult )
  252. MediaSetGraphicsMode            (MediaHandler           mh,
  253.                                  long                   mode,
  254.                                  const RGBColor *       opColor)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0511, 0x7000, 0xA82A);
  255. EXTERN_API( ComponentResult )
  256. MediaGetGraphicsMode            (MediaHandler           mh,
  257.                                  long *                 mode,
  258.                                  RGBColor *             opColor)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0512, 0x7000, 0xA82A);
  259. EXTERN_API( ComponentResult )
  260. MediaGSetVolume                 (MediaHandler           mh,
  261.                                  short                  volume)                             FIVEWORDINLINE(0x2F3C, 0x0002, 0x0513, 0x7000, 0xA82A);
  262. EXTERN_API( ComponentResult )
  263. MediaSetSoundBalance            (MediaHandler           mh,
  264.                                  short                  balance)                            FIVEWORDINLINE(0x2F3C, 0x0002, 0x0514, 0x7000, 0xA82A);
  265. EXTERN_API( ComponentResult )
  266. MediaGetSoundBalance            (MediaHandler           mh,
  267.                                  short *                balance)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0515, 0x7000, 0xA82A);
  268. EXTERN_API( ComponentResult )
  269. MediaGetNextBoundsChange        (MediaHandler           mh,
  270.                                  TimeValue *            when)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0516, 0x7000, 0xA82A);
  271. EXTERN_API( ComponentResult )
  272. MediaGetSrcRgn                  (MediaHandler           mh,
  273.                                  RgnHandle              rgn,
  274.                                  TimeValue              atMediaTime)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0517, 0x7000, 0xA82A);
  275. EXTERN_API( ComponentResult )
  276. MediaPreroll                    (MediaHandler           mh,
  277.                                  TimeValue              time,
  278.                                  Fixed                  rate)                               FIVEWORDINLINE(0x2F3C, 0x0008, 0x0518, 0x7000, 0xA82A);
  279. EXTERN_API( ComponentResult )
  280. MediaSampleDescriptionChanged   (MediaHandler           mh,
  281.                                  long                   index)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x0519, 0x7000, 0xA82A);
  282. EXTERN_API( ComponentResult )
  283. MediaHasCharacteristic          (MediaHandler           mh,
  284.                                  OSType                 characteristic,
  285.                                  Boolean *              hasIt)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x051A, 0x7000, 0xA82A);
  286. EXTERN_API( ComponentResult )
  287. MediaGetOffscreenBufferSize     (MediaHandler           mh,
  288.                                  Rect *                 bounds,
  289.                                  short                  depth,
  290.                                  CTabHandle             ctab)                               FIVEWORDINLINE(0x2F3C, 0x000A, 0x051B, 0x7000, 0xA82A);
  291. EXTERN_API( ComponentResult )
  292. MediaSetHints                   (MediaHandler           mh,
  293.                                  long                   hints)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x051C, 0x7000, 0xA82A);
  294. EXTERN_API( ComponentResult )
  295. MediaGetName                    (MediaHandler           mh,
  296.                                  Str255                 name,
  297.                                  long                   requestedLanguage,
  298.                                  long *                 actualLanguage)                     FIVEWORDINLINE(0x2F3C, 0x000C, 0x051D, 0x7000, 0xA82A);
  299. EXTERN_API( ComponentResult )
  300. MediaForceUpdate                (MediaHandler           mh,
  301.                                  long                   forceUpdateFlags)                   FIVEWORDINLINE(0x2F3C, 0x0004, 0x051E, 0x7000, 0xA82A);
  302. EXTERN_API( ComponentResult )
  303. MediaGetDrawingRgn              (MediaHandler           mh,
  304.                                  RgnHandle *            partialRgn)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x051F, 0x7000, 0xA82A);
  305. EXTERN_API( ComponentResult )
  306. MediaGSetActiveSegment          (MediaHandler           mh,
  307.                                  TimeValue              activeStart,
  308.                                  TimeValue              activeDuration)                     FIVEWORDINLINE(0x2F3C, 0x0008, 0x0520, 0x7000, 0xA82A);
  309. EXTERN_API( ComponentResult )
  310. MediaInvalidateRegion           (MediaHandler           mh,
  311.                                  RgnHandle              invalRgn)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0521, 0x7000, 0xA82A);
  312. EXTERN_API( ComponentResult )
  313. MediaGetNextStepTime            (MediaHandler           mh,
  314.                                  short                  flags,
  315.                                  TimeValue              mediaTimeIn,
  316.                                  TimeValue *            mediaTimeOut,
  317.                                  Fixed                  rate)                               FIVEWORDINLINE(0x2F3C, 0x000E, 0x0522, 0x7000, 0xA82A);
  318. EXTERN_API( ComponentResult )
  319. MediaSetNonPrimarySourceData    (MediaHandler           mh,
  320.                                  long                   inputIndex,
  321.                                  long                   dataDescriptionSeed,
  322.                                  Handle                 dataDescription,
  323.                                  void *                 data,
  324.                                  long                   dataSize,
  325.                                  ICMCompletionProcRecordPtr  asyncCompletionProc,
  326.                                  ICMConvertDataFormatUPP  transferProc,
  327.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0020, 0x0523, 0x7000, 0xA82A);
  328. EXTERN_API( ComponentResult )
  329. MediaChangedNonPrimarySource    (MediaHandler           mh,
  330.                                  long                   inputIndex)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0524, 0x7000, 0xA82A);
  331. EXTERN_API( ComponentResult )
  332. MediaTrackReferencesChanged     (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0525, 0x7000, 0xA82A);
  333. EXTERN_API( ComponentResult )
  334. MediaGetSampleDataPointer       (MediaHandler           mh,
  335.                                  long                   sampleNum,
  336.                                  Ptr *                  dataPtr,
  337.                                  long *                 dataSize,
  338.                                  long *                 sampleDescIndex)                    FIVEWORDINLINE(0x2F3C, 0x0010, 0x0526, 0x7000, 0xA82A);
  339. EXTERN_API( ComponentResult )
  340. MediaReleaseSampleDataPointer   (MediaHandler           mh,
  341.                                  long                   sampleNum)                          FIVEWORDINLINE(0x2F3C, 0x0004, 0x0527, 0x7000, 0xA82A);
  342. EXTERN_API( ComponentResult )
  343. MediaTrackPropertyAtomChanged   (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0528, 0x7000, 0xA82A);
  344. EXTERN_API( ComponentResult )
  345. MediaSetTrackInputMapReference  (MediaHandler           mh,
  346.                                  QTAtomContainer        inputMap)                           FIVEWORDINLINE(0x2F3C, 0x0004, 0x0529, 0x7000, 0xA82A);
  347. EXTERN_API( ComponentResult )
  348. MediaSetVideoParam              (MediaHandler           mh,
  349.                                  long                   whichParam,
  350.                                  unsigned short *       value)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x052B, 0x7000, 0xA82A);
  351. EXTERN_API( ComponentResult )
  352. MediaGetVideoParam              (MediaHandler           mh,
  353.                                  long                   whichParam,
  354.                                  unsigned short *       value)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x052C, 0x7000, 0xA82A);
  355. EXTERN_API( ComponentResult )
  356. MediaCompare                    (MediaHandler           mh,
  357.                                  Boolean *              isOK,
  358.                                  Media                  srcMedia,
  359.                                  ComponentInstance      srcMediaComponent)                  FIVEWORDINLINE(0x2F3C, 0x000C, 0x052D, 0x7000, 0xA82A);
  360. EXTERN_API( ComponentResult )
  361. MediaGetClock                   (MediaHandler           mh,
  362.                                  ComponentInstance *    clock)                              FIVEWORDINLINE(0x2F3C, 0x0004, 0x052E, 0x7000, 0xA82A);
  363. EXTERN_API( ComponentResult )
  364. MediaSetSoundOutputComponent    (MediaHandler           mh,
  365.                                  Component              outputComponent)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x052F, 0x7000, 0xA82A);
  366. EXTERN_API( ComponentResult )
  367. MediaGetSoundOutputComponent    (MediaHandler           mh,
  368.                                  Component *            outputComponent)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0530, 0x7000, 0xA82A);
  369. EXTERN_API( ComponentResult )
  370. MediaSetSoundLocalizationData   (MediaHandler           mh,
  371.                                  Handle                 data)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0531, 0x7000, 0xA82A);
  372. EXTERN_API( ComponentResult )
  373. MediaGetInvalidRegion           (MediaHandler           mh,
  374.                                  RgnHandle              rgn)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x053C, 0x7000, 0xA82A);
  375. EXTERN_API( ComponentResult )
  376. MediaSampleDescriptionB2N       (MediaHandler           mh,
  377.                                  SampleDescriptionHandle  sampleDescriptionH)               FIVEWORDINLINE(0x2F3C, 0x0004, 0x053E, 0x7000, 0xA82A);
  378. EXTERN_API( ComponentResult )
  379. MediaSampleDescriptionN2B       (MediaHandler           mh,
  380.                                  SampleDescriptionHandle  sampleDescriptionH)               FIVEWORDINLINE(0x2F3C, 0x0004, 0x053F, 0x7000, 0xA82A);
  381. EXTERN_API( ComponentResult )
  382. MediaQueueNonPrimarySourceData  (MediaHandler           mh,
  383.                                  long                   inputIndex,
  384.                                  long                   dataDescriptionSeed,
  385.                                  Handle                 dataDescription,
  386.                                  void *                 data,
  387.                                  long                   dataSize,
  388.                                  ICMCompletionProcRecordPtr  asyncCompletionProc,
  389.                                  const ICMFrameTimeRecord * frameTime,
  390.                                  ICMConvertDataFormatUPP  transferProc,
  391.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0024, 0x0540, 0x7000, 0xA82A);
  392. EXTERN_API( ComponentResult )
  393. MediaFlushNonPrimarySourceData  (MediaHandler           mh,
  394.                                  long                   inputIndex)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0541, 0x7000, 0xA82A);
  395. EXTERN_API( ComponentResult )
  396. MediaGetURLLink                 (MediaHandler           mh,
  397.                                  Point                  displayWhere,
  398.                                  Handle *               urlLink)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0543, 0x7000, 0xA82A);
  399. EXTERN_API( ComponentResult )
  400. MediaMakeMediaTimeTable         (MediaHandler           mh,
  401.                                  long **                offsets,
  402.                                  TimeValue              startTime,
  403.                                  TimeValue              endTime,
  404.                                  TimeValue              timeIncrement,
  405.                                  short                  firstDataRefIndex,
  406.                                  short                  lastDataRefIndex,
  407.                                  long *                 retDataRefSkew)                     FIVEWORDINLINE(0x2F3C, 0x0018, 0x0545, 0x7000, 0xA82A);
  408. EXTERN_API( ComponentResult )
  409. MediaHitTestForTargetRefCon     (MediaHandler           mh,
  410.                                  long                   flags,
  411.                                  Point                  loc,
  412.                                  long *                 targetRefCon)                       FIVEWORDINLINE(0x2F3C, 0x000C, 0x0546, 0x7000, 0xA82A);
  413. EXTERN_API( ComponentResult )
  414. MediaHitTestTargetRefCon        (MediaHandler           mh,
  415.                                  long                   targetRefCon,
  416.                                  long                   flags,
  417.                                  Point                  loc,
  418.                                  Boolean *              wasHit)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x0547, 0x7000, 0xA82A);
  419. EXTERN_API( ComponentResult )
  420. MediaGetActionsForQTEvent       (MediaHandler           mh,
  421.                                  QTEventRecordPtr       event,
  422.                                  long                   targetRefCon,
  423.                                  QTAtomContainer *      container,
  424.                                  QTAtom *               atom)                               FIVEWORDINLINE(0x2F3C, 0x0010, 0x0548, 0x7000, 0xA82A);
  425. EXTERN_API( ComponentResult )
  426. MediaDisposeTargetRefCon        (MediaHandler           mh,
  427.                                  long                   targetRefCon)                       FIVEWORDINLINE(0x2F3C, 0x0004, 0x0549, 0x7000, 0xA82A);
  428. EXTERN_API( ComponentResult )
  429. MediaTargetRefConsEqual         (MediaHandler           mh,
  430.                                  long                   firstRefCon,
  431.                                  long                   secondRefCon,
  432.                                  Boolean *              equal)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x054A, 0x7000, 0xA82A);
  433. EXTERN_API( ComponentResult )
  434. MediaSetActionsCallback         (MediaHandler           mh,
  435.                                  ActionsUPP             actionsCallbackProc,
  436.                                  void *                 refcon)                             FIVEWORDINLINE(0x2F3C, 0x0008, 0x054B, 0x7000, 0xA82A);
  437. EXTERN_API( ComponentResult )
  438. MediaPrePrerollBegin            (MediaHandler           mh,
  439.                                  TimeValue              time,
  440.                                  Fixed                  rate,
  441.                                  PrePrerollCompleteUPP  completeProc,
  442.                                  void *                 refcon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x054C, 0x7000, 0xA82A);
  443. EXTERN_API( ComponentResult )
  444. MediaPrePrerollCancel           (MediaHandler           mh,
  445.                                  void *                 refcon)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x054D, 0x7000, 0xA82A);
  446. EXTERN_API( ComponentResult )
  447. MediaEnterEmptyEdit             (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x054F, 0x7000, 0xA82A);
  448. EXTERN_API( ComponentResult )
  449. MediaCurrentMediaQueuedData     (MediaHandler           mh,
  450.                                  long *                 milliSecs)                          FIVEWORDINLINE(0x2F3C, 0x0004, 0x0550, 0x7000, 0xA82A);
  451. EXTERN_API( ComponentResult )
  452. MediaGetEffectiveVolume         (MediaHandler           mh,
  453.                                  short *                volume)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0551, 0x7000, 0xA82A);
  454. EXTERN_API( ComponentResult )
  455. MediaResolveTargetRefCon        (MediaHandler           mh,
  456.                                  QTAtomContainer        container,
  457.                                  QTAtom                 atom,
  458.                                  long *                 targetRefCon)                       FIVEWORDINLINE(0x2F3C, 0x000C, 0x0552, 0x7000, 0xA82A);
  459. EXTERN_API( ComponentResult )
  460. MediaGetSoundLevelMeteringEnabled (MediaHandler         mh,
  461.                                  Boolean *              enabled)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0553, 0x7000, 0xA82A);
  462. EXTERN_API( ComponentResult )
  463. MediaSetSoundLevelMeteringEnabled (MediaHandler         mh,
  464.                                  Boolean                enable)                             FIVEWORDINLINE(0x2F3C, 0x0002, 0x0554, 0x7000, 0xA82A);
  465. EXTERN_API( ComponentResult )
  466. MediaGetSoundLevelMeterInfo     (MediaHandler           mh,
  467.                                  LevelMeterInfoPtr      levelInfo)                          FIVEWORDINLINE(0x2F3C, 0x0004, 0x0555, 0x7000, 0xA82A);
  468. EXTERN_API( ComponentResult )
  469. MediaGetEffectiveSoundBalance   (MediaHandler           mh,
  470.                                  short *                balance)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0556, 0x7000, 0xA82A);
  471. EXTERN_API( ComponentResult )
  472. MediaSetScreenLock              (MediaHandler           mh,
  473.                                  Boolean                lockIt)                             FIVEWORDINLINE(0x2F3C, 0x0002, 0x0557, 0x7000, 0xA82A);
  474. EXTERN_API( ComponentResult )
  475. MediaSetDoMCActionCallback      (MediaHandler           mh,
  476.                                  DoMCActionUPP          doMCActionCallbackProc,
  477.                                  void *                 refcon)                             FIVEWORDINLINE(0x2F3C, 0x0008, 0x0558, 0x7000, 0xA82A);
  478. EXTERN_API( ComponentResult )
  479. MediaGetErrorString             (MediaHandler           mh,
  480.                                  ComponentResult        theError,
  481.                                  Str255                 errorString)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0559, 0x7000, 0xA82A);
  482. EXTERN_API( ComponentResult )
  483. MediaGetSoundEqualizerBands     (MediaHandler           mh,
  484.                                  MediaEQSpectrumBandsRecordPtr  spectrumInfo)               FIVEWORDINLINE(0x2F3C, 0x0004, 0x055A, 0x7000, 0xA82A);
  485. EXTERN_API( ComponentResult )
  486. MediaSetSoundEqualizerBands     (MediaHandler           mh,
  487.                                  MediaEQSpectrumBandsRecordPtr  spectrumInfo)               FIVEWORDINLINE(0x2F3C, 0x0004, 0x055B, 0x7000, 0xA82A);
  488. EXTERN_API( ComponentResult )
  489. MediaGetSoundEqualizerBandLevels (MediaHandler          mh,
  490.                                  UInt8 *                bandLevels)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x055C, 0x7000, 0xA82A);
  491. EXTERN_API( ComponentResult )
  492. MediaDoIdleActions              (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x055D, 0x7000, 0xA82A);
  493. EXTERN_API( ComponentResult )
  494. MediaSetSoundBassAndTreble      (MediaHandler           mh,
  495.                                  short                  bass,
  496.                                  short                  treble)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x055E, 0x7000, 0xA82A);
  497. EXTERN_API( ComponentResult )
  498. MediaGetSoundBassAndTreble      (MediaHandler           mh,
  499.                                  short *                bass,
  500.                                  short *                treble)                             FIVEWORDINLINE(0x2F3C, 0x0008, 0x055F, 0x7000, 0xA82A);
  501. EXTERN_API( ComponentResult )
  502. MediaTimeBaseChanged            (MediaHandler           mh)                                 FIVEWORDINLINE(0x2F3C, 0x0000, 0x0560, 0x7000, 0xA82A);
  503. EXTERN_API( ComponentResult )
  504. MediaMCIsPlayerEvent            (MediaHandler           mh,
  505.                                  const EventRecord *    e,
  506.                                  Boolean *              handledIt)                          FIVEWORDINLINE(0x2F3C, 0x0008, 0x0561, 0x7000, 0xA82A);
  507. EXTERN_API( ComponentResult )
  508. MediaGetMediaLoadState          (MediaHandler           mh,
  509.                                  long *                 mediaLoadState)                     FIVEWORDINLINE(0x2F3C, 0x0004, 0x0562, 0x7000, 0xA82A);
  510. EXTERN_API( ComponentResult )
  511. MediaVideoOutputChanged         (MediaHandler           mh,
  512.                                  ComponentInstance      vout)                               FIVEWORDINLINE(0x2F3C, 0x0004, 0x0563, 0x7000, 0xA82A);
  513. EXTERN_API( ComponentResult )
  514. MediaEmptySampleCache           (MediaHandler           mh,
  515.                                  long                   sampleNum,
  516.                                  long                   sampleCount)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0564, 0x7000, 0xA82A);
  517. EXTERN_API( ComponentResult )
  518. MediaGetPublicInfo              (MediaHandler           mh,
  519.                                  OSType                 infoSelector,
  520.                                  void *                 infoDataPtr,
  521.                                  Size *                 ioDataSize)                         FIVEWORDINLINE(0x2F3C, 0x000C, 0x0565, 0x7000, 0xA82A);
  522. EXTERN_API( ComponentResult )
  523. MediaSetPublicInfo              (MediaHandler           mh,
  524.                                  OSType                 infoSelector,
  525.                                  void *                 infoDataPtr,
  526.                                  Size                   dataSize)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x0566, 0x7000, 0xA82A);
  527. EXTERN_API( ComponentResult )
  528. MediaGetUserPreferredCodecs     (MediaHandler           mh,
  529.                                  CodecComponentHandle * userPreferredCodecs)                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0567, 0x7000, 0xA82A);
  530. EXTERN_API( ComponentResult )
  531. MediaSetUserPreferredCodecs     (MediaHandler           mh,
  532.                                  CodecComponentHandle   userPreferredCodecs)                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0568, 0x7000, 0xA82A);
  533. /* Keyboard Focus Support*/
  534. EXTERN_API( ComponentResult )
  535. MediaRefConSetProperty          (MediaHandler           mh,
  536.                                  long                   refCon,
  537.                                  long                   propertyType,
  538.                                  void *                 propertyValue)                      FIVEWORDINLINE(0x2F3C, 0x000C, 0x0569, 0x7000, 0xA82A);
  539. EXTERN_API( ComponentResult )
  540. MediaRefConGetProperty          (MediaHandler           mh,
  541.                                  long                   refCon,
  542.                                  long                   propertyType,
  543.                                  void *                 propertyValue)                      FIVEWORDINLINE(0x2F3C, 0x000C, 0x056A, 0x7000, 0xA82A);
  544. EXTERN_API( ComponentResult )
  545. MediaNavigateTargetRefCon       (MediaHandler           mh,
  546.                                  long                   navigation,
  547.                                  long *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0008, 0x056B, 0x7000, 0xA82A);
  548. EXTERN_API( ComponentResult )
  549. MediaGGetIdleManager            (MediaHandler           mh,
  550.                                  IdleManager *          pim)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x056C, 0x7000, 0xA82A);
  551. EXTERN_API( ComponentResult )
  552. MediaGSetIdleManager            (MediaHandler           mh,
  553.                                  IdleManager            im)                                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x056D, 0x7000, 0xA82A);
  554. /* selectors for component calls */
  555. enum {
  556.     kCallComponentExecuteWiredActionSelect     = -9,
  557.     kMediaSetChunkManagementFlagsSelect        = 0x0415,
  558.     kMediaGetChunkManagementFlagsSelect        = 0x0416,
  559.     kMediaSetPurgeableChunkMemoryAllowanceSelect = 0x0417,
  560.     kMediaGetPurgeableChunkMemoryAllowanceSelect = 0x0418,
  561.     kMediaEmptyAllPurgeableChunksSelect        = 0x0419,
  562.     kMediaInitializeSelect                     = 0x0501,
  563.     kMediaSetHandlerCapabilitiesSelect         = 0x0502,
  564.     kMediaIdleSelect                           = 0x0503,
  565.     kMediaGetMediaInfoSelect                   = 0x0504,
  566.     kMediaPutMediaInfoSelect                   = 0x0505,
  567.     kMediaSetActiveSelect                      = 0x0506,
  568.     kMediaSetRateSelect                        = 0x0507,
  569.     kMediaGGetStatusSelect                     = 0x0508,
  570.     kMediaTrackEditedSelect                    = 0x0509,
  571.     kMediaSetMediaTimeScaleSelect              = 0x050A,
  572.     kMediaSetMovieTimeScaleSelect              = 0x050B,
  573.     kMediaSetGWorldSelect                      = 0x050C,
  574.     kMediaSetDimensionsSelect                  = 0x050D,
  575.     kMediaSetClipSelect                        = 0x050E,
  576.     kMediaSetMatrixSelect                      = 0x050F,
  577.     kMediaGetTrackOpaqueSelect                 = 0x0510,
  578.     kMediaSetGraphicsModeSelect                = 0x0511,
  579.     kMediaGetGraphicsModeSelect                = 0x0512,
  580.     kMediaGSetVolumeSelect                     = 0x0513,
  581.     kMediaSetSoundBalanceSelect                = 0x0514,
  582.     kMediaGetSoundBalanceSelect                = 0x0515,
  583.     kMediaGetNextBoundsChangeSelect            = 0x0516,
  584.     kMediaGetSrcRgnSelect                      = 0x0517,
  585.     kMediaPrerollSelect                        = 0x0518,
  586.     kMediaSampleDescriptionChangedSelect       = 0x0519,
  587.     kMediaHasCharacteristicSelect              = 0x051A,
  588.     kMediaGetOffscreenBufferSizeSelect         = 0x051B,
  589.     kMediaSetHintsSelect                       = 0x051C,
  590.     kMediaGetNameSelect                        = 0x051D,
  591.     kMediaForceUpdateSelect                    = 0x051E,
  592.     kMediaGetDrawingRgnSelect                  = 0x051F,
  593.     kMediaGSetActiveSegmentSelect              = 0x0520,
  594.     kMediaInvalidateRegionSelect               = 0x0521,
  595.     kMediaGetNextStepTimeSelect                = 0x0522,
  596.     kMediaSetNonPrimarySourceDataSelect        = 0x0523,
  597.     kMediaChangedNonPrimarySourceSelect        = 0x0524,
  598.     kMediaTrackReferencesChangedSelect         = 0x0525,
  599.     kMediaGetSampleDataPointerSelect           = 0x0526,
  600.     kMediaReleaseSampleDataPointerSelect       = 0x0527,
  601.     kMediaTrackPropertyAtomChangedSelect       = 0x0528,
  602.     kMediaSetTrackInputMapReferenceSelect      = 0x0529,
  603.     kMediaSetVideoParamSelect                  = 0x052B,
  604.     kMediaGetVideoParamSelect                  = 0x052C,
  605.     kMediaCompareSelect                        = 0x052D,
  606.     kMediaGetClockSelect                       = 0x052E,
  607.     kMediaSetSoundOutputComponentSelect        = 0x052F,
  608.     kMediaGetSoundOutputComponentSelect        = 0x0530,
  609.     kMediaSetSoundLocalizationDataSelect       = 0x0531,
  610.     kMediaGetInvalidRegionSelect               = 0x053C,
  611.     kMediaSampleDescriptionB2NSelect           = 0x053E,
  612.     kMediaSampleDescriptionN2BSelect           = 0x053F,
  613.     kMediaQueueNonPrimarySourceDataSelect      = 0x0540,
  614.     kMediaFlushNonPrimarySourceDataSelect      = 0x0541,
  615.     kMediaGetURLLinkSelect                     = 0x0543,
  616.     kMediaMakeMediaTimeTableSelect             = 0x0545,
  617.     kMediaHitTestForTargetRefConSelect         = 0x0546,
  618.     kMediaHitTestTargetRefConSelect            = 0x0547,
  619.     kMediaGetActionsForQTEventSelect           = 0x0548,
  620.     kMediaDisposeTargetRefConSelect            = 0x0549,
  621.     kMediaTargetRefConsEqualSelect             = 0x054A,
  622.     kMediaSetActionsCallbackSelect             = 0x054B,
  623.     kMediaPrePrerollBeginSelect                = 0x054C,
  624.     kMediaPrePrerollCancelSelect               = 0x054D,
  625.     kMediaEnterEmptyEditSelect                 = 0x054F,
  626.     kMediaCurrentMediaQueuedDataSelect         = 0x0550,
  627.     kMediaGetEffectiveVolumeSelect             = 0x0551,
  628.     kMediaResolveTargetRefConSelect            = 0x0552,
  629.     kMediaGetSoundLevelMeteringEnabledSelect   = 0x0553,
  630.     kMediaSetSoundLevelMeteringEnabledSelect   = 0x0554,
  631.     kMediaGetSoundLevelMeterInfoSelect         = 0x0555,
  632.     kMediaGetEffectiveSoundBalanceSelect       = 0x0556,
  633.     kMediaSetScreenLockSelect                  = 0x0557,
  634.     kMediaSetDoMCActionCallbackSelect          = 0x0558,
  635.     kMediaGetErrorStringSelect                 = 0x0559,
  636.     kMediaGetSoundEqualizerBandsSelect         = 0x055A,
  637.     kMediaSetSoundEqualizerBandsSelect         = 0x055B,
  638.     kMediaGetSoundEqualizerBandLevelsSelect    = 0x055C,
  639.     kMediaDoIdleActionsSelect                  = 0x055D,
  640.     kMediaSetSoundBassAndTrebleSelect          = 0x055E,
  641.     kMediaGetSoundBassAndTrebleSelect          = 0x055F,
  642.     kMediaTimeBaseChangedSelect                = 0x0560,
  643.     kMediaMCIsPlayerEventSelect                = 0x0561,
  644.     kMediaGetMediaLoadStateSelect              = 0x0562,
  645.     kMediaVideoOutputChangedSelect             = 0x0563,
  646.     kMediaEmptySampleCacheSelect               = 0x0564,
  647.     kMediaGetPublicInfoSelect                  = 0x0565,
  648.     kMediaSetPublicInfoSelect                  = 0x0566,
  649.     kMediaGetUserPreferredCodecsSelect         = 0x0567,
  650.     kMediaSetUserPreferredCodecsSelect         = 0x0568,
  651.     kMediaRefConSetPropertySelect              = 0x0569,
  652.     kMediaRefConGetPropertySelect              = 0x056A,
  653.     kMediaNavigateTargetRefConSelect           = 0x056B,
  654.     kMediaGGetIdleManagerSelect                = 0x056C,
  655.     kMediaGSetIdleManagerSelect                = 0x056D
  656. };
  657. #if OPAQUE_UPP_TYPES
  658.     EXTERN_API(PrePrerollCompleteUPP)
  659.     NewPrePrerollCompleteUPP       (PrePrerollCompleteProcPtr userRoutine);
  660.     EXTERN_API(void)
  661.     DisposePrePrerollCompleteUPP    (PrePrerollCompleteUPP  userUPP);
  662.     EXTERN_API(void)
  663.     InvokePrePrerollCompleteUPP    (MediaHandler            mh,
  664.                                     OSErr                   err,
  665.                                     void *                  refcon,
  666.                                     PrePrerollCompleteUPP   userUPP);
  667. #else
  668.     enum { uppPrePrerollCompleteProcInfo = 0x00000EC0 };            /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
  669.     #define NewPrePrerollCompleteUPP(userRoutine)                   (PrePrerollCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPrePrerollCompleteProcInfo, GetCurrentArchitecture())
  670.     #define DisposePrePrerollCompleteUPP(userUPP)                   DisposeRoutineDescriptor(userUPP)
  671.     #define InvokePrePrerollCompleteUPP(mh, err, refcon, userUPP)   CALL_THREE_PARAMETER_UPP((userUPP), uppPrePrerollCompleteProcInfo, (mh), (err), (refcon))
  672. #endif
  673. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  674. #define NewPrePrerollCompleteProc(userRoutine)                  NewPrePrerollCompleteUPP(userRoutine)
  675. #define CallPrePrerollCompleteProc(userRoutine, mh, err, refcon) InvokePrePrerollCompleteUPP(mh, err, refcon, userRoutine)
  676. #if PRAGMA_STRUCT_ALIGN
  677.     #pragma options align=reset
  678. #elif PRAGMA_STRUCT_PACKPUSH
  679.     #pragma pack(pop)
  680. #elif PRAGMA_STRUCT_PACK
  681.     #pragma pack()
  682. #endif
  683. #ifdef PRAGMA_IMPORT_OFF
  684. #pragma import off
  685. #elif PRAGMA_IMPORT
  686. #pragma import reset
  687. #endif
  688. #ifdef __cplusplus
  689. }
  690. #endif
  691. #endif /* __MEDIAHANDLERS__ */