AVCaptureDevice.inc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. { Parsed from AVFoundation.framework AVCaptureDevice.h }
  2. { Types from AVCaptureDevice }
  3. {$ifdef TYPES}
  4. {$endif}
  5. {$ifdef TYPES}
  6. type
  7. AVCaptureDevicePtr = ^AVCaptureDevice;
  8. AVFrameRateRangePtr = ^AVFrameRateRange;
  9. AVCaptureDeviceFormatPtr = ^AVCaptureDeviceFormat;
  10. AVCaptureDeviceInputSourcePtr = ^AVCaptureDeviceInputSource;
  11. {$endif}
  12. {$ifdef EXTERNAL_SYMBOLS}
  13. var
  14. AVCaptureDeviceWasConnectedNotification: NSString { available in 10_7, 4_0 }; cvar; external;
  15. AVCaptureDeviceWasDisconnectedNotification: NSString { available in 10_7, 4_0 }; cvar; external;
  16. AVCaptureDeviceSubjectAreaDidChangeNotification: NSString { available in 5_0 }; cvar; external;
  17. {$endif}
  18. {$ifdef CLASSES}
  19. type
  20. AVCaptureDevice = objcclass external (NSObject)
  21. private
  22. _internal: AVCaptureDeviceInternal;
  23. public
  24. class function devices: NSArray; message 'devices';
  25. class function devicesWithMediaType (mediaType: NSString): NSArray; message 'devicesWithMediaType:';
  26. class function defaultDeviceWithMediaType (mediaType: NSString): AVCaptureDevice; message 'defaultDeviceWithMediaType:';
  27. class function deviceWithUniqueID (deviceUniqueID: NSString): AVCaptureDevice; message 'deviceWithUniqueID:';
  28. function uniqueID: NSString; message 'uniqueID';
  29. function modelID: NSString; message 'modelID';
  30. function localizedName: NSString; message 'localizedName';
  31. {$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}
  32. function manufacturer: NSString; message 'manufacturer';
  33. function transportType: cint32; message 'transportType';
  34. {$endif}
  35. function hasMediaType (mediaType: NSString): ObjCBOOL; message 'hasMediaType:';
  36. function lockForConfiguration (outError: NSErrorPtr): ObjCBOOL; message 'lockForConfiguration:';
  37. procedure unlockForConfiguration; message 'unlockForConfiguration';
  38. function supportsAVCaptureSessionPreset (preset: NSString): ObjCBOOL; message 'supportsAVCaptureSessionPreset:';
  39. function isConnected: ObjCBOOL; message 'isConnected';
  40. {$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}
  41. function isInUseByAnotherApplication: ObjCBOOL; message 'isInUseByAnotherApplication';
  42. function isSuspended: ObjCBOOL; message 'isSuspended';
  43. function linkedDevices: NSArray; message 'linkedDevices';
  44. function formats: NSArray; message 'formats';
  45. procedure setActiveFormat(newValue: AVCaptureDeviceFormat); message 'setActiveFormat:';
  46. function activeFormat: AVCaptureDeviceFormat; message 'activeFormat';
  47. procedure setActiveVideoMinFrameDuration(newValue: CMTime); message 'setActiveVideoMinFrameDuration:';
  48. function activeVideoMinFrameDuration: CMTime; message 'activeVideoMinFrameDuration';
  49. procedure setActiveVideoMaxFrameDuration(newValue: CMTime); message 'setActiveVideoMaxFrameDuration:';
  50. function activeVideoMaxFrameDuration: CMTime; message 'activeVideoMaxFrameDuration';
  51. function inputSources: NSArray; message 'inputSources';
  52. procedure setActiveInputSource(newValue: AVCaptureDeviceInputSource); message 'setActiveInputSource:';
  53. function activeInputSource: AVCaptureDeviceInputSource; message 'activeInputSource';
  54. {$endif}
  55. end;
  56. {$endif}
  57. {$ifdef TYPES}
  58. type
  59. AVCaptureDevicePosition = NSInteger;
  60. AVCaptureDevicePositionPtr = ^AVCaptureDevicePosition;
  61. const
  62. AVCaptureDevicePositionUnspecified = 0;
  63. AVCaptureDevicePositionBack = 1;
  64. AVCaptureDevicePositionFront = 2;
  65. {$endif}
  66. {$ifdef CLASSES}
  67. type
  68. AVCaptureDevice_AVCaptureDevicePosition = objccategory external name 'AVCaptureDevicePosition' (AVCaptureDevice)
  69. function position: AVCaptureDevicePosition; message 'position';
  70. end;
  71. {$endif}
  72. {$ifdef TYPES}
  73. type
  74. AVCaptureFlashMode = NSInteger;
  75. AVCaptureFlashModePtr = ^AVCaptureFlashMode;
  76. const
  77. AVCaptureFlashModeOff = 0;
  78. AVCaptureFlashModeOn = 1;
  79. AVCaptureFlashModeAuto = 2;
  80. {$endif}
  81. {$ifdef CLASSES}
  82. type
  83. AVCaptureDeviceFlash = objccategory external (AVCaptureDevice)
  84. function hasFlash: ObjCBOOL; message 'hasFlash';
  85. function isFlashAvailable: ObjCBOOL; message 'isFlashAvailable';
  86. function isFlashActive: ObjCBOOL; message 'isFlashActive';
  87. function isFlashModeSupported (flashMode: AVCaptureFlashMode): ObjCBOOL; message 'isFlashModeSupported:';
  88. procedure setFlashMode(newValue: AVCaptureFlashMode); message 'setFlashMode:';
  89. function flashMode: AVCaptureFlashMode; message 'flashMode';
  90. end;
  91. {$endif}
  92. {$ifdef TYPES}
  93. type
  94. AVCaptureTorchMode = NSInteger;
  95. AVCaptureTorchModePtr = ^AVCaptureTorchMode;
  96. const
  97. AVCaptureTorchModeOff = 0;
  98. AVCaptureTorchModeOn = 1;
  99. AVCaptureTorchModeAuto = 2;
  100. {$endif}
  101. {$ifdef EXTERNAL_SYMBOLS}
  102. var
  103. AVCaptureMaxAvailableTorchLevel: single; cvar; external;
  104. {$endif}
  105. {$ifdef CLASSES}
  106. type
  107. AVCaptureDeviceTorch = objccategory external (AVCaptureDevice)
  108. function hasTorch: ObjCBOOL; message 'hasTorch';
  109. function isTorchAvailable: ObjCBOOL; message 'isTorchAvailable';
  110. function isTorchActive: ObjCBOOL; message 'isTorchActive';
  111. function torchLevel: single; message 'torchLevel';
  112. function isTorchModeSupported (torchMode: AVCaptureTorchMode): ObjCBOOL; message 'isTorchModeSupported:';
  113. procedure setTorchMode(newValue: AVCaptureTorchMode); message 'setTorchMode:';
  114. function torchMode: AVCaptureTorchMode; message 'torchMode';
  115. function setTorchModeOnWithLevel_error (torchLevel_: single; outError: NSErrorPtr): ObjCBOOL; message 'setTorchModeOnWithLevel:error:'; { available in 6_0 }
  116. end;
  117. {$endif}
  118. {$ifdef TYPES}
  119. type
  120. AVCaptureFocusMode = NSInteger;
  121. AVCaptureFocusModePtr = ^AVCaptureFocusMode;
  122. const
  123. AVCaptureFocusModeLocked = 0;
  124. AVCaptureFocusModeAutoFocus = 1;
  125. AVCaptureFocusModeContinuousAutoFocus = 2;
  126. {$endif}
  127. {$ifdef CLASSES}
  128. type
  129. AVCaptureDeviceFocus = objccategory external (AVCaptureDevice)
  130. function isFocusModeSupported (focusMode: AVCaptureFocusMode): ObjCBOOL; message 'isFocusModeSupported:';
  131. procedure setFocusMode(newValue: AVCaptureFocusMode); message 'setFocusMode:';
  132. function focusMode: AVCaptureFocusMode; message 'focusMode';
  133. function isFocusPointOfInterestSupported: ObjCBOOL; message 'isFocusPointOfInterestSupported';
  134. procedure setFocusPointOfInterest(newValue: CGPoint); message 'setFocusPointOfInterest:';
  135. function focusPointOfInterest: CGPoint; message 'focusPointOfInterest';
  136. function isAdjustingFocus: ObjCBOOL; message 'isAdjustingFocus';
  137. end;
  138. {$endif}
  139. {$ifdef TYPES}
  140. type
  141. AVCaptureExposureMode = NSInteger;
  142. AVCaptureExposureModePtr = ^AVCaptureExposureMode;
  143. const
  144. AVCaptureExposureModeLocked = 0;
  145. AVCaptureExposureModeAutoExpose = 1;
  146. AVCaptureExposureModeContinuousAutoExposure = 2;
  147. {$endif}
  148. {$ifdef CLASSES}
  149. type
  150. AVCaptureDeviceExposure = objccategory external (AVCaptureDevice)
  151. function isExposureModeSupported (exposureMode: AVCaptureExposureMode): ObjCBOOL; message 'isExposureModeSupported:';
  152. procedure setExposureMode(newValue: AVCaptureExposureMode); message 'setExposureMode:';
  153. function exposureMode: AVCaptureExposureMode; message 'exposureMode';
  154. function isExposurePointOfInterestSupported: ObjCBOOL; message 'isExposurePointOfInterestSupported';
  155. procedure setExposurePointOfInterest(newValue: CGPoint); message 'setExposurePointOfInterest:';
  156. function exposurePointOfInterest: CGPoint; message 'exposurePointOfInterest';
  157. function isAdjustingExposure: ObjCBOOL; message 'isAdjustingExposure';
  158. end;
  159. {$endif}
  160. {$ifdef TYPES}
  161. type
  162. AVCaptureWhiteBalanceMode = NSInteger;
  163. AVCaptureWhiteBalanceModePtr = ^AVCaptureWhiteBalanceMode;
  164. const
  165. AVCaptureWhiteBalanceModeLocked = 0;
  166. AVCaptureWhiteBalanceModeAutoWhiteBalance = 1;
  167. AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance = 2;
  168. {$endif}
  169. {$ifdef CLASSES}
  170. type
  171. AVCaptureDeviceWhiteBalance = objccategory external (AVCaptureDevice)
  172. function isWhiteBalanceModeSupported (whiteBalanceMode: AVCaptureWhiteBalanceMode): ObjCBOOL; message 'isWhiteBalanceModeSupported:';
  173. procedure setWhiteBalanceMode(newValue: AVCaptureWhiteBalanceMode); message 'setWhiteBalanceMode:';
  174. function whiteBalanceMode: AVCaptureWhiteBalanceMode; message 'whiteBalanceMode';
  175. function isAdjustingWhiteBalance: ObjCBOOL; message 'isAdjustingWhiteBalance';
  176. end;
  177. type
  178. AVCaptureDeviceSubjectAreaChangeMonitoring = objccategory external (AVCaptureDevice)
  179. procedure setSubjectAreaChangeMonitoringEnabled(newValue: ObjCBOOL); message 'setSubjectAreaChangeMonitoringEnabled:';
  180. function isSubjectAreaChangeMonitoringEnabled: ObjCBOOL; message 'isSubjectAreaChangeMonitoringEnabled';
  181. end;
  182. type
  183. AVCaptureDeviceLowLightBoost = objccategory external (AVCaptureDevice)
  184. function isLowLightBoostSupported: ObjCBOOL; message 'isLowLightBoostSupported';
  185. function isLowLightBoostEnabled: ObjCBOOL; message 'isLowLightBoostEnabled';
  186. procedure setAutomaticallyEnablesLowLightBoostWhenAvailable(newValue: ObjCBOOL); message 'setAutomaticallyEnablesLowLightBoostWhenAvailable:';
  187. function automaticallyEnablesLowLightBoostWhenAvailable: ObjCBOOL; message 'automaticallyEnablesLowLightBoostWhenAvailable';
  188. end;
  189. {$endif}
  190. {$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}
  191. {$ifdef TYPES}
  192. type
  193. AVCaptureDeviceTransportControlsSpeed = single;
  194. AVCaptureDeviceTransportControlsSpeedPtr = ^AVCaptureDeviceTransportControlsSpeed;
  195. AVCaptureDeviceTransportControlsPlaybackMode = NSInteger;
  196. AVCaptureDeviceTransportControlsPlaybackModePtr = ^AVCaptureDeviceTransportControlsPlaybackMode;
  197. const
  198. AVCaptureDeviceTransportControlsNotPlayingMode = 0;
  199. AVCaptureDeviceTransportControlsPlayingMode = 1;
  200. {$endif}
  201. {$ifdef CLASSES}
  202. type
  203. AVCaptureDeviceTransportControls = objccategory external (AVCaptureDevice)
  204. function transportControlsSupported: ObjCBOOL; message 'transportControlsSupported';
  205. function transportControlsPlaybackMode: AVCaptureDeviceTransportControlsPlaybackMode; message 'transportControlsPlaybackMode';
  206. function transportControlsSpeed: AVCaptureDeviceTransportControlsSpeed; message 'transportControlsSpeed';
  207. procedure setTransportControlsPlaybackMode_speed (mode: AVCaptureDeviceTransportControlsPlaybackMode; speed: AVCaptureDeviceTransportControlsSpeed); message 'setTransportControlsPlaybackMode:speed:'; { available in 10_7, NA }
  208. end;
  209. {$endif}
  210. {$endif}
  211. {$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}
  212. {$ifdef CLASSES}
  213. type
  214. AVFrameRateRange = objcclass external (NSObject)
  215. private
  216. _internal: AVFrameRateRangeInternal;
  217. public
  218. function minFrameRate: Float64; message 'minFrameRate';
  219. function maxFrameRate: Float64; message 'maxFrameRate';
  220. function maxFrameDuration: CMTime; message 'maxFrameDuration';
  221. function minFrameDuration: CMTime; message 'minFrameDuration';
  222. end;
  223. {$endif}
  224. {$endif}
  225. {$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}
  226. {$ifdef CLASSES}
  227. type
  228. AVCaptureDeviceFormat = objcclass external (NSObject)
  229. private
  230. _internal: AVCaptureDeviceFormatInternal;
  231. public
  232. function mediaType: NSString; message 'mediaType';
  233. function formatDescription: CMFormatDescriptionRef; message 'formatDescription';
  234. function videoSupportedFrameRateRanges: NSArray; message 'videoSupportedFrameRateRanges';
  235. end;
  236. {$endif}
  237. {$endif}
  238. {$if (defined(TARGET_OS_MAC) and not (defined(TARGET_OS_EMBEDDED) or defined(TARGET_OS_IPHONE)))}
  239. {$ifdef CLASSES}
  240. type
  241. AVCaptureDeviceInputSource = objcclass external (NSObject)
  242. private
  243. _internal: AVCaptureDeviceInputSourceInternal;
  244. public
  245. function inputSourceID: NSString; message 'inputSourceID';
  246. function localizedName: NSString; message 'localizedName';
  247. end;
  248. {$endif}
  249. {$endif}