QTSMovie.pas 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. {
  2. File: QuickTime/QTSMovie.h
  3. Contains: QuickTime Interfaces.
  4. Version: QuickTime 7.6.3
  5. Copyright: © 1990-2008 by Apple Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit QTSMovie;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc defined cpu64}
  61. {$setc __LP64__ := 1}
  62. {$elsec}
  63. {$setc __LP64__ := 0}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  66. {$error Conflicting definitions for __ppc__ and __i386__}
  67. {$endc}
  68. {$ifc defined __ppc__ and __ppc__}
  69. {$setc TARGET_CPU_PPC := TRUE}
  70. {$setc TARGET_CPU_PPC64 := FALSE}
  71. {$setc TARGET_CPU_X86 := FALSE}
  72. {$setc TARGET_CPU_X86_64 := FALSE}
  73. {$setc TARGET_CPU_ARM := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$elifc defined __ppc64__ and __ppc64__}
  78. {$setc TARGET_CPU_PPC := FALSE}
  79. {$setc TARGET_CPU_PPC64 := TRUE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$elifc defined __i386__ and __i386__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := FALSE}
  89. {$setc TARGET_CPU_X86 := TRUE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$ifc defined(iphonesim)}
  93. {$setc TARGET_OS_MAC := FALSE}
  94. {$setc TARGET_OS_IPHONE := TRUE}
  95. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  96. {$elsec}
  97. {$setc TARGET_OS_MAC := TRUE}
  98. {$setc TARGET_OS_IPHONE := FALSE}
  99. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  100. {$endc}
  101. {$elifc defined __x86_64__ and __x86_64__}
  102. {$setc TARGET_CPU_PPC := FALSE}
  103. {$setc TARGET_CPU_PPC64 := FALSE}
  104. {$setc TARGET_CPU_X86 := FALSE}
  105. {$setc TARGET_CPU_X86_64 := TRUE}
  106. {$setc TARGET_CPU_ARM := FALSE}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$elifc defined __arm__ and __arm__}
  111. {$setc TARGET_CPU_PPC := FALSE}
  112. {$setc TARGET_CPU_PPC64 := FALSE}
  113. {$setc TARGET_CPU_X86 := FALSE}
  114. {$setc TARGET_CPU_X86_64 := FALSE}
  115. {$setc TARGET_CPU_ARM := TRUE}
  116. { will require compiler define when/if other Apple devices with ARM cpus ship }
  117. {$setc TARGET_OS_MAC := FALSE}
  118. {$setc TARGET_OS_IPHONE := TRUE}
  119. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  120. {$elsec}
  121. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  122. {$endc}
  123. {$ifc defined __LP64__ and __LP64__ }
  124. {$setc TARGET_CPU_64 := TRUE}
  125. {$elsec}
  126. {$setc TARGET_CPU_64 := FALSE}
  127. {$endc}
  128. {$ifc defined FPC_BIG_ENDIAN}
  129. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  130. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  131. {$elifc defined FPC_LITTLE_ENDIAN}
  132. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  133. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  134. {$elsec}
  135. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  136. {$endc}
  137. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  138. {$setc CALL_NOT_IN_CARBON := FALSE}
  139. {$setc OLDROUTINENAMES := FALSE}
  140. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  141. {$setc OPAQUE_UPP_TYPES := TRUE}
  142. {$setc OTCARBONAPPLICATION := TRUE}
  143. {$setc OTKERNEL := FALSE}
  144. {$setc PM_USE_SESSION_APIS := TRUE}
  145. {$setc TARGET_API_MAC_CARBON := TRUE}
  146. {$setc TARGET_API_MAC_OS8 := FALSE}
  147. {$setc TARGET_API_MAC_OSX := TRUE}
  148. {$setc TARGET_CARBON := TRUE}
  149. {$setc TARGET_CPU_68K := FALSE}
  150. {$setc TARGET_CPU_MIPS := FALSE}
  151. {$setc TARGET_CPU_SPARC := FALSE}
  152. {$setc TARGET_OS_UNIX := FALSE}
  153. {$setc TARGET_OS_WIN32 := FALSE}
  154. {$setc TARGET_RT_MAC_68881 := FALSE}
  155. {$setc TARGET_RT_MAC_CFM := FALSE}
  156. {$setc TARGET_RT_MAC_MACHO := TRUE}
  157. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  158. {$setc TYPE_BOOL := FALSE}
  159. {$setc TYPE_EXTENDED := FALSE}
  160. {$setc TYPE_LONGLONG := TRUE}
  161. uses MacTypes,Components,Movies,QuickTimeStreaming;
  162. {$endc} {not MACOSALLINCLUDE}
  163. {$ifc TARGET_OS_MAC}
  164. {$ALIGN MAC68K}
  165. { QuickTime is not available to 64-bit clients }
  166. {$ifc not TARGET_CPU_64}
  167. const
  168. kQTSStreamMediaType = FourCharCode('strm');
  169. type
  170. QTSSampleDescription = record
  171. descSize: SIGNEDLONG;
  172. dataFormat: SIGNEDLONG;
  173. resvd1: SIGNEDLONG; { set to 0}
  174. resvd2: SInt16; { set to 0}
  175. dataRefIndex: SInt16;
  176. version: UInt32;
  177. resvd3: UInt32; { set to 0}
  178. flags: SInt32;
  179. { qt atoms follow:}
  180. { long size, long type, some data}
  181. { repeat as necessary}
  182. end;
  183. QTSSampleDescriptionPtr = ^QTSSampleDescription;
  184. type
  185. QTSSampleDescriptionHandle = ^QTSSampleDescriptionPtr;
  186. const
  187. kQTSSampleDescriptionVersion1 = 1;
  188. const
  189. kQTSDefaultMediaTimeScale = 600;
  190. { sample description flags}
  191. const
  192. kQTSSampleDescPassSampleDataAsHandleFlag = $00000001;
  193. {============================================================================
  194. Stream Media Handler
  195. ============================================================================}
  196. {-----------------------------------------
  197. Info Selectors
  198. -----------------------------------------}
  199. { all indexes start at 1 }
  200. const
  201. kQTSMediaPresentationInfo = FourCharCode('pres'); { QTSMediaPresentationParams* }
  202. kQTSMediaNotificationInfo = FourCharCode('noti'); { QTSMediaNotificationParams* }
  203. kQTSMediaTotalDataRateInfo = FourCharCode('dtrt'); { UInt32*, bits/sec }
  204. kQTSMediaLostPercentInfo = FourCharCode('lspc'); { Fixed* }
  205. kQTSMediaNumStreamsInfo = FourCharCode('nstr'); { UInt32* }
  206. kQTSMediaIndSampleDescriptionInfo = FourCharCode('isdc'); { QTSMediaIndSampleDescriptionParams* }
  207. type
  208. QTSMediaPresentationParamsPtr = ^QTSMediaPresentationParams;
  209. QTSMediaPresentationParams = record
  210. presentationID: QTSPresentation;
  211. end;
  212. type
  213. QTSMediaNotificationParamsPtr = ^QTSMediaNotificationParams;
  214. QTSMediaNotificationParams = record
  215. notificationProc: QTSNotificationUPP;
  216. notificationRefCon: UnivPtr;
  217. flags: SInt32;
  218. end;
  219. type
  220. QTSMediaIndSampleDescriptionParamsPtr = ^QTSMediaIndSampleDescriptionParams;
  221. QTSMediaIndSampleDescriptionParams = record
  222. index: SInt32;
  223. returnedMediaType: OSType;
  224. returnedSampleDescription: SampleDescriptionHandle;
  225. end;
  226. {-----------------------------------------
  227. QTS Media Handler Selectors
  228. -----------------------------------------}
  229. const
  230. kQTSMediaSetInfoSelect = $0100;
  231. kQTSMediaGetInfoSelect = $0101;
  232. kQTSMediaSetIndStreamInfoSelect = $0102;
  233. kQTSMediaGetIndStreamInfoSelect = $0103;
  234. {-----------------------------------------
  235. QTS Media Handler functions
  236. -----------------------------------------}
  237. {
  238. * QTSMediaSetInfo()
  239. *
  240. * Availability:
  241. * Mac OS X: in version 10.0 and later in QuickTime.framework
  242. * CarbonLib: in CarbonLib 1.1 and later
  243. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  244. * Windows: in QTSClient.lib 4.0 and later
  245. }
  246. function QTSMediaSetInfo( mh: MediaHandler; inSelector: OSType; ioParams: UnivPtr ): ComponentResult; external name '_QTSMediaSetInfo';
  247. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  248. {
  249. * QTSMediaGetInfo()
  250. *
  251. * Availability:
  252. * Mac OS X: in version 10.0 and later in QuickTime.framework
  253. * CarbonLib: in CarbonLib 1.1 and later
  254. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  255. * Windows: in QTSClient.lib 4.0 and later
  256. }
  257. function QTSMediaGetInfo( mh: MediaHandler; inSelector: OSType; ioParams: UnivPtr ): ComponentResult; external name '_QTSMediaGetInfo';
  258. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  259. {
  260. * QTSMediaSetIndStreamInfo()
  261. *
  262. * Availability:
  263. * Mac OS X: in version 10.0 and later in QuickTime.framework
  264. * CarbonLib: in CarbonLib 1.1 and later
  265. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  266. * Windows: in QTSClient.lib 4.0 and later
  267. }
  268. function QTSMediaSetIndStreamInfo( mh: MediaHandler; inIndex: SInt32; inSelector: OSType; ioParams: UnivPtr ): ComponentResult; external name '_QTSMediaSetIndStreamInfo';
  269. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  270. {
  271. * QTSMediaGetIndStreamInfo()
  272. *
  273. * Availability:
  274. * Mac OS X: in version 10.0 and later in QuickTime.framework
  275. * CarbonLib: in CarbonLib 1.1 and later
  276. * Non-Carbon CFM: in QTStreamLib 4.0 and later
  277. * Windows: in QTSClient.lib 4.0 and later
  278. }
  279. function QTSMediaGetIndStreamInfo( mh: MediaHandler; inIndex: SInt32; inSelector: OSType; ioParams: UnivPtr ): ComponentResult; external name '_QTSMediaGetIndStreamInfo';
  280. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  281. {============================================================================
  282. Hint Media Handler
  283. ============================================================================}
  284. const
  285. kQTSHintMediaType = FourCharCode('hint');
  286. const
  287. kQTSHintTrackReference = FourCharCode('hint');
  288. { MixedMode ProcInfo constants for component calls }
  289. const
  290. uppQTSMediaSetInfoProcInfo = $00000FF0;
  291. uppQTSMediaGetInfoProcInfo = $00000FF0;
  292. uppQTSMediaSetIndStreamInfoProcInfo = $00003FF0;
  293. uppQTSMediaGetIndStreamInfoProcInfo = $00003FF0;
  294. {$endc} {not TARGET_CPU_64}
  295. {$endc} {TARGET_OS_MAC}
  296. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  297. end.
  298. {$endc} {not MACOSALLINCLUDE}