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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       QTSMovie.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 __QTSMOVIE__
  18. #define __QTSMOVIE__
  19. #ifndef __COMPONENTS__
  20. #include "Components.h"
  21. #endif
  22. #ifndef __MOVIES__
  23. #include "Movies.h"
  24. #endif
  25. #ifndef __QUICKTIMESTREAMING__
  26. #include "QuickTimeStreaming.h"
  27. #endif
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37. #if PRAGMA_STRUCT_ALIGN
  38.     #pragma options align=mac68k
  39. #elif PRAGMA_STRUCT_PACKPUSH
  40.     #pragma pack(push, 2)
  41. #elif PRAGMA_STRUCT_PACK
  42.     #pragma pack(2)
  43. #endif
  44. enum {
  45.     kQTSStreamMediaType         = FOUR_CHAR_CODE('strm')
  46. };
  47. struct QTSSampleDescription {
  48.     long                            descSize;
  49.     long                            dataFormat;
  50.     long                            resvd1;                     /* set to 0*/
  51.     short                           resvd2;                     /* set to 0*/
  52.     short                           dataRefIndex;
  53.     UInt32                          version;
  54.     UInt32                          resvd3;                     /* set to 0*/
  55.     SInt32                          flags;
  56.                                                                 /* qt atoms follow:*/
  57.                                                                 /*      long size, long type, some data*/
  58.                                                                 /*      repeat as necessary*/
  59. };
  60. typedef struct QTSSampleDescription     QTSSampleDescription;
  61. typedef QTSSampleDescription *          QTSSampleDescriptionPtr;
  62. typedef QTSSampleDescriptionPtr *       QTSSampleDescriptionHandle;
  63. enum {
  64.     kQTSSampleDescriptionVersion1 = 1L
  65. };
  66. enum {
  67.     kQTSDefaultMediaTimeScale   = 600L
  68. };
  69. /* sample description flags*/
  70. enum {
  71.     kQTSSampleDescPassSampleDataAsHandleFlag = 0x00000001
  72. };
  73. /*============================================================================
  74.         Stream Media Handler
  75. ============================================================================*/
  76. /*-----------------------------------------
  77.     Info Selectors
  78. -----------------------------------------*/
  79. /* all indexes start at 1 */
  80. enum {
  81.     kQTSMediaPresentationInfo   = FOUR_CHAR_CODE('pres'),       /* QTSMediaPresentationParams* */
  82.     kQTSMediaNotificationInfo   = FOUR_CHAR_CODE('noti'),       /* QTSMediaNotificationParams* */
  83.     kQTSMediaTotalDataRateInfo  = FOUR_CHAR_CODE('dtrt'),       /* UInt32*, bits/sec */
  84.     kQTSMediaLostPercentInfo    = FOUR_CHAR_CODE('lspc'),       /* Fixed* */
  85.     kQTSMediaNumStreamsInfo     = FOUR_CHAR_CODE('nstr'),       /* UInt32* */
  86.     kQTSMediaIndSampleDescriptionInfo = FOUR_CHAR_CODE('isdc')  /* QTSMediaIndSampleDescriptionParams* */
  87. };
  88. struct QTSMediaPresentationParams {
  89.     QTSPresentation                 presentationID;
  90. };
  91. typedef struct QTSMediaPresentationParams QTSMediaPresentationParams;
  92. struct QTSMediaNotificationParams {
  93.     QTSNotificationUPP              notificationProc;
  94.     void *                          notificationRefCon;
  95.     SInt32                          flags;
  96. };
  97. typedef struct QTSMediaNotificationParams QTSMediaNotificationParams;
  98. struct QTSMediaIndSampleDescriptionParams {
  99.     SInt32                          index;
  100.     OSType                          returnedMediaType;
  101.     SampleDescriptionHandle         returnedSampleDescription;
  102. };
  103. typedef struct QTSMediaIndSampleDescriptionParams QTSMediaIndSampleDescriptionParams;
  104. /*-----------------------------------------
  105.     QTS Media Handler Selectors
  106. -----------------------------------------*/
  107. enum {
  108.     kQTSMediaSetInfoSelect      = 0x0100,
  109.     kQTSMediaGetInfoSelect      = 0x0101,
  110.     kQTSMediaSetIndStreamInfoSelect = 0x0102,
  111.     kQTSMediaGetIndStreamInfoSelect = 0x0103
  112. };
  113. /*-----------------------------------------
  114.     QTS Media Handler functions
  115. -----------------------------------------*/
  116. EXTERN_API( ComponentResult )
  117. QTSMediaSetInfo                 (MediaHandler           mh,
  118.                                  OSType                 inSelector,
  119.                                  void *                 ioParams)                           FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
  120. EXTERN_API( ComponentResult )
  121. QTSMediaGetInfo                 (MediaHandler           mh,
  122.                                  OSType                 inSelector,
  123.                                  void *                 ioParams)                           FIVEWORDINLINE(0x2F3C, 0x0008, 0x0101, 0x7000, 0xA82A);
  124. EXTERN_API( ComponentResult )
  125. QTSMediaSetIndStreamInfo        (MediaHandler           mh,
  126.                                  SInt32                 inIndex,
  127.                                  OSType                 inSelector,
  128.                                  void *                 ioParams)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
  129. EXTERN_API( ComponentResult )
  130. QTSMediaGetIndStreamInfo        (MediaHandler           mh,
  131.                                  SInt32                 inIndex,
  132.                                  OSType                 inSelector,
  133.                                  void *                 ioParams)                           FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
  134. /*============================================================================
  135.         Hint Media Handler
  136. ============================================================================*/
  137. enum {
  138.     kQTSHintMediaType           = FOUR_CHAR_CODE('hint')
  139. };
  140. enum {
  141.     kQTSHintTrackReference      = FOUR_CHAR_CODE('hint')
  142. };
  143. /* MixedMode ProcInfo constants for component calls */
  144. enum {
  145.     uppQTSMediaSetInfoProcInfo                 = 0x00000FF0,
  146.     uppQTSMediaGetInfoProcInfo                 = 0x00000FF0,
  147.     uppQTSMediaSetIndStreamInfoProcInfo        = 0x00003FF0,
  148.     uppQTSMediaGetIndStreamInfoProcInfo        = 0x00003FF0
  149. };
  150. #if PRAGMA_STRUCT_ALIGN
  151.     #pragma options align=reset
  152. #elif PRAGMA_STRUCT_PACKPUSH
  153.     #pragma pack(pop)
  154. #elif PRAGMA_STRUCT_PACK
  155.     #pragma pack()
  156. #endif
  157. #ifdef PRAGMA_IMPORT_OFF
  158. #pragma import off
  159. #elif PRAGMA_IMPORT
  160. #pragma import reset
  161. #endif
  162. #ifdef __cplusplus
  163. }
  164. #endif
  165. #endif /* __QTSMOVIE__ */