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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       QuickTimeStreaming.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 __QUICKTIMESTREAMING__
  18. #define __QUICKTIMESTREAMING__
  19. #ifndef __QUICKDRAW__
  20. #include "Quickdraw.h"
  21. #endif
  22. #ifndef __COMPONENTS__
  23. #include "Components.h"
  24. #endif
  25. #ifndef __MOVIES__
  26. #include "Movies.h"
  27. #endif
  28. #ifndef __QUICKTIMECOMPONENTS__
  29. #include "QuickTimeComponents.h"
  30. #endif
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47. enum {
  48.     kQTSInfiniteDuration        = 0x7FFFFFFF,
  49.     kQTSUnknownDuration         = 0x00000000,
  50.     kQTSNormalForwardRate       = 0x00010000,
  51.     kQTSStoppedRate             = 0x00000000
  52. };
  53. struct QTSPresentationRecord {
  54.     long                            data[1];
  55. };
  56. typedef struct QTSPresentationRecord    QTSPresentationRecord;
  57. typedef QTSPresentationRecord *         QTSPresentation;
  58. struct QTSStreamRecord {
  59.     long                            data[1];
  60. };
  61. typedef struct QTSStreamRecord          QTSStreamRecord;
  62. typedef QTSStreamRecord *               QTSStream;
  63. struct QTSEditEntry {
  64.     TimeValue64                     presentationDuration;
  65.     TimeValue64                     streamStartTime;
  66.     Fixed                           streamRate;
  67. };
  68. typedef struct QTSEditEntry             QTSEditEntry;
  69. struct QTSEditList {
  70.     SInt32                          numEdits;
  71.     QTSEditEntry                    edits[1];
  72. };
  73. typedef struct QTSEditList              QTSEditList;
  74. typedef QTSEditList *                   QTSEditListPtr;
  75. typedef QTSEditListPtr *                QTSEditListHandle;
  76. #define kQTSInvalidPresentation     (QTSPresentation)0L
  77. #define kQTSAllPresentations        (QTSPresentation)0L
  78. #define kQTSInvalidStream           (QTSStream)0L
  79. #define kQTSAllStreams              (QTSStream)0L
  80. typedef CALLBACK_API( ComponentResult , QTSNotificationProcPtr )(ComponentResult inErr, OSType inNotificationType, void *inNotificationParams, void *inRefCon);
  81. typedef STACK_UPP_TYPE(QTSNotificationProcPtr)                  QTSNotificationUPP;
  82. /*-----------------------------------------
  83.     Get / Set Info
  84. -----------------------------------------*/
  85. enum {
  86.     kQTSGetURLLink              = FOUR_CHAR_CODE('gull')        /* QTSGetURLLinkRecord* */
  87. };
  88. /* get and set */
  89. enum {
  90.     kQTSTargetBufferDurationInfo = FOUR_CHAR_CODE('bufr'),      /* Fixed* in seconds; expected, not actual */
  91.     kQTSDurationInfo            = FOUR_CHAR_CODE('dura'),       /* QTSDurationAtom* */
  92.     kQTSSoundLevelMeteringEnabledInfo = FOUR_CHAR_CODE('mtrn'), /* Boolean* */
  93.     kQTSSoundLevelMeterInfo     = FOUR_CHAR_CODE('levm'),       /* LevelMeterInfoPtr */
  94.     kQTSSourceTrackIDInfo       = FOUR_CHAR_CODE('otid'),       /* UInt32* */
  95.     kQTSSourceLayerInfo         = FOUR_CHAR_CODE('olyr'),       /* UInt16* */
  96.     kQTSSourceLanguageInfo      = FOUR_CHAR_CODE('olng'),       /* UInt16* */
  97.     kQTSSourceTrackFlagsInfo    = FOUR_CHAR_CODE('otfl'),       /* SInt32* */
  98.     kQTSSourceDimensionsInfo    = FOUR_CHAR_CODE('odim'),       /* QTSDimensionParams* */
  99.     kQTSSourceVolumesInfo       = FOUR_CHAR_CODE('ovol'),       /* QTSVolumesParams* */
  100.     kQTSSourceMatrixInfo        = FOUR_CHAR_CODE('omat'),       /* MatrixRecord* */
  101.     kQTSSourceClipRectInfo      = FOUR_CHAR_CODE('oclp'),       /* Rect* */
  102.     kQTSSourceGraphicsModeInfo  = FOUR_CHAR_CODE('ogrm'),       /* QTSGraphicsModeParams* */
  103.     kQTSSourceScaleInfo         = FOUR_CHAR_CODE('oscl'),       /* Point* */
  104.     kQTSSourceBoundingRectInfo  = FOUR_CHAR_CODE('orct'),       /* Rect* */
  105.     kQTSSourceUserDataInfo      = FOUR_CHAR_CODE('oudt'),       /* UserData */
  106.     kQTSSourceInputMapInfo      = FOUR_CHAR_CODE('oimp'),       /* QTAtomContainer */
  107.     kQTSInfo_DataProc           = FOUR_CHAR_CODE('datp'),       /* QTSDataProcParams* */
  108.     kQTSInfo_SendDataExtras     = FOUR_CHAR_CODE('dext'),       /* QTSSendDataExtrasParams* */
  109.     kQTSInfo_HintTrackID        = FOUR_CHAR_CODE('htid'),       /* long* */
  110.     kQTSInfo_URL                = FOUR_CHAR_CODE('url '),       /* Handle*, cstring in handle */
  111.     kQTSInfo_Authentication     = FOUR_CHAR_CODE('auup'),       /* QTSAuthenticationParams */
  112.     kQTSInfo_MediaPacketizer    = FOUR_CHAR_CODE('rmpk')        /* ComponentInstance */
  113. };
  114. /* get only */
  115. enum {
  116.     kQTSStatisticsInfo          = FOUR_CHAR_CODE('stat'),       /* QTSStatisticsParams* */
  117.     kQTSMinStatusDimensionsInfo = FOUR_CHAR_CODE('mstd'),       /* QTSDimensionParams* */
  118.     kQTSNormalStatusDimensionsInfo = FOUR_CHAR_CODE('nstd'),    /* QTSDimensionParams* */
  119.     kQTSTotalDataRateInfo       = FOUR_CHAR_CODE('drtt'),       /* UInt32*, add to what's there */
  120.     kQTSTotalDataRateInInfo     = FOUR_CHAR_CODE('drti'),       /* UInt32*, add to what's there */
  121.     kQTSTotalDataRateOutInfo    = FOUR_CHAR_CODE('drto'),       /* UInt32*, add to what's there */
  122.     kQTSLostPercentInfo         = FOUR_CHAR_CODE('lpct'),       /* QTSLostPercentParams*, add to what's there */
  123.     kQTSNumViewersInfo          = FOUR_CHAR_CODE('nviw'),       /* UInt32* */
  124.     kQTSMediaTypeInfo           = FOUR_CHAR_CODE('mtyp'),       /* OSType* */
  125.     kQTSNameInfo                = FOUR_CHAR_CODE('name'),       /* QTSNameParams* */
  126.     kQTSCanHandleSendDataType   = FOUR_CHAR_CODE('chsd'),       /* QTSCanHandleSendDataTypeParams* */
  127.     kQTSAnnotationsInfo         = FOUR_CHAR_CODE('meta'),       /* QTAtomContainer */
  128.     kQTSRemainingBufferTimeInfo = FOUR_CHAR_CODE('btms'),       /* UInt32* remaining buffer time before playback, in microseconds */
  129.     kQTSInfo_SettingsText       = FOUR_CHAR_CODE('sttx'),       /* QTSSettingsTextParams* */
  130.     kQTSInfo_AverageFrameRate   = FOUR_CHAR_CODE('fps ')        /* UnsignedFixed* */
  131. };
  132. struct QTSAuthenticationParams {
  133.     SInt32                          flags;
  134.     const char *                    userID;                     /* caller disposes of pointer*/
  135.     const char *                    password;                   /* caller disposes of pointer*/
  136. };
  137. typedef struct QTSAuthenticationParams  QTSAuthenticationParams;
  138. enum {
  139.     kQTSTargetBufferDurationTimeScale = 1000
  140. };
  141. struct QTSPanelFilterParams {
  142.     SInt32                          version;
  143.     QTSStream                       inStream;
  144.     OSType                          inPanelType;
  145.     OSType                          inPanelSubType;
  146.     QTAtomSpec                      details;
  147. };
  148. typedef struct QTSPanelFilterParams     QTSPanelFilterParams;
  149. /* return true to keep this panel*/
  150. typedef CALLBACK_API( Boolean , QTSPanelFilterProcPtr )(QTSPanelFilterParams *inParams, void *inRefCon);
  151. typedef STACK_UPP_TYPE(QTSPanelFilterProcPtr)                   QTSPanelFilterUPP;
  152. enum {
  153.     kQTSSettingsTextSummary     = FOUR_CHAR_CODE('set1'),
  154.     kQTSSettingsTextDetails     = FOUR_CHAR_CODE('setd')
  155. };
  156. struct QTSSettingsTextParams {
  157.     SInt32                          flags;                      /* None yet defined*/
  158.     OSType                          inSettingsSelector;         /* which kind of setting you want from enum above*/
  159.     Handle                          outSettingsAsText;          /* QTS allocates; Caller disposes*/
  160.     QTSPanelFilterUPP               inPanelFilterProc;          /* To get a subset filter with this   */
  161.     void *                          inPanelFilterProcRefCon;
  162. };
  163. typedef struct QTSSettingsTextParams    QTSSettingsTextParams;
  164. struct QTSCanHandleSendDataTypeParams {
  165.     SInt32                          modifierTypeOrInputID;
  166.     Boolean                         isModifierType;
  167.     Boolean                         returnedCanHandleSendDataType; /* callee sets to true if it can handle it*/
  168. };
  169. typedef struct QTSCanHandleSendDataTypeParams QTSCanHandleSendDataTypeParams;
  170. struct QTSNameParams {
  171.     SInt32                          maxNameLength;
  172.     SInt32                          requestedLanguage;
  173.     SInt32                          returnedActualLanguage;
  174.     unsigned char *                 returnedName;               /* pascal string; caller supplies*/
  175. };
  176. typedef struct QTSNameParams            QTSNameParams;
  177. struct QTSLostPercentParams {
  178.     UInt32                          receivedPkts;
  179.     UInt32                          lostPkts;
  180.     Fixed                           percent;
  181. };
  182. typedef struct QTSLostPercentParams     QTSLostPercentParams;
  183. struct QTSDimensionParams {
  184.     Fixed                           width;
  185.     Fixed                           height;
  186. };
  187. typedef struct QTSDimensionParams       QTSDimensionParams;
  188. struct QTSVolumesParams {
  189.     SInt16                          leftVolume;
  190.     SInt16                          rightVolume;
  191. };
  192. typedef struct QTSVolumesParams         QTSVolumesParams;
  193. struct QTSGraphicsModeParams {
  194.     SInt16                          graphicsMode;
  195.     RGBColor                        opColor;
  196. };
  197. typedef struct QTSGraphicsModeParams    QTSGraphicsModeParams;
  198. struct QTSGetURLLinkRecord {
  199.     Point                           displayWhere;
  200.     Handle                          returnedURLLink;
  201. };
  202. typedef struct QTSGetURLLinkRecord      QTSGetURLLinkRecord;
  203. enum {
  204.     kQTSDataProcParamsVersion1  = 1
  205. };
  206. enum {
  207.     kQTSDataProcType_MediaSample = FOUR_CHAR_CODE('mdia'),
  208.     kQTSDataProcType_HintSample = FOUR_CHAR_CODE('hint')
  209. };
  210. struct QTSDataProcParams {
  211.     SInt32                          version;
  212.     SInt32                          flags;
  213.     QTSStream                       stream;
  214.     OSType                          procType;
  215.     QTSNotificationUPP              proc;
  216.     void *                          procRefCon;
  217. };
  218. typedef struct QTSDataProcParams        QTSDataProcParams;
  219. enum {
  220.     kQTSDataProcSelector_SampleData = FOUR_CHAR_CODE('samp'),
  221.     kQTSDataProcSelector_UserData = FOUR_CHAR_CODE('user')
  222. };
  223. enum {
  224.     kQTSSampleDataCallbackParamsVersion1 = 1
  225. };
  226. struct QTSSampleDataCallbackParams {
  227.     SInt32                          version;
  228.     SInt32                          flags;
  229.     QTSStream                       stream;
  230.     OSType                          procType;
  231.     OSType                          mediaType;
  232.     TimeScale                       mediaTimeScale;
  233.     SampleDescriptionHandle         sampleDesc;
  234.     UInt32                          sampleDescSeed;
  235.     TimeValue64                     sampleTime;
  236.     TimeValue64                     duration;                   /* could be 0 */
  237.     SInt32                          sampleFlags;
  238.     UInt32                          dataLength;
  239.     const void *                    data;
  240. };
  241. typedef struct QTSSampleDataCallbackParams QTSSampleDataCallbackParams;
  242. enum {
  243.     kQTSUserDataCallbackParamsVersion1 = 1
  244. };
  245. struct QTSUserDataCallbackParams {
  246.     SInt32                          version;
  247.     SInt32                          flags;
  248.     QTSStream                       stream;
  249.     OSType                          procType;
  250.     OSType                          userDataType;
  251.     Handle                          userDataHandle;             /* caller must make copy if it wants to keep the data around*/
  252. };
  253. typedef struct QTSUserDataCallbackParams QTSUserDataCallbackParams;
  254. enum {
  255.     kQTSSendDataExtrasParamsVersion1 = 1
  256. };
  257. struct QTSSendDataExtrasParams {
  258.     SInt32                          version;
  259.     SInt32                          flags;
  260.     OSType                          procType;
  261. };
  262. typedef struct QTSSendDataExtrasParams  QTSSendDataExtrasParams;
  263. typedef CALLBACK_API( Boolean , QTSModalFilterProcPtr )(DialogPtr inDialog, const EventRecord *inEvent, SInt16 *ioItemHit, void *inRefCon);
  264. typedef STACK_UPP_TYPE(QTSModalFilterProcPtr)                   QTSModalFilterUPP;
  265. /*-----------------------------------------
  266.     Characteristics
  267. -----------------------------------------*/
  268. /* characteristics in Movies.h work here too */
  269. enum {
  270.     kQTSSupportsPerStreamControlCharacteristic = FOUR_CHAR_CODE('psct')
  271. };
  272. struct QTSVideoParams {
  273.     Fixed                           width;
  274.     Fixed                           height;
  275.     MatrixRecord                    matrix;
  276.     CGrafPtr                        gWorld;
  277.     GDHandle                        gdHandle;
  278.     RgnHandle                       clip;
  279.     short                           graphicsMode;
  280.     RGBColor                        opColor;
  281. };
  282. typedef struct QTSVideoParams           QTSVideoParams;
  283. struct QTSAudioParams {
  284.     SInt16                          leftVolume;
  285.     SInt16                          rightVolume;
  286.     SInt16                          bassLevel;
  287.     SInt16                          trebleLevel;
  288.     short                           frequencyBandsCount;
  289.     void *                          frequencyBands;
  290.     Boolean                         levelMeteringEnabled;
  291. };
  292. typedef struct QTSAudioParams           QTSAudioParams;
  293. struct QTSMediaParams {
  294.     QTSVideoParams                  v;
  295.     QTSAudioParams                  a;
  296. };
  297. typedef struct QTSMediaParams           QTSMediaParams;
  298. enum {
  299.     kQTSMustDraw                = 1 << 3,
  300.     kQTSAtEnd                   = 1 << 4,
  301.     kQTSPreflightDraw           = 1 << 5,
  302.     kQTSSyncDrawing             = 1 << 6
  303. };
  304. /* media task result flags */
  305. enum {
  306.     kQTSDidDraw                 = 1 << 0,
  307.     kQTSNeedsToDraw             = 1 << 2,
  308.     kQTSDrawAgain               = 1 << 3,
  309.     kQTSPartialDraw             = 1 << 4
  310. };
  311. /*============================================================================
  312.         Notifications
  313. ============================================================================*/
  314. /* ------ notification types ------ */
  315. enum {
  316.     kQTSNullNotification        = FOUR_CHAR_CODE('null'),       /* NULL */
  317.     kQTSErrorNotification       = FOUR_CHAR_CODE('err '),       /* QTSErrorParams*, optional */
  318.     kQTSNewPresDetectedNotification = FOUR_CHAR_CODE('newp'),   /* QTSNewPresDetectedParams* */
  319.     kQTSPresBeginChangingNotification = FOUR_CHAR_CODE('prcb'), /* NULL */
  320.     kQTSPresDoneChangingNotification = FOUR_CHAR_CODE('prcd'),  /* NULL */
  321.     kQTSPresentationChangedNotification = FOUR_CHAR_CODE('prch'), /* NULL */
  322.     kQTSNewStreamNotification   = FOUR_CHAR_CODE('stnw'),       /* QTSNewStreamParams* */
  323.     kQTSStreamBeginChangingNotification = FOUR_CHAR_CODE('stcb'), /* QTSStream */
  324.     kQTSStreamDoneChangingNotification = FOUR_CHAR_CODE('stcd'), /* QTSStream */
  325.     kQTSStreamChangedNotification = FOUR_CHAR_CODE('stch'),     /* QTSStreamChangedParams* */
  326.     kQTSStreamGoneNotification  = FOUR_CHAR_CODE('stgn'),       /* QTSStreamGoneParams* */
  327.     kQTSPreviewAckNotification  = FOUR_CHAR_CODE('pvak'),       /* QTSStream */
  328.     kQTSPrerollAckNotification  = FOUR_CHAR_CODE('pack'),       /* QTSStream */
  329.     kQTSStartAckNotification    = FOUR_CHAR_CODE('sack'),       /* QTSStream */
  330.     kQTSStopAckNotification     = FOUR_CHAR_CODE('xack'),       /* QTSStream */
  331.     kQTSStatusNotification      = FOUR_CHAR_CODE('stat'),       /* QTSStatusParams* */
  332.     kQTSURLNotification         = FOUR_CHAR_CODE('url '),       /* QTSURLParams* */
  333.     kQTSDurationNotification    = FOUR_CHAR_CODE('dura'),       /* QTSDurationAtom* */
  334.     kQTSNewPresentationNotification = FOUR_CHAR_CODE('nprs'),   /* QTSPresentation */
  335.     kQTSPresentationGoneNotification = FOUR_CHAR_CODE('xprs'),  /* QTSPresentation */
  336.     kQTSPresentationDoneNotification = FOUR_CHAR_CODE('pdon'),  /* NULL */
  337.     kQTSBandwidthAlertNotification = FOUR_CHAR_CODE('bwal'),    /* QTSBandwidthAlertParams* */
  338.     kQTSAnnotationsChangedNotification = FOUR_CHAR_CODE('meta') /* NULL */
  339. };
  340. /* flags for QTSErrorParams */
  341. enum {
  342.     kQTSFatalErrorFlag          = 0x00000001
  343. };
  344. struct QTSErrorParams {
  345.     const char *                    errorString;
  346.     SInt32                          flags;
  347. };
  348. typedef struct QTSErrorParams           QTSErrorParams;
  349. struct QTSNewPresDetectedParams {
  350.     void *                          data;
  351. };
  352. typedef struct QTSNewPresDetectedParams QTSNewPresDetectedParams;
  353. struct QTSNewStreamParams {
  354.     QTSStream                       stream;
  355. };
  356. typedef struct QTSNewStreamParams       QTSNewStreamParams;
  357. struct QTSStreamChangedParams {
  358.     QTSStream                       stream;
  359.     ComponentInstance               mediaComponent;             /* could be NULL */
  360. };
  361. typedef struct QTSStreamChangedParams   QTSStreamChangedParams;
  362. struct QTSStreamGoneParams {
  363.     QTSStream                       stream;
  364. };
  365. typedef struct QTSStreamGoneParams      QTSStreamGoneParams;
  366. struct QTSStatusParams {
  367.     UInt32                          status;
  368.     const char *                    statusString;
  369.     UInt32                          detailedStatus;
  370.     const char *                    detailedStatusString;
  371. };
  372. typedef struct QTSStatusParams          QTSStatusParams;
  373. struct QTSInfoParams {
  374.     OSType                          infoType;
  375.     void *                          infoParams;
  376. };
  377. typedef struct QTSInfoParams            QTSInfoParams;
  378. struct QTSURLParams {
  379.     UInt32                          urlLength;
  380.     const char *                    url;
  381. };
  382. typedef struct QTSURLParams             QTSURLParams;
  383. enum {
  384.     kQTSBandwidthAlertNeedToStop = 1 << 0,
  385.     kQTSBandwidthAlertRestartAt = 1 << 1
  386. };
  387. struct QTSBandwidthAlertParams {
  388.     SInt32                          flags;
  389.     TimeValue                       restartAt;                  /* new field in QT 4.1*/
  390.     void *                          reserved;
  391. };
  392. typedef struct QTSBandwidthAlertParams  QTSBandwidthAlertParams;
  393. /*============================================================================
  394.         Presentation
  395. ============================================================================*/
  396. /*-----------------------------------------
  397.      Flags
  398. -----------------------------------------*/
  399. /* flags for NewPresentationFromData */
  400. enum {
  401.     kQTSAutoModeFlag            = 0x00000001,
  402.     kQTSDontShowStatusFlag      = 0x00000008,
  403.     kQTSSendMediaFlag           = 0x00010000,
  404.     kQTSReceiveMediaFlag        = 0x00020000
  405. };
  406. struct QTSNewPresentationParams {
  407.     OSType                          dataType;
  408.     const void *                    data;
  409.     UInt32                          dataLength;
  410.     QTSEditListHandle               editList;
  411.     SInt32                          flags;
  412.     TimeScale                       timeScale;                  /* set to 0 for default timescale */
  413.     QTSMediaParams *                mediaParams;
  414.     QTSNotificationUPP              notificationProc;
  415.     void *                          notificationRefCon;
  416. };
  417. typedef struct QTSNewPresentationParams QTSNewPresentationParams;
  418. struct QTSPresParams {
  419.     UInt32                          version;
  420.     QTSEditListHandle               editList;
  421.     SInt32                          flags;
  422.     TimeScale                       timeScale;                  /* set to 0 for default timescale */
  423.     QTSMediaParams *                mediaParams;
  424.     QTSNotificationUPP              notificationProc;
  425.     void *                          notificationRefCon;
  426. };
  427. typedef struct QTSPresParams            QTSPresParams;
  428. enum {
  429.     kQTSPresParamsVersion1      = 1
  430. };
  431. struct QTSPresIdleParams {
  432.     QTSStream                       stream;
  433.     TimeValue64                     movieTimeToDisplay;
  434.     SInt32                          flagsIn;
  435.     SInt32                          flagsOut;
  436. };
  437. typedef struct QTSPresIdleParams        QTSPresIdleParams;
  438. enum {
  439.     kQTSExportFlag_ShowDialog   = 0x00000001
  440. };
  441. enum {
  442.     kQTSExportParamsVersion1    = 1
  443. };
  444. struct QTSExportParams {
  445.     SInt32                          version;
  446.     OSType                          exportType;
  447.     void *                          exportExtraData;
  448.     OSType                          destinationContainerType;
  449.     void *                          destinationContainerData;
  450.     void *                          destinationContainerExtras;
  451.     SInt32                          flagsIn;
  452.     SInt32                          flagsOut;
  453.     QTSModalFilterUPP               filterProc;
  454.     void *                          filterProcRefCon;
  455.     Component                       exportComponent;            /* NULL unless you want to override */
  456. };
  457. typedef struct QTSExportParams          QTSExportParams;
  458. /*-----------------------------------------
  459.     Toolbox Init/Close
  460. -----------------------------------------*/
  461. /* all "apps" must call this */
  462. EXTERN_API_C( OSErr )
  463. InitializeQTS                   (void);
  464. EXTERN_API_C( OSErr )
  465. TerminateQTS                    (void);
  466. /*-----------------------------------------
  467.     Presentation Functions
  468. -----------------------------------------*/
  469. EXTERN_API_C( OSErr )
  470. QTSNewPresentation              (const QTSNewPresentationParams * inParams,
  471.                                  QTSPresentation *      outPresentation);
  472. EXTERN_API_C( OSErr )
  473. QTSNewPresentationFromData      (OSType                 inDataType,
  474.                                  const void *           inData,
  475.                                  const SInt64 *         inDataLength,
  476.                                  const QTSPresParams *  inPresParams,
  477.                                  QTSPresentation *      outPresentation);
  478. EXTERN_API_C( OSErr )
  479. QTSNewPresentationFromFile      (const FSSpec *         inFileSpec,
  480.                                  const QTSPresParams *  inPresParams,
  481.                                  QTSPresentation *      outPresentation);
  482. EXTERN_API_C( OSErr )
  483. QTSNewPresentationFromDataRef   (Handle                 inDataRef,
  484.                                  OSType                 inDataRefType,
  485.                                  const QTSPresParams *  inPresParams,
  486.                                  QTSPresentation *      outPresentation);
  487. EXTERN_API_C( OSErr )
  488. QTSDisposePresentation          (QTSPresentation        inPresentation,
  489.                                  SInt32                 inFlags);
  490. EXTERN_API_C( OSErr )
  491. QTSPresExport                   (QTSPresentation        inPresentation,
  492.                                  QTSStream              inStream,
  493.                                  QTSExportParams *      inExportParams);
  494. EXTERN_API_C( void )
  495. QTSPresIdle                     (QTSPresentation        inPresentation,
  496.                                  QTSPresIdleParams *    ioParams);
  497. EXTERN_API_C( OSErr )
  498. QTSPresInvalidateRegion         (QTSPresentation        inPresentation,
  499.                                  RgnHandle              inRegion);
  500. /*-----------------------------------------
  501.     Presentation Configuration
  502. -----------------------------------------*/
  503. EXTERN_API_C( OSErr )
  504. QTSPresSetFlags                 (QTSPresentation        inPresentation,
  505.                                  SInt32                 inFlags,
  506.                                  SInt32                 inFlagsMask);
  507. EXTERN_API_C( OSErr )
  508. QTSPresGetFlags                 (QTSPresentation        inPresentation,
  509.                                  SInt32 *               outFlags);
  510. EXTERN_API_C( OSErr )
  511. QTSPresGetTimeBase              (QTSPresentation        inPresentation,
  512.                                  TimeBase *             outTimeBase);
  513. EXTERN_API_C( OSErr )
  514. QTSPresGetTimeScale             (QTSPresentation        inPresentation,
  515.                                  TimeScale *            outTimeScale);
  516. EXTERN_API_C( OSErr )
  517. QTSPresSetInfo                  (QTSPresentation        inPresentation,
  518.                                  QTSStream              inStream,
  519.                                  OSType                 inSelector,
  520.                                  void *                 ioParam);
  521. EXTERN_API_C( OSErr )
  522. QTSPresGetInfo                  (QTSPresentation        inPresentation,
  523.                                  QTSStream              inStream,
  524.                                  OSType                 inSelector,
  525.                                  void *                 ioParam);
  526. EXTERN_API_C( OSErr )
  527. QTSPresHasCharacteristic        (QTSPresentation        inPresentation,
  528.                                  QTSStream              inStream,
  529.                                  OSType                 inCharacteristic,
  530.                                  Boolean *              outHasIt);
  531. EXTERN_API_C( OSErr )
  532. QTSPresSetNotificationProc      (QTSPresentation        inPresentation,
  533.                                  QTSNotificationUPP     inNotificationProc,
  534.                                  void *                 inRefCon);
  535. EXTERN_API_C( OSErr )
  536. QTSPresGetNotificationProc      (QTSPresentation        inPresentation,
  537.                                  QTSNotificationUPP *   outNotificationProc,
  538.                                  void **                outRefCon);
  539. /*-----------------------------------------
  540.     Presentation Control
  541. -----------------------------------------*/
  542. EXTERN_API_C( OSErr )
  543. QTSPresPreview                  (QTSPresentation        inPresentation,
  544.                                  QTSStream              inStream,
  545.                                  const TimeValue64 *    inTimeValue,
  546.                                  Fixed                  inRate,
  547.                                  SInt32                 inFlags);
  548. EXTERN_API_C( OSErr )
  549. QTSPresPreroll                  (QTSPresentation        inPresentation,
  550.                                  QTSStream              inStream,
  551.                                  UInt32                 inTimeValue,
  552.                                  Fixed                  inRate,
  553.                                  SInt32                 inFlags);
  554. EXTERN_API_C( OSErr )
  555. QTSPresPreroll64                (QTSPresentation        inPresentation,
  556.                                  QTSStream              inStream,
  557.                                  const TimeValue64 *    inPrerollTime,
  558.                                  Fixed                  inRate,
  559.                                  SInt32                 inFlags);
  560. EXTERN_API_C( OSErr )
  561. QTSPresStart                    (QTSPresentation        inPresentation,
  562.                                  QTSStream              inStream,
  563.                                  SInt32                 inFlags);
  564. EXTERN_API_C( OSErr )
  565. QTSPresSkipTo                   (QTSPresentation        inPresentation,
  566.                                  UInt32                 inTimeValue);
  567. EXTERN_API_C( OSErr )
  568. QTSPresSkipTo64                 (QTSPresentation        inPresentation,
  569.                                  const TimeValue64 *    inTimeValue);
  570. EXTERN_API_C( OSErr )
  571. QTSPresStop                     (QTSPresentation        inPresentation,
  572.                                  QTSStream              inStream,
  573.                                  SInt32                 inFlags);
  574. /*============================================================================
  575.         Streams
  576. ============================================================================*/
  577. /*-----------------------------------------
  578.     Stream Functions
  579. -----------------------------------------*/
  580. EXTERN_API_C( OSErr )
  581. QTSPresNewStream                (QTSPresentation        inPresentation,
  582.                                  OSType                 inDataType,
  583.                                  const void *           inData,
  584.                                  UInt32                 inDataLength,
  585.                                  SInt32                 inFlags,
  586.                                  QTSStream *            outStream);
  587. EXTERN_API_C( OSErr )
  588. QTSDisposeStream                (QTSStream              inStream,
  589.                                  SInt32                 inFlags);
  590. EXTERN_API_C( UInt32 )
  591. QTSPresGetNumStreams            (QTSPresentation        inPresentation);
  592. EXTERN_API_C( QTSStream )
  593. QTSPresGetIndStream             (QTSPresentation        inPresentation,
  594.                                  UInt32                 inIndex);
  595. EXTERN_API_C( QTSPresentation )
  596. QTSGetStreamPresentation        (QTSStream              inStream);
  597. EXTERN_API_C( OSErr )
  598. QTSPresSetPreferredRate         (QTSPresentation        inPresentation,
  599.                                  Fixed                  inRate,
  600.                                  SInt32                 inFlags);
  601. EXTERN_API_C( OSErr )
  602. QTSPresGetPreferredRate         (QTSPresentation        inPresentation,
  603.                                  Fixed *                outRate);
  604. EXTERN_API_C( OSErr )
  605. QTSPresSetEnable                (QTSPresentation        inPresentation,
  606.                                  QTSStream              inStream,
  607.                                  Boolean                inEnableMode);
  608. EXTERN_API_C( OSErr )
  609. QTSPresGetEnable                (QTSPresentation        inPresentation,
  610.                                  QTSStream              inStream,
  611.                                  Boolean *              outEnableMode);
  612. EXTERN_API_C( OSErr )
  613. QTSPresSetPresenting            (QTSPresentation        inPresentation,
  614.                                  QTSStream              inStream,
  615.                                  Boolean                inPresentingMode);
  616. EXTERN_API_C( OSErr )
  617. QTSPresGetPresenting            (QTSPresentation        inPresentation,
  618.                                  QTSStream              inStream,
  619.                                  Boolean *              outPresentingMode);
  620. EXTERN_API_C( OSErr )
  621. QTSPresSetActiveSegment         (QTSPresentation        inPresentation,
  622.                                  QTSStream              inStream,
  623.                                  const TimeValue64 *    inStartTime,
  624.                                  const TimeValue64 *    inDuration);
  625. EXTERN_API_C( OSErr )
  626. QTSPresGetActiveSegment         (QTSPresentation        inPresentation,
  627.                                  QTSStream              inStream,
  628.                                  TimeValue64 *          outStartTime,
  629.                                  TimeValue64 *          outDuration);
  630. EXTERN_API_C( OSErr )
  631. QTSPresSetPlayHints             (QTSPresentation        inPresentation,
  632.                                  QTSStream              inStream,
  633.                                  SInt32                 inFlags,
  634.                                  SInt32                 inFlagsMask);
  635. EXTERN_API_C( OSErr )
  636. QTSPresGetPlayHints             (QTSPresentation        inPresentation,
  637.                                  QTSStream              inStream,
  638.                                  SInt32 *               outFlags);
  639. /*-----------------------------------------
  640.     Stream Spatial Functions
  641. -----------------------------------------*/
  642. EXTERN_API_C( OSErr )
  643. QTSPresSetGWorld                (QTSPresentation        inPresentation,
  644.                                  QTSStream              inStream,
  645.                                  CGrafPtr               inGWorld,
  646.                                  GDHandle               inGDHandle);
  647. EXTERN_API_C( OSErr )
  648. QTSPresGetGWorld                (QTSPresentation        inPresentation,
  649.                                  QTSStream              inStream,
  650.                                  CGrafPtr *             outGWorld,
  651.                                  GDHandle *             outGDHandle);
  652. EXTERN_API_C( OSErr )
  653. QTSPresSetClip                  (QTSPresentation        inPresentation,
  654.                                  QTSStream              inStream,
  655.                                  RgnHandle              inClip);
  656. EXTERN_API_C( OSErr )
  657. QTSPresGetClip                  (QTSPresentation        inPresentation,
  658.                                  QTSStream              inStream,
  659.                                  RgnHandle *            outClip);
  660. EXTERN_API_C( OSErr )
  661. QTSPresSetMatrix                (QTSPresentation        inPresentation,
  662.                                  QTSStream              inStream,
  663.                                  const MatrixRecord *   inMatrix);
  664. EXTERN_API_C( OSErr )
  665. QTSPresGetMatrix                (QTSPresentation        inPresentation,
  666.                                  QTSStream              inStream,
  667.                                  MatrixRecord *         outMatrix);
  668. EXTERN_API_C( OSErr )
  669. QTSPresSetDimensions            (QTSPresentation        inPresentation,
  670.                                  QTSStream              inStream,
  671.                                  Fixed                  inWidth,
  672.                                  Fixed                  inHeight);
  673. EXTERN_API_C( OSErr )
  674. QTSPresGetDimensions            (QTSPresentation        inPresentation,
  675.                                  QTSStream              inStream,
  676.                                  Fixed *                outWidth,
  677.                                  Fixed *                outHeight);
  678. EXTERN_API_C( OSErr )
  679. QTSPresSetGraphicsMode          (QTSPresentation        inPresentation,
  680.                                  QTSStream              inStream,
  681.                                  short                  inMode,
  682.                                  const RGBColor *       inOpColor);
  683. EXTERN_API_C( OSErr )
  684. QTSPresGetGraphicsMode          (QTSPresentation        inPresentation,
  685.                                  QTSStream              inStream,
  686.                                  short *                outMode,
  687.                                  RGBColor *             outOpColor);
  688. EXTERN_API_C( OSErr )
  689. QTSPresGetPicture               (QTSPresentation        inPresentation,
  690.                                  QTSStream              inStream,
  691.                                  PicHandle *            outPicture);
  692. /*-----------------------------------------
  693.     Stream Sound Functions
  694. -----------------------------------------*/
  695. EXTERN_API_C( OSErr )
  696. QTSPresSetVolumes               (QTSPresentation        inPresentation,
  697.                                  QTSStream              inStream,
  698.                                  short                  inLeftVolume,
  699.                                  short                  inRightVolume);
  700. EXTERN_API_C( OSErr )
  701. QTSPresGetVolumes               (QTSPresentation        inPresentation,
  702.                                  QTSStream              inStream,
  703.                                  short *                outLeftVolume,
  704.                                  short *                outRightVolume);
  705. /*-----------------------------------------
  706.     Sourcing
  707. -----------------------------------------*/
  708. EXTERN_API_C( OSErr )
  709. QTSPresGetSettingsAsText        (QTSPresentation        inPresentation,
  710.                                  QTSStream              inStream,
  711.                                  SInt32                 inFlags,
  712.                                  OSType                 inSettingsType,
  713.                                  Handle *               outText,
  714.                                  QTSPanelFilterUPP      inPanelFilterProc,
  715.                                  void *                 inPanelFilterProcRefCon);
  716. EXTERN_API_C( OSErr )
  717. QTSPresSettingsDialog           (QTSPresentation        inPresentation,
  718.                                  QTSStream              inStream,
  719.                                  SInt32                 inFlags,
  720.                                  QTSModalFilterUPP      inFilterProc,
  721.                                  void *                 inFilterProcRefCon);
  722. EXTERN_API_C( OSErr )
  723. QTSPresSettingsDialogWithFilters (QTSPresentation       inPresentation,
  724.                                  QTSStream              inStream,
  725.                                  SInt32                 inFlags,
  726.                                  QTSModalFilterUPP      inFilterProc,
  727.                                  void *                 inFilterProcRefCon,
  728.                                  QTSPanelFilterUPP      inPanelFilterProc,
  729.                                  void *                 inPanelFilterProcRefCon);
  730. EXTERN_API_C( OSErr )
  731. QTSPresSetSettings              (QTSPresentation        inPresentation,
  732.                                  QTSStream              inStream,
  733.                                  QTAtomSpecPtr          inSettings,
  734.                                  SInt32                 inFlags);
  735. EXTERN_API_C( OSErr )
  736. QTSPresGetSettings              (QTSPresentation        inPresentation,
  737.                                  QTSStream              inStream,
  738.                                  QTAtomContainer *      outSettings,
  739.                                  SInt32                 inFlags);
  740. EXTERN_API_C( OSErr )
  741. QTSPresAddSourcer               (QTSPresentation        inPresentation,
  742.                                  QTSStream              inStream,
  743.                                  ComponentInstance      inSourcer,
  744.                                  SInt32                 inFlags);
  745. EXTERN_API_C( OSErr )
  746. QTSPresRemoveSourcer            (QTSPresentation        inPresentation,
  747.                                  QTSStream              inStream,
  748.                                  ComponentInstance      inSourcer,
  749.                                  SInt32                 inFlags);
  750. EXTERN_API_C( UInt32 )
  751. QTSPresGetNumSourcers           (QTSPresentation        inPresentation,
  752.                                  QTSStream              inStream);
  753. EXTERN_API_C( OSErr )
  754. QTSPresGetIndSourcer            (QTSPresentation        inPresentation,
  755.                                  QTSStream              inStream,
  756.                                  UInt32                 inIndex,
  757.                                  ComponentInstance *    outSourcer);
  758. /*============================================================================
  759.         Misc
  760. ============================================================================*/
  761. /* flags for Get/SetNetworkAppName */
  762. enum {
  763.     kQTSNetworkAppNameIsFullNameFlag = 0x00000001
  764. };
  765. EXTERN_API_C( OSErr )
  766. QTSSetNetworkAppName            (const char *           inAppName,
  767.                                  SInt32                 inFlags);
  768. EXTERN_API_C( OSErr )
  769. QTSGetNetworkAppName            (SInt32                 inFlags,
  770.                                  char **                outCStringPtr);
  771. /*-----------------------------------------
  772.     Statistics Utilities
  773. -----------------------------------------*/
  774. struct QTSStatHelperRecord {
  775.     long                            data[1];
  776. };
  777. typedef struct QTSStatHelperRecord      QTSStatHelperRecord;
  778. typedef QTSStatHelperRecord *           QTSStatHelper;
  779. enum {
  780.     kQTSInvalidStatHelper       = 0L
  781. };
  782. /* flags for QTSStatHelperNextParams */
  783. enum {
  784.     kQTSStatHelperReturnPascalStringsFlag = 0x00000001
  785. };
  786. struct QTSStatHelperNextParams {
  787.     SInt32                          flags;
  788.     OSType                          returnedStatisticsType;
  789.     QTSStream                       returnedStream;
  790.     UInt32                          maxStatNameLength;
  791.     char *                          returnedStatName;           /* NULL if you don't want it*/
  792.     UInt32                          maxStatStringLength;
  793.     char *                          returnedStatString;         /* NULL if you don't want it*/
  794.     UInt32                          maxStatUnitLength;
  795.     char *                          returnedStatUnit;           /* NULL if you don't want it*/
  796. };
  797. typedef struct QTSStatHelperNextParams  QTSStatHelperNextParams;
  798. struct QTSStatisticsParams {
  799.     OSType                          statisticsType;
  800.     QTAtomContainer                 container;
  801.     QTAtom                          parentAtom;
  802.     SInt32                          flags;
  803. };
  804. typedef struct QTSStatisticsParams      QTSStatisticsParams;
  805. /* general statistics types */
  806. enum {
  807.     kQTSAllStatisticsType       = FOUR_CHAR_CODE('all '),
  808.     kQTSShortStatisticsType     = FOUR_CHAR_CODE('shrt'),
  809.     kQTSSummaryStatisticsType   = FOUR_CHAR_CODE('summ')
  810. };
  811. /* statistics flags */
  812. enum {
  813.     kQTSGetNameStatisticsFlag   = 0x00000001,
  814.     kQTSDontGetDataStatisticsFlag = 0x00000002,
  815.     kQTSUpdateAtomsStatisticsFlag = 0x00000004,
  816.     kQTSGetUnitsStatisticsFlag  = 0x00000008,
  817.     kQTSUpdateAllIfNecessaryStatisticsFlag = 0x00010000
  818. };
  819. /* statistics atom types */
  820. enum {
  821.     kQTSStatisticsStreamAtomType = FOUR_CHAR_CODE('strm'),
  822.     kQTSStatisticsNameAtomType  = FOUR_CHAR_CODE('name'),       /* chars only, no length or terminator */
  823.     kQTSStatisticsDataFormatAtomType = FOUR_CHAR_CODE('frmt'),  /* OSType */
  824.     kQTSStatisticsDataAtomType  = FOUR_CHAR_CODE('data'),
  825.     kQTSStatisticsUnitsAtomType = FOUR_CHAR_CODE('unit'),       /* OSType */
  826.     kQTSStatisticsUnitsNameAtomType = FOUR_CHAR_CODE('unin')    /* chars only, no length or terminator */
  827. };
  828. /* statistics data formats */
  829. enum {
  830.     kQTSStatisticsSInt32DataFormat = FOUR_CHAR_CODE('si32'),
  831.     kQTSStatisticsUInt32DataFormat = FOUR_CHAR_CODE('ui32'),
  832.     kQTSStatisticsSInt16DataFormat = FOUR_CHAR_CODE('si16'),
  833.     kQTSStatisticsUInt16DataFormat = FOUR_CHAR_CODE('ui16'),
  834.     kQTSStatisticsFixedDataFormat = FOUR_CHAR_CODE('fixd'),
  835.     kQTSStatisticsUnsignedFixedDataFormat = FOUR_CHAR_CODE('ufix'),
  836.     kQTSStatisticsStringDataFormat = FOUR_CHAR_CODE('strg'),
  837.     kQTSStatisticsOSTypeDataFormat = FOUR_CHAR_CODE('ostp'),
  838.     kQTSStatisticsRectDataFormat = FOUR_CHAR_CODE('rect'),
  839.     kQTSStatisticsPointDataFormat = FOUR_CHAR_CODE('pont')
  840. };
  841. /* statistics units types */
  842. enum {
  843.     kQTSStatisticsNoUnitsType   = 0,
  844.     kQTSStatisticsPercentUnitsType = FOUR_CHAR_CODE('pcnt'),
  845.     kQTSStatisticsBitsPerSecUnitsType = FOUR_CHAR_CODE('bps '),
  846.     kQTSStatisticsFramesPerSecUnitsType = FOUR_CHAR_CODE('fps ')
  847. };
  848. /* specific statistics types */
  849. enum {
  850.     kQTSTotalDataRateStat       = FOUR_CHAR_CODE('drtt'),
  851.     kQTSTotalDataRateInStat     = FOUR_CHAR_CODE('drti'),
  852.     kQTSTotalDataRateOutStat    = FOUR_CHAR_CODE('drto'),
  853.     kQTSNetworkIDStringStat     = FOUR_CHAR_CODE('nids')
  854. };
  855. EXTERN_API_C( OSErr )
  856. QTSNewStatHelper                (QTSPresentation        inPresentation,
  857.                                  QTSStream              inStream,
  858.                                  OSType                 inStatType,
  859.                                  SInt32                 inFlags,
  860.                                  QTSStatHelper *        outStatHelper);
  861. EXTERN_API_C( OSErr )
  862. QTSDisposeStatHelper            (QTSStatHelper          inStatHelper);
  863. EXTERN_API_C( OSErr )
  864. QTSStatHelperGetStats           (QTSStatHelper          inStatHelper);
  865. EXTERN_API_C( OSErr )
  866. QTSStatHelperResetIter          (QTSStatHelper          inStatHelper);
  867. EXTERN_API_C( Boolean )
  868. QTSStatHelperNext               (QTSStatHelper          inStatHelper,
  869.                                  QTSStatHelperNextParams * ioParams);
  870. EXTERN_API_C( UInt32 )
  871. QTSStatHelperGetNumStats        (QTSStatHelper          inStatHelper);
  872. /* used by components to put statistics into the atom container */
  873. EXTERN_API_C( OSErr )
  874. QTSGetOrMakeStatAtomForStream   (QTAtomContainer        inContainer,
  875.                                  QTSStream              inStream,
  876.                                  QTAtom *               outParentAtom);
  877. EXTERN_API_C( OSErr )
  878. QTSInsertStatistic              (QTAtomContainer        inContainer,
  879.                                  QTAtom                 inParentAtom,
  880.                                  OSType                 inStatType,
  881.                                  void *                 inStatData,
  882.                                  UInt32                 inStatDataLength,
  883.                                  OSType                 inStatDataFormat,
  884.                                  SInt32                 inFlags);
  885. EXTERN_API_C( OSErr )
  886. QTSInsertStatisticName          (QTAtomContainer        inContainer,
  887.                                  QTAtom                 inParentAtom,
  888.                                  OSType                 inStatType,
  889.                                  const char *           inStatName,
  890.                                  UInt32                 inStatNameLength);
  891. EXTERN_API_C( OSErr )
  892. QTSInsertStatisticUnits         (QTAtomContainer        inContainer,
  893.                                  QTAtom                 inParentAtom,
  894.                                  OSType                 inStatType,
  895.                                  OSType                 inUnitsType,
  896.                                  const char *           inUnitsName,
  897.                                  UInt32                 inUnitsNameLength);
  898. /*============================================================================
  899.         Data Formats
  900. ============================================================================*/
  901. /*-----------------------------------------
  902.     Data Types
  903. -----------------------------------------*/
  904. /* universal data types */
  905. enum {
  906.     kQTSNullDataType            = FOUR_CHAR_CODE('NULL'),
  907.     kQTSUnknownDataType         = FOUR_CHAR_CODE('huh?'),
  908.     kQTSAtomContainerDataType   = FOUR_CHAR_CODE('qtac'),       /* QTAtomContainer */
  909.     kQTSAtomDataType            = FOUR_CHAR_CODE('qtat'),       /* QTSAtomContainerDataStruct* */
  910.     kQTSAliasDataType           = FOUR_CHAR_CODE('alis'),
  911.     kQTSFileDataType            = FOUR_CHAR_CODE('fspc'),       /* FSSpec* */
  912.     kQTSFileSpecDataType        = FOUR_CHAR_CODE('fspc'),       /* FSSpec* */
  913.     kQTSHandleDataType          = FOUR_CHAR_CODE('hndl'),       /* Handle* */
  914.     kQTSDataRefDataType         = FOUR_CHAR_CODE('dref')        /* DataReferencePtr */
  915. };
  916. /* these data types are specific to presentations */
  917. enum {
  918.     kQTSRTSPDataType            = FOUR_CHAR_CODE('rtsp'),
  919.     kQTSSDPDataType             = FOUR_CHAR_CODE('sdp ')
  920. };
  921. /*-----------------------------------------
  922.     Atom IDs
  923. -----------------------------------------*/
  924. enum {
  925.     kQTSAtomType_Presentation   = FOUR_CHAR_CODE('pres'),
  926.     kQTSAtomType_PresentationHeader = FOUR_CHAR_CODE('phdr'),   /* QTSPresentationHeaderAtom */
  927.     kQTSAtomType_MediaStream    = FOUR_CHAR_CODE('mstr'),
  928.     kQTSAtomType_MediaStreamHeader = FOUR_CHAR_CODE('mshd'),    /* QTSMediaStreamHeaderAtom */
  929.     kQTSAtomType_MediaDescriptionText = FOUR_CHAR_CODE('mdes'), /* chars, no length */
  930.     kQTSAtomType_ClipRect       = FOUR_CHAR_CODE('clip'),       /* QTSClipRectAtom */
  931.     kQTSAtomType_Duration       = FOUR_CHAR_CODE('dura'),       /* QTSDurationAtom */
  932.     kQTSAtomType_BufferTime     = FOUR_CHAR_CODE('bufr')        /* QTSBufferTimeAtom */
  933. };
  934. struct QTSAtomContainerDataStruct {
  935.     QTAtomContainer                 container;
  936.     QTAtom                          parentAtom;
  937. };
  938. typedef struct QTSAtomContainerDataStruct QTSAtomContainerDataStruct;
  939. /* flags for QTSPresentationHeaderAtom */
  940. enum {
  941.     kQTSPresHeaderTypeIsData    = 0x00000100,
  942.     kQTSPresHeaderDataIsHandle  = 0x00000200
  943. };
  944. struct QTSPresentationHeaderAtom {
  945.     SInt32                          versionAndFlags;
  946.     OSType                          conductorOrDataType;
  947.     OSType                          dataAtomType;               /* where the data really is*/
  948. };
  949. typedef struct QTSPresentationHeaderAtom QTSPresentationHeaderAtom;
  950. struct QTSMediaStreamHeaderAtom {
  951.     SInt32                          versionAndFlags;
  952.     OSType                          mediaTransportType;
  953.     OSType                          mediaTransportDataAID;      /* where the data really is*/
  954. };
  955. typedef struct QTSMediaStreamHeaderAtom QTSMediaStreamHeaderAtom;
  956. struct QTSBufferTimeAtom {
  957.     SInt32                          versionAndFlags;
  958.     Fixed                           bufferTime;
  959. };
  960. typedef struct QTSBufferTimeAtom        QTSBufferTimeAtom;
  961. struct QTSDurationAtom {
  962.     SInt32                          versionAndFlags;
  963.     TimeScale                       timeScale;
  964.     TimeValue64                     duration;
  965. };
  966. typedef struct QTSDurationAtom          QTSDurationAtom;
  967. struct QTSClipRectAtom {
  968.     SInt32                          versionAndFlags;
  969.     Rect                            clipRect;
  970. };
  971. typedef struct QTSClipRectAtom          QTSClipRectAtom;
  972. enum {
  973.     kQTSEmptyEditStreamStartTime = -1
  974. };
  975. typedef UInt32                          QTSStatus;
  976. enum {
  977.     kQTSNullStatus              = 0,
  978.     kQTSUninitializedStatus     = 1,
  979.     kQTSConnectingStatus        = 2,
  980.     kQTSOpeningConnectionDetailedStatus = 3,
  981.     kQTSMadeConnectionDetailedStatus = 4,
  982.     kQTSNegotiatingStatus       = 5,
  983.     kQTSGettingDescriptionDetailedStatus = 6,
  984.     kQTSGotDescriptionDetailedStatus = 7,
  985.     kQTSSentSetupCmdDetailedStatus = 8,
  986.     kQTSReceivedSetupResponseDetailedStatus = 9,
  987.     kQTSSentPlayCmdDetailedStatus = 10,
  988.     kQTSReceivedPlayResponseDetailedStatus = 11,
  989.     kQTSBufferingStatus         = 12,
  990.     kQTSPlayingStatus           = 13,
  991.     kQTSPausedStatus            = 14,
  992.     kQTSAutoConfiguringStatus   = 15,
  993.     kQTSDownloadingStatus       = 16,
  994.     kQTSBufferingWithTimeStatus = 17,
  995.     kQTSWaitingDisconnectStatus = 100
  996. };
  997. /*-----------------------------------------
  998.     QuickTime Preferences Types
  999. -----------------------------------------*/
  1000. enum {
  1001.     kQTSConnectionPrefsType     = FOUR_CHAR_CODE('stcm'),       /* root atom that all other atoms are contained in*/
  1002.                                                                 /*    kQTSNotUsedForProxyPrefsType = 'nopr',     //        comma-delimited list of URLs that are never used for proxies*/
  1003.     kQTSConnectionMethodPrefsType = FOUR_CHAR_CODE('mthd'),     /*      connection method (OSType that matches one of the following three)*/
  1004.     kQTSDirectConnectPrefsType  = FOUR_CHAR_CODE('drct'),       /*       used if direct connect (QTSDirectConnectPrefsRecord)*/
  1005.                                                                 /*    kQTSRTSPProxyPrefsType =     'rtsp',   //   used if RTSP Proxy (QTSProxyPrefsRecord)*/
  1006.     kQTSSOCKSPrefsType          = FOUR_CHAR_CODE('sock')        /*       used if SOCKS Proxy (QTSProxyPrefsRecord)*/
  1007. };
  1008. enum {
  1009.     kQTSDirectConnectHTTPProtocol = FOUR_CHAR_CODE('http'),
  1010.     kQTSDirectConnectRTSPProtocol = FOUR_CHAR_CODE('rtsp')
  1011. };
  1012. struct QTSDirectConnectPrefsRecord {
  1013.     UInt32                          tcpPortID;
  1014.     OSType                          protocol;
  1015. };
  1016. typedef struct QTSDirectConnectPrefsRecord QTSDirectConnectPrefsRecord;
  1017. struct QTSProxyPrefsRecord {
  1018.     Str255                          serverNameStr;
  1019.     UInt32                          portID;
  1020. };
  1021. typedef struct QTSProxyPrefsRecord      QTSProxyPrefsRecord;
  1022. #define kQTSTransAndProxyPrefsVersNum       2       /* prefs atom format version */
  1023. enum {
  1024.     kConnectionActive           = (1L << 0),
  1025.     kConnectionUseSystemPref    = (1L << 1)
  1026. };
  1027. struct QTSTransportPref {
  1028.     OSType                          protocol;                   /* udp, http, tcp, etc*/
  1029.     SInt32                          portID;                     /* port to use for this connection type*/
  1030.     UInt32                          flags;                      /* connection flags*/
  1031.     UInt32                          seed;                       /* seed value last time this setting was read from system prefs*/
  1032. };
  1033. typedef struct QTSTransportPref         QTSTransportPref;
  1034. enum {
  1035.     kProxyActive                = (1L << 0),
  1036.     kProxyUseSystemPref         = (1L << 1)
  1037. };
  1038. struct QTSProxyPref {
  1039.     UInt32                          flags;                      /* proxy flags*/
  1040.     SInt32                          portID;                     /* port to use for this connection type*/
  1041.     UInt32                          seed;                       /* seed value last time this setting was read from system prefs*/
  1042.     Str255                          serverNameStr;              /* proxy server url*/
  1043. };
  1044. typedef struct QTSProxyPref             QTSProxyPref;
  1045. enum {
  1046.     kNoProxyUseSystemPref       = (1L << 0)
  1047. };
  1048. struct QTSNoProxyPref {
  1049.     UInt32                          flags;                      /* no-proxy flags*/
  1050.     UInt32                          seed;                       /* seed value last time this setting was read from system prefs*/
  1051.     char                            urlList[1];                 /* NULL terminated, comma delimited list of urls*/
  1052. };
  1053. typedef struct QTSNoProxyPref           QTSNoProxyPref;
  1054. enum {
  1055.     kQTSInstantOnFlag_Enable    = (1L << 0),                    /* instant on is enabled (read/write)*/
  1056.     kQTSInstantOnFlag_Permitted = (1L << 1)                     /* instant on is possible (read only)*/
  1057. };
  1058. struct QTSInstantOnPref {
  1059.     SInt32                          flags;                      /* flags*/
  1060.     SInt32                          factor;                     /*    0-100; default is 50*/
  1061. };
  1062. typedef struct QTSInstantOnPref         QTSInstantOnPref;
  1063. enum {
  1064.     kQTSTransAndProxyAtomType   = FOUR_CHAR_CODE('strp'),       /* transport/proxy prefs root atom*/
  1065.     kQTSConnectionPrefsVersion  = FOUR_CHAR_CODE('vers'),       /*   prefs format version*/
  1066.     kQTSTransportPrefsAtomType  = FOUR_CHAR_CODE('trns'),       /*   tranport prefs root atom*/
  1067.     kQTSConnectionAtomType      = FOUR_CHAR_CODE('conn'),       /*     connection prefs atom type, one for each transport type*/
  1068.     kQTSUDPTransportType        = FOUR_CHAR_CODE('udp '),       /*     udp transport prefs*/
  1069.     kQTSHTTPTransportType       = FOUR_CHAR_CODE('http'),       /*     http transport prefs*/
  1070.     kQTSTCPTransportType        = FOUR_CHAR_CODE('tcp '),       /*     tcp transport prefs    */
  1071.     kQTSProxyPrefsAtomType      = FOUR_CHAR_CODE('prxy'),       /*   proxy prefs root atom*/
  1072.     kQTSHTTPProxyPrefsType      = FOUR_CHAR_CODE('http'),       /*     http proxy settings*/
  1073.     kQTSRTSPProxyPrefsType      = FOUR_CHAR_CODE('rtsp'),       /*     rtsp proxy settings*/
  1074.     kQTSSOCKSProxyPrefsType     = FOUR_CHAR_CODE('sock'),       /*     socks proxy settings*/
  1075.     kQTSProxyUserInfoPrefsType  = FOUR_CHAR_CODE('user'),       /*   proxy username/password root atom*/
  1076.     kQTSDontProxyPrefsAtomType  = FOUR_CHAR_CODE('nopr'),       /*   no-proxy prefs root atom*/
  1077.     kQTSDontProxyDataType       = FOUR_CHAR_CODE('data'),       /*     no proxy settings*/
  1078.     kQTSInstantOnPrefsAtomType  = FOUR_CHAR_CODE('inon')        /* instant on prefs*/
  1079. };
  1080. EXTERN_API_C( OSErr )
  1081. QTSPrefsAddProxySetting         (OSType                 proxyType,
  1082.                                  SInt32                 portID,
  1083.                                  UInt32                 flags,
  1084.                                  UInt32                 seed,
  1085.                                  Str255                 srvrURL);
  1086. EXTERN_API_C( OSErr )
  1087. QTSPrefsFindProxyByType         (OSType                 proxyType,
  1088.                                  UInt32                 flags,
  1089.                                  UInt32                 flagsMask,
  1090.                                  QTSProxyPref **        proxyHndl,
  1091.                                  SInt16 *               count);
  1092. EXTERN_API_C( OSErr )
  1093. QTSPrefsAddConnectionSetting    (OSType                 protocol,
  1094.                                  SInt32                 portID,
  1095.                                  UInt32                 flags,
  1096.                                  UInt32                 seed);
  1097. EXTERN_API_C( OSErr )
  1098. QTSPrefsFindConnectionByType    (OSType                 protocol,
  1099.                                  UInt32                 flags,
  1100.                                  UInt32                 flagsMask,
  1101.                                  QTSTransportPref **    connectionHndl,
  1102.                                  SInt16 *               count);
  1103. EXTERN_API_C( OSErr )
  1104. QTSPrefsGetActiveConnection     (OSType                 protocol,
  1105.                                  QTSTransportPref *     connectInfo);
  1106. EXTERN_API_C( OSErr )
  1107. QTSPrefsGetNoProxyURLs          (QTSNoProxyPref **      noProxyHndl);
  1108. EXTERN_API_C( OSErr )
  1109. QTSPrefsSetNoProxyURLs          (char *                 urls,
  1110.                                  UInt32                 flags,
  1111.                                  UInt32                 seed);
  1112. EXTERN_API_C( OSErr )
  1113. QTSPrefsAddProxyUserInfo        (OSType                 proxyType,
  1114.                                  SInt32                 flags,
  1115.                                  SInt32                 flagsMask,
  1116.                                  StringPtr              username,
  1117.                                  StringPtr              password);
  1118. EXTERN_API_C( OSErr )
  1119. QTSPrefsFindProxyUserInfoByType (OSType                 proxyType,
  1120.                                  SInt32                 flags,
  1121.                                  SInt32                 flagsMask,
  1122.                                  StringPtr              username,
  1123.                                  StringPtr              password);
  1124. EXTERN_API_C( OSErr )
  1125. QTSPrefsGetInstantOnSettings    (QTSInstantOnPref *     outPref,
  1126.                                  SInt32                 inFlags);
  1127. EXTERN_API_C( OSErr )
  1128. QTSPrefsSetInstantOnSettings    (QTSInstantOnPref *     inPref,
  1129.                                  SInt32                 inFlags);
  1130. /*============================================================================
  1131.         Memory Management Services
  1132. ============================================================================*/
  1133. /*
  1134.    These routines allocate normal pointers and handles,
  1135.    but do the correct checking, etc.
  1136.    Dispose using the normal DisposePtr and DisposeHandle
  1137.    Call these routines for one time memory allocations.
  1138.    You do not need to set any hints to use these calls.
  1139. */
  1140. EXTERN_API_C( Ptr )
  1141. QTSNewPtr                       (UInt32                 inByteCount,
  1142.                                  SInt32                 inFlags,
  1143.                                  SInt32 *               outFlags);
  1144. EXTERN_API_C( Handle )
  1145. QTSNewHandle                    (UInt32                 inByteCount,
  1146.                                  SInt32                 inFlags,
  1147.                                  SInt32 *               outFlags);
  1148. #define QTSNewPtrClear(_s)      QTSNewPtr((_s), kQTSMemAllocClearMem, NULL)
  1149. #define QTSNewHandleClear(_s)   QTSNewHandle((_s), kQTSMemAllocClearMem, NULL)
  1150. /* flags in*/
  1151. enum {
  1152.     kQTSMemAllocClearMem        = 0x00000001,
  1153.     kQTSMemAllocDontUseTempMem  = 0x00000002,
  1154.     kQTSMemAllocTryTempMemFirst = 0x00000004,
  1155.     kQTSMemAllocDontUseSystemMem = 0x00000008,
  1156.     kQTSMemAllocTrySystemMemFirst = 0x00000010,
  1157.     kQTSMemAllocHoldMemory      = 0x00001000,
  1158.     kQTSMemAllocIsInterruptTime = 0x01010000                    /* currently not supported for alloc*/
  1159. };
  1160. /* flags out*/
  1161. enum {
  1162.     kQTSMemAllocAllocatedInTempMem = 0x00000001,
  1163.     kQTSMemAllocAllocatedInSystemMem = 0x00000002
  1164. };
  1165. typedef struct OpaqueQTSMemPtr*         QTSMemPtr;
  1166. /*
  1167.    These routines are for buffers that will be recirculated
  1168.    you must use QTReleaseMemPtr instead of DisposePtr
  1169.    QTSReleaseMemPtr can be used at interrupt time
  1170.    but QTSAllocMemPtr currently cannot 
  1171. */
  1172. EXTERN_API_C( QTSMemPtr )
  1173. QTSAllocMemPtr                  (UInt32                 inByteCount,
  1174.                                  SInt32                 inFlags);
  1175. EXTERN_API_C( void )
  1176. QTSReleaseMemPtr                (QTSMemPtr              inMemPtr,
  1177.                                  SInt32                 inFlags);
  1178. /*============================================================================
  1179.         Buffer Management Services
  1180. ============================================================================*/
  1181. enum {
  1182.     kQTSStreamBufferVersion1    = 1
  1183. };
  1184. struct QTSStreamBuffer {
  1185.     struct QTSStreamBuffer *        reserved1;
  1186.     struct QTSStreamBuffer *        reserved2;
  1187.     struct QTSStreamBuffer *        next;                       /* next message block in a message */
  1188.     unsigned char *                 rptr;                       /* first byte with real data in the DataBuffer */
  1189.     unsigned char *                 wptr;                       /* last+1 byte with real data in the DataBuffer */
  1190.     SInt32                          version;
  1191.     UInt32                          metadata[4];                /* usage defined by message sender */
  1192.     SInt32                          flags;                      /* reserved */
  1193.     long                            reserved3;
  1194.     long                            reserved4;
  1195.     long                            reserved5;
  1196.     UInt32                          moreMeta[8];
  1197. };
  1198. typedef struct QTSStreamBuffer          QTSStreamBuffer;
  1199. /* flags for QTSDuplicateMessage*/
  1200. enum {
  1201.     kQTSDuplicateBufferFlag_CopyData = 0x00000001,
  1202.     kQTSDuplicateBufferFlag_FlattenMessage = 0x00000002
  1203. };
  1204. EXTERN_API_C( OSErr )
  1205. QTSNewStreamBuffer              (UInt32                 inDataSize,
  1206.                                  SInt32                 inFlags,
  1207.                                  QTSStreamBuffer **     outStreamBuffer);
  1208. EXTERN_API_C( void )
  1209. QTSFreeMessage                  (QTSStreamBuffer *      inMessage);
  1210. /*
  1211.     kQTSDuplicateBufferFlag_CopyData - forces a copy of the data itself
  1212.     kQTSCopyBufferFlag_FlattenMessage - copies the data if it needs to be flattened
  1213.     QTSDuplicateMessage never frees the old message
  1214. */
  1215. EXTERN_API_C( OSErr )
  1216. QTSDuplicateMessage             (QTSStreamBuffer *      inMessage,
  1217.                                  SInt32                 inFlags,
  1218.                                  QTSStreamBuffer **     outDuplicatedMessage);
  1219. EXTERN_API_C( UInt32 )
  1220. QTSMessageLength                (QTSStreamBuffer *      inMessage);
  1221. EXTERN_API_C( void )
  1222. QTSStreamBufferDataInfo         (QTSStreamBuffer *      inStreamBuffer,
  1223.                                  unsigned char **       outDataStart,
  1224.                                  UInt32 *               outDataMaxLength);
  1225. /* ---- old calls (don't use these)*/
  1226. EXTERN_API_C( QTSStreamBuffer *)
  1227. QTSAllocBuffer                  (SInt32                 inSize);
  1228. EXTERN_API_C( QTSStreamBuffer *)
  1229. QTSDupMessage                   (QTSStreamBuffer *      inMessage);
  1230. EXTERN_API_C( QTSStreamBuffer *)
  1231. QTSCopyMessage                  (QTSStreamBuffer *      inMessage);
  1232. EXTERN_API_C( QTSStreamBuffer *)
  1233. QTSFlattenMessage               (QTSStreamBuffer *      inMessage);
  1234. /*============================================================================
  1235.         Misc
  1236. ============================================================================*/
  1237. EXTERN_API_C( Boolean )
  1238. QTSGetErrorString               (SInt32                 inErrorCode,
  1239.                                  UInt32                 inMaxErrorStringLength,
  1240.                                  char *                 outErrorString,
  1241.                                  SInt32                 inFlags);
  1242. EXTERN_API_C( OSErr )
  1243. QTSInitializeMediaParams        (QTSMediaParams *       inMediaParams);
  1244. /* UPP call backs */
  1245. #if OPAQUE_UPP_TYPES
  1246.     EXTERN_API(QTSNotificationUPP)
  1247.     NewQTSNotificationUPP          (QTSNotificationProcPtr  userRoutine);
  1248.     EXTERN_API(QTSPanelFilterUPP)
  1249.     NewQTSPanelFilterUPP           (QTSPanelFilterProcPtr   userRoutine);
  1250.     EXTERN_API(QTSModalFilterUPP)
  1251.     NewQTSModalFilterUPP           (QTSModalFilterProcPtr   userRoutine);
  1252.     EXTERN_API(void)
  1253.     DisposeQTSNotificationUPP      (QTSNotificationUPP      userUPP);
  1254.     EXTERN_API(void)
  1255.     DisposeQTSPanelFilterUPP       (QTSPanelFilterUPP       userUPP);
  1256.     EXTERN_API(void)
  1257.     DisposeQTSModalFilterUPP       (QTSModalFilterUPP       userUPP);
  1258.     EXTERN_API(ComponentResult)
  1259.     InvokeQTSNotificationUPP       (ComponentResult         inErr,
  1260.                                     OSType                  inNotificationType,
  1261.                                     void *                  inNotificationParams,
  1262.                                     void *                  inRefCon,
  1263.                                     QTSNotificationUPP      userUPP);
  1264.     EXTERN_API(Boolean)
  1265.     InvokeQTSPanelFilterUPP        (QTSPanelFilterParams *  inParams,
  1266.                                     void *                  inRefCon,
  1267.                                     QTSPanelFilterUPP       userUPP);
  1268.     EXTERN_API(Boolean)
  1269.     InvokeQTSModalFilterUPP        (DialogPtr               inDialog,
  1270.                                     const EventRecord *     inEvent,
  1271.                                     SInt16 *                ioItemHit,
  1272.                                     void *                  inRefCon,
  1273.                                     QTSModalFilterUPP       userUPP);
  1274. #else
  1275.     enum { uppQTSNotificationProcInfo = 0x00003FF0 };               /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  1276.     enum { uppQTSPanelFilterProcInfo = 0x000003D0 };                /* pascal 1_byte Func(4_bytes, 4_bytes) */
  1277.     enum { uppQTSModalFilterProcInfo = 0x00003FD0 };                /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  1278.     #define NewQTSNotificationUPP(userRoutine)                      (QTSNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSNotificationProcInfo, GetCurrentArchitecture())
  1279.     #define NewQTSPanelFilterUPP(userRoutine)                       (QTSPanelFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSPanelFilterProcInfo, GetCurrentArchitecture())
  1280.     #define NewQTSModalFilterUPP(userRoutine)                       (QTSModalFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSModalFilterProcInfo, GetCurrentArchitecture())
  1281.     #define DisposeQTSNotificationUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  1282.     #define DisposeQTSPanelFilterUPP(userUPP)                       DisposeRoutineDescriptor(userUPP)
  1283.     #define DisposeQTSModalFilterUPP(userUPP)                       DisposeRoutineDescriptor(userUPP)
  1284.     #define InvokeQTSNotificationUPP(inErr, inNotificationType, inNotificationParams, inRefCon, userUPP)  (ComponentResult)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTSNotificationProcInfo, (inErr), (inNotificationType), (inNotificationParams), (inRefCon))
  1285.     #define InvokeQTSPanelFilterUPP(inParams, inRefCon, userUPP)    (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppQTSPanelFilterProcInfo, (inParams), (inRefCon))
  1286.     #define InvokeQTSModalFilterUPP(inDialog, inEvent, ioItemHit, inRefCon, userUPP)  (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTSModalFilterProcInfo, (inDialog), (inEvent), (ioItemHit), (inRefCon))
  1287. #endif
  1288. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1289. #define NewQTSNotificationProc(userRoutine)                     NewQTSNotificationUPP(userRoutine)
  1290. #define NewQTSPanelFilterProc(userRoutine)                      NewQTSPanelFilterUPP(userRoutine)
  1291. #define NewQTSModalFilterProc(userRoutine)                      NewQTSModalFilterUPP(userRoutine)
  1292. #define CallQTSNotificationProc(userRoutine, inErr, inNotificationType, inNotificationParams, inRefCon) InvokeQTSNotificationUPP(inErr, inNotificationType, inNotificationParams, inRefCon, userRoutine)
  1293. #define CallQTSPanelFilterProc(userRoutine, inParams, inRefCon) InvokeQTSPanelFilterUPP(inParams, inRefCon, userRoutine)
  1294. #define CallQTSModalFilterProc(userRoutine, inDialog, inEvent, ioItemHit, inRefCon) InvokeQTSModalFilterUPP(inDialog, inEvent, ioItemHit, inRefCon, userRoutine)
  1295. #if PRAGMA_STRUCT_ALIGN
  1296.     #pragma options align=reset
  1297. #elif PRAGMA_STRUCT_PACKPUSH
  1298.     #pragma pack(pop)
  1299. #elif PRAGMA_STRUCT_PACK
  1300.     #pragma pack()
  1301. #endif
  1302. #ifdef PRAGMA_IMPORT_OFF
  1303. #pragma import off
  1304. #elif PRAGMA_IMPORT
  1305. #pragma import reset
  1306. #endif
  1307. #ifdef __cplusplus
  1308. }
  1309. #endif
  1310. #endif /* __QUICKTIMESTREAMING__ */