Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

251 lines
6.7 KiB

  1. /*
  2. File: QTSMovie.h
  3. Contains: QuickTime Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1990-2007 by Apple Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __QTSMOVIE__
  11. #define __QTSMOVIE__
  12. #ifndef __COMPONENTS__
  13. #include <Components.h>
  14. #endif
  15. #ifndef __MOVIES__
  16. #include <Movies.h>
  17. #endif
  18. #ifndef __QUICKTIMESTREAMING__
  19. #include <QuickTimeStreaming.h>
  20. #endif
  21. #if PRAGMA_ONCE
  22. #pragma once
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. #if PRAGMA_IMPORT
  28. #pragma import on
  29. #endif
  30. #if PRAGMA_STRUCT_ALIGN
  31. #pragma options align=mac68k
  32. #elif PRAGMA_STRUCT_PACKPUSH
  33. #pragma pack(push, 2)
  34. #elif PRAGMA_STRUCT_PACK
  35. #pragma pack(2)
  36. #endif
  37. /* QuickTime is not available to 64-bit clients */
  38. #if !__LP64__
  39. enum {
  40. kQTSStreamMediaType = FOUR_CHAR_CODE('strm')
  41. };
  42. struct QTSSampleDescription {
  43. long descSize;
  44. long dataFormat;
  45. long resvd1; /* set to 0*/
  46. short resvd2; /* set to 0*/
  47. short dataRefIndex;
  48. UInt32 version;
  49. UInt32 resvd3; /* set to 0*/
  50. SInt32 flags;
  51. /* qt atoms follow:*/
  52. /* long size, long type, some data*/
  53. /* repeat as necessary*/
  54. };
  55. typedef struct QTSSampleDescription QTSSampleDescription;
  56. typedef QTSSampleDescription * QTSSampleDescriptionPtr;
  57. typedef QTSSampleDescriptionPtr * QTSSampleDescriptionHandle;
  58. enum {
  59. kQTSSampleDescriptionVersion1 = 1L
  60. };
  61. enum {
  62. kQTSDefaultMediaTimeScale = 600L
  63. };
  64. /* sample description flags*/
  65. enum {
  66. kQTSSampleDescPassSampleDataAsHandleFlag = 0x00000001
  67. };
  68. /*============================================================================
  69. Stream Media Handler
  70. ============================================================================*/
  71. /*-----------------------------------------
  72. Info Selectors
  73. -----------------------------------------*/
  74. /* all indexes start at 1 */
  75. enum {
  76. kQTSMediaPresentationInfo = FOUR_CHAR_CODE('pres'), /* QTSMediaPresentationParams* */
  77. kQTSMediaNotificationInfo = FOUR_CHAR_CODE('noti'), /* QTSMediaNotificationParams* */
  78. kQTSMediaTotalDataRateInfo = FOUR_CHAR_CODE('dtrt'), /* UInt32*, bits/sec */
  79. kQTSMediaLostPercentInfo = FOUR_CHAR_CODE('lspc'), /* Fixed* */
  80. kQTSMediaNumStreamsInfo = FOUR_CHAR_CODE('nstr'), /* UInt32* */
  81. kQTSMediaIndSampleDescriptionInfo = FOUR_CHAR_CODE('isdc') /* QTSMediaIndSampleDescriptionParams* */
  82. };
  83. struct QTSMediaPresentationParams {
  84. QTSPresentation presentationID;
  85. };
  86. typedef struct QTSMediaPresentationParams QTSMediaPresentationParams;
  87. struct QTSMediaNotificationParams {
  88. QTSNotificationUPP notificationProc;
  89. void * notificationRefCon;
  90. SInt32 flags;
  91. };
  92. typedef struct QTSMediaNotificationParams QTSMediaNotificationParams;
  93. struct QTSMediaIndSampleDescriptionParams {
  94. SInt32 index;
  95. OSType returnedMediaType;
  96. SampleDescriptionHandle returnedSampleDescription;
  97. };
  98. typedef struct QTSMediaIndSampleDescriptionParams QTSMediaIndSampleDescriptionParams;
  99. /*-----------------------------------------
  100. QTS Media Handler Selectors
  101. -----------------------------------------*/
  102. enum {
  103. kQTSMediaSetInfoSelect = 0x0100,
  104. kQTSMediaGetInfoSelect = 0x0101,
  105. kQTSMediaSetIndStreamInfoSelect = 0x0102,
  106. kQTSMediaGetIndStreamInfoSelect = 0x0103
  107. };
  108. /*-----------------------------------------
  109. QTS Media Handler functions
  110. -----------------------------------------*/
  111. /*
  112. * QTSMediaSetInfo()
  113. *
  114. * Availability:
  115. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  116. * CarbonLib: in CarbonLib 1.1 and later
  117. * Mac OS X: in version 10.0 and later
  118. * Windows: in QTSClient.lib 4.0 and later
  119. */
  120. EXTERN_API( ComponentResult )
  121. QTSMediaSetInfo(
  122. MediaHandler mh,
  123. OSType inSelector,
  124. void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
  125. /*
  126. * QTSMediaGetInfo()
  127. *
  128. * Availability:
  129. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  130. * CarbonLib: in CarbonLib 1.1 and later
  131. * Mac OS X: in version 10.0 and later
  132. * Windows: in QTSClient.lib 4.0 and later
  133. */
  134. EXTERN_API( ComponentResult )
  135. QTSMediaGetInfo(
  136. MediaHandler mh,
  137. OSType inSelector,
  138. void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0101, 0x7000, 0xA82A);
  139. /*
  140. * QTSMediaSetIndStreamInfo()
  141. *
  142. * Availability:
  143. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  144. * CarbonLib: in CarbonLib 1.1 and later
  145. * Mac OS X: in version 10.0 and later
  146. * Windows: in QTSClient.lib 4.0 and later
  147. */
  148. EXTERN_API( ComponentResult )
  149. QTSMediaSetIndStreamInfo(
  150. MediaHandler mh,
  151. SInt32 inIndex,
  152. OSType inSelector,
  153. void * ioParams) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
  154. /*
  155. * QTSMediaGetIndStreamInfo()
  156. *
  157. * Availability:
  158. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  159. * CarbonLib: in CarbonLib 1.1 and later
  160. * Mac OS X: in version 10.0 and later
  161. * Windows: in QTSClient.lib 4.0 and later
  162. */
  163. EXTERN_API( ComponentResult )
  164. QTSMediaGetIndStreamInfo(
  165. MediaHandler mh,
  166. SInt32 inIndex,
  167. OSType inSelector,
  168. void * ioParams) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
  169. /*============================================================================
  170. Hint Media Handler
  171. ============================================================================*/
  172. enum {
  173. kQTSHintMediaType = FOUR_CHAR_CODE('hint')
  174. };
  175. enum {
  176. kQTSHintTrackReference = FOUR_CHAR_CODE('hint')
  177. };
  178. /* MixedMode ProcInfo constants for component calls */
  179. enum {
  180. uppQTSMediaSetInfoProcInfo = 0x00000FF0,
  181. uppQTSMediaGetInfoProcInfo = 0x00000FF0,
  182. uppQTSMediaSetIndStreamInfoProcInfo = 0x00003FF0,
  183. uppQTSMediaGetIndStreamInfoProcInfo = 0x00003FF0
  184. };
  185. #endif // !__LP64__
  186. #if PRAGMA_STRUCT_ALIGN
  187. #pragma options align=reset
  188. #elif PRAGMA_STRUCT_PACKPUSH
  189. #pragma pack(pop)
  190. #elif PRAGMA_STRUCT_PACK
  191. #pragma pack()
  192. #endif
  193. #ifdef PRAGMA_IMPORT_OFF
  194. #pragma import off
  195. #elif PRAGMA_IMPORT
  196. #pragma import reset
  197. #endif
  198. #ifdef __cplusplus
  199. }
  200. #endif
  201. #endif /* __QTSMOVIE__ */