AVFoundation.pas 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. {$mode delphi}
  2. {$modeswitch objectivec1}
  3. {$modeswitch cvar}
  4. {$packrecords c}
  5. {$macro on}
  6. {$define instancetype := id}
  7. {$ifndef LOADED_AVAILABILITY_MACROS}
  8. {$define LOADED_AVAILABILITY_MACROS}
  9. // System Versions MacOSX SDK
  10. {$define MAC_OS_X_VERSION_10_0 := 1000}
  11. {$define MAC_OS_X_VERSION_10_1 := 1010}
  12. {$define MAC_OS_X_VERSION_10_2 := 1020}
  13. {$define MAC_OS_X_VERSION_10_3 := 1030}
  14. {$define MAC_OS_X_VERSION_10_4 := 1040}
  15. {$define MAC_OS_X_VERSION_10_5 := 1050}
  16. {$define MAC_OS_X_VERSION_10_6 := 1060}
  17. {$define MAC_OS_X_VERSION_10_7 := 1070}
  18. {$define MAC_OS_X_VERSION_10_8 := 1080}
  19. {$define MAC_OS_X_VERSION_10_9 := 1090}
  20. {$define MAC_OS_X_VERSION_10_10 := 101000}
  21. {$define MAC_OS_X_VERSION_LATEST := MAC_OS_X_VERSION_10_10}
  22. // System Versions iPhoneOS SDK
  23. {$define __MAC_10_0 := 1000}
  24. {$define __MAC_10_1 := 1010}
  25. {$define __MAC_10_2 := 1020}
  26. {$define __MAC_10_3 := 1030}
  27. {$define __MAC_10_4 := 1040}
  28. {$define __MAC_10_5 := 1050}
  29. {$define __MAC_10_6 := 1060}
  30. {$define __MAC_10_7 := 1070}
  31. {$define __MAC_10_8 := 1080}
  32. {$define __MAC_10_9 := 1090}
  33. {$define __MAC_10_10 := 1100}
  34. {$define __MAC_NA := 9999}
  35. {$define __IPHONE_2_0 := 20000}
  36. {$define __IPHONE_2_1 := 20100}
  37. {$define __IPHONE_2_2 := 20200}
  38. {$define __IPHONE_3_0 := 30000}
  39. {$define __IPHONE_3_1 := 30100}
  40. {$define __IPHONE_3_2 := 30200}
  41. {$define __IPHONE_4_0 := 40000}
  42. {$define __IPHONE_4_1 := 40100}
  43. {$define __IPHONE_4_2 := 40200}
  44. {$define __IPHONE_4_3 := 40300}
  45. {$define __IPHONE_5_0 := 50000}
  46. {$define __IPHONE_6_0 := 60000}
  47. {$define __IPHONE_7_0 := 70000}
  48. {$define __IPHONE_8_0 := 80000}
  49. {$define __IPHONE_NA := 99999}
  50. {$define __IPHONE_LATEST := __IPHONE_8_0}
  51. // Target Conditionals
  52. {$if defined(CPUPOWERPC32)}
  53. {$define TARGET_CPU_PPC}
  54. {$undef TARGET_CPU_PPC64}
  55. {$undef TARGET_CPU_X86}
  56. {$undef TARGET_CPU_X86_64}
  57. {$undef TARGET_CPU_ARM}
  58. {$define TARGET_OS_MAC}
  59. {$undef TARGET_OS_IPHONE}
  60. {$undef TARGET_IPHONE_SIMULATOR}
  61. {$undef TARGET_RT_64_BIT}
  62. {$elseif defined(CPUPOWERPC64)}
  63. {$undef TARGET_CPU_PPC}
  64. {$define TARGET_CPU_PPC64}
  65. {$undef TARGET_CPU_X86}
  66. {$undef TARGET_CPU_X86_64}
  67. {$undef TARGET_CPU_ARM}
  68. {$define TARGET_OS_MAC}
  69. {$undef TARGET_OS_IPHONE}
  70. {$undef TARGET_IPHONE_SIMULATOR}
  71. {$define TARGET_RT_64_BIT}
  72. {$elseif defined(CPUI386)}
  73. {$undef TARGET_CPU_PPC}
  74. {$undef TARGET_CPU_PPC64}
  75. {$define TARGET_CPU_X86}
  76. {$undef TARGET_CPU_X86_64}
  77. {$undef TARGET_CPU_ARM}
  78. {$undef TARGET_RT_64_BIT}
  79. {$if defined(IPHONESIM)}
  80. {$undef TARGET_OS_MAC}
  81. {$define TARGET_OS_IPHONE}
  82. {$define TARGET_IPHONE_SIMULATOR}
  83. {$else}
  84. {$define TARGET_OS_MAC}
  85. {$undef TARGET_OS_IPHONE}
  86. {$undef TARGET_IPHONE_SIMULATOR}
  87. {$endif}
  88. {$elseif defined(CPUX86_64)}
  89. {$undef TARGET_CPU_PPC}
  90. {$undef TARGET_CPU_PPC64}
  91. {$undef TARGET_CPU_X86}
  92. {$define TARGET_CPU_X86_64}
  93. {$undef TARGET_CPU_ARM}
  94. {$define TARGET_OS_MAC}
  95. {$undef TARGET_OS_IPHONE}
  96. {$undef TARGET_IPHONE_SIMULATOR}
  97. {$define TARGET_RT_64_BIT}
  98. {$elseif defined(CPUARM)}
  99. {$undef TARGET_CPU_PPC}
  100. {$undef TARGET_CPU_PPC64}
  101. {$undef TARGET_CPU_X86}
  102. {$undef TARGET_CPU_X86_64}
  103. {$define TARGET_CPU_ARM}
  104. {$undef TARGET_OS_MAC}
  105. {$define TARGET_OS_IPHONE}
  106. {$undef TARGET_IPHONE_SIMULATOR}
  107. {$undef TARGET_RT_64_BIT}
  108. {$endif}
  109. {$ifdef CPU64}
  110. {$define TARGET_CPU_64}
  111. {$define TARGET_RT_64_BIT}
  112. {$else}
  113. {$undef TARGET_CPU_64}
  114. {$undef TARGET_RT_64_BIT}
  115. {$endif}
  116. {$if defined(FPC_BIG_ENDIAN)}
  117. {$define TARGET_RT_BIG_ENDIAN}
  118. {$undef TARGET_RT_LITTLE_ENDIAN}
  119. {$elseif defined(FPC_LITTLE_ENDIAN)}
  120. {$define TARGET_RT_LITTLE_ENDIAN}
  121. {$undef TARGET_RT_BIG_ENDIAN}
  122. {$endif}
  123. {$undef DEPLOYMENT_TARGET_EMBEDDED}
  124. {$undef DEPLOYMENT_TARGET_WINDOWS}
  125. {$define TARGET_API_MAC_CARBON}
  126. {$undef TARGET_API_MAC_OS8}
  127. {$define TARGET_API_MAC_OSX}
  128. {$define TARGET_CARBON}
  129. {$undef TARGET_CPU_68K}
  130. {$undef TARGET_CPU_MIPS}
  131. {$undef TARGET_CPU_SPARC}
  132. {$undef TARGET_CPU_ALPHA}
  133. {$undef TARGET_OS_UNIX}
  134. {$undef TARGET_OS_WIN32}
  135. {$undef TARGET_OS_EMBEDDED}
  136. {$undef TARGET_RT_MAC_68881}
  137. {$undef TARGET_RT_MAC_CFM}
  138. {$define TARGET_RT_MAC_MACHO}
  139. {$undef __OBJC2__}
  140. {$undef __BLOCKS__}
  141. {$undef NS_BLOCKS_AVAILABLE}
  142. {$undef NS_BUILD_32_LIKE_64}
  143. {$undef NS_NONATOMIC_IOSONLY}
  144. {$define ACCESSOR_CALLS_ARE_FUNCTIONS}
  145. {$undef CALL_NOT_IN_CARBON}
  146. {$undef OLDROUTINENAMES}
  147. {$define OPAQUE_TOOLBOX_STRUCTS}
  148. {$define OPAQUE_UPP_TYPES}
  149. {$define OTCARBONAPPLICATION}
  150. {$undef OTKERNEL}
  151. {$define PM_USE_SESSION_APIS}
  152. {$define TYPED_FUNCTION_POINTERS}
  153. {$undef TYPE_BOOL}
  154. {$undef TYPE_EXTENDED}
  155. {$define TYPE_LONGLONG}
  156. {$ifdef CPU64}
  157. {$define __LP64__}
  158. {$else}
  159. {$undef __LP64__}
  160. {$endif}
  161. // Mac OS X Version Requirements
  162. {$if defined(TARGET_CPU_PPC64) or defined(TARGET_CPU_X86) or defined(TARGET_CPU_X86_64)}
  163. {$define MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_10_4}
  164. {$elseif defined(TARGET_CPU_ARM)}
  165. {$define MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_10_5}
  166. {$else}
  167. {$define MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_10_1}
  168. {$endif}
  169. {$define MAC_OS_X_VERSION_MAX_ALLOWED := MAC_OS_X_VERSION_LATEST}
  170. // iOS Version Requirements
  171. {$define __IPHONE_OS_VERSION_MAX_ALLOWED := __IPHONE_LATEST}
  172. {$define __IPHONE_OS_VERSION_MIN_REQUIRED := __IPHONE_2_0}
  173. // Mac OS X compiled for iOS
  174. {$define __MAC_OS_X_VERSION_MIN_REQUIRED := MAC_OS_X_VERSION_MIN_REQUIRED}
  175. {$define __MAC_OS_X_VERSION_MAX_ALLOWED := MAC_OS_X_VERSION_LATEST}
  176. {$endif}
  177. unit AVFoundation;
  178. interface
  179. {$linkframework AVFoundation}
  180. uses
  181. {$ifdef COCOAALL}
  182. {$ifdef MACOSALL}
  183. DefinedClassesAVFoundation, CoreVideo, CoreMedia, CoreAudio, CocoaAll, CTypes, MacOSAll;
  184. {$else}
  185. DefinedClassesAVFoundation, CoreVideo, CoreMedia, CoreAudio, CTypes, MacTypes, MacOSXPosix, CocoaAll, AEDataModel, IconsCore, IOSurfaceAPI, SecBase, SecTrust, MacGL, CGLTypes, CFBase, CFArray, CFBag, CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber, CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString, CFNetworkErrorss, CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels, CVBase, CVImageBuffer, AudioComponents, AUComponent;
  186. {$endif}
  187. {$else}
  188. {$ifdef MACOSALL}
  189. DefinedClassesAVFoundation, QuartzCore, CoreVideo, CoreMedia, CoreAudio, Foundation, CTypes, MacOSAll;
  190. {$else}
  191. DefinedClassesAVFoundation, QuartzCore, CoreVideo, CoreMedia, CoreAudio, Foundation, CTypes, MacTypes, MacOSXPosix, AEDataModel, IconsCore, IOSurfaceAPI, SecBase, SecTrust, MacGL, CGLTypes, CFBase, CFArray, CFBag, CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber, CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString, CFNetworkErrorss, CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels, CVBase, CVImageBuffer, AudioComponents, AUComponent;
  192. {$endif}
  193. {$endif}
  194. {$define INTERFACE}
  195. {$define CGFLOAT_DEFINED}
  196. {$define NSINTEGER_DEFINED}
  197. type
  198. OpaqueRecord = record end;
  199. OpaqueCBlock = pointer;
  200. OpaqueType = ^SInt32;
  201. objc_protocol = protocol;
  202. idPtr = ^id;
  203. SELPtr = ^SEL;
  204. va_list_rec = OpaqueRecord;
  205. va_list = ^va_list_rec;
  206. {$include UndefinedTypes.inc}
  207. {$include avfoundation/UndefinedTypes.inc}
  208. {$define TYPES}
  209. {$include avfoundation/Sources.inc}
  210. {$undef TYPES}
  211. {$define RECORDS}
  212. {$include avfoundation/Sources.inc}
  213. {$undef RECORDS}
  214. {$define PROTOCOLS}
  215. {$include avfoundation/Sources.inc}
  216. {$undef PROTOCOLS}
  217. {$define CLASSES}
  218. {$include avfoundation/Sources.inc}
  219. {$undef CLASSES}
  220. {$define FUNCTIONS}
  221. {$include avfoundation/Sources.inc}
  222. {$undef FUNCTIONS}
  223. {$define EXTERNAL_SYMBOLS}
  224. {$include avfoundation/Sources.inc}
  225. {$undef EXTERNAL_SYMBOLS}
  226. {$include avfoundation/InlineFunctions.inc}
  227. {$undef INTERFACE}
  228. implementation
  229. {$define IMPLEMENTATION}
  230. {$include avfoundation/InlineFunctions.inc}
  231. {$undef IMPLEMENTATION}
  232. end.