[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
api[apple,AVFoundation] methods
See also
! AVCaptureDevice class methodsFor: #instantiation !
devices
" Returns an array of the available capture devices on the system. "
^(NSArray @ self nativeClass devices) asArray collect: [:each| self @ each ]! !
! AVCaptureDevice class methodsFor: #instantiation !
devicesWithMediaType: mediaType
" Returns an array of the devices able to capture data of a given media type. "
^(NSArray @ (self nativeClass devicesWithMediaType: mediaType)) asArray
collect: [:each| self @ each ]! !
! AVCaptureDevice class methodsFor: #instantiation !
withUniqueID: deviceUniqueID
^self @ (self nativeClass deviceWithUniqueID: deviceUniqueID)! !
! AVCaptureDevice class methodsFor: #instantiation !
defaultDeviceWithMediaType: mediaType
^self @ (self nativeClass defaultDeviceWithMediaType: mediaType)! !
AVCaptureDevice buildIsBooleanGetters: #(
focusPointOfInterestSupported
adjustingFocus
smoothAutoFocusEnabled
autoFocusRangeRestrictionSupported
adjustingExposure
exposurePointOfInterestSupported
adjustingWhiteBalance
rampingVideoZoom
flashActive torchActive
flashAvailable torchAvailable
lowLightBoostSupported
lowLightBoostEnabled
subjectAreaChangeMonitoringEnabled
connected
)!
AVCaptureDevice buildGetters: #(
formats modelID localizedName
uniqueID
)!
AVCaptureDevice buildTypedGetters: #(
#(activeFormat #AVCaptureDeviceFormat)
)!
AVCaptureDevice buildTypedAccessors: #(
#(focusPointOfInterest #CGPoint)
#(exposurePointOfInterest #CGPoint)
)!
AVCaptureDevice buildNumberAccessors: #(
focusMode
autoFocusRangeRestriction
exposureMode
whiteBalanceMode
videoZoomFactor
flashMode torchMode
)!
AVCaptureDevice buildFunctions: #(
#(#isFocusModeSupported: #(focusMode) #Boolean)
#(#isExposureModeSupported: #(exposureMode) #Boolean)
#(#isWhiteBalanceModeSupported: #(whiteBalanceMode) #Boolean)
#(#rampToVideoZoomFactor:withRate: #(factor rate) )
cancelVideoZoomRamp
#(#isFlashModeSupported: #(flashMode) #Boolean)
#(#isTorchModeSupported: #(torchMode) #Boolean)
#(#setTorchModeOnWithLevel:error: #(torchLevel #(outError handle)) )
#(#hasMediaType: #(mediaType) #Boolean)
#(#supportsAVCaptureSessionPreset: #(preset) #Boolean)
#(#setFocusModeLockedWithLensPosition:completionHandler: #(lensPosition #(handler handle)) )
"#(#setExposureModeCustomWithDuration:ISO:completionHandler: #(duration iso #(handler handle)) )"
#(#setExposureTargetBias:completionHandler: #(bias #(handler handle)) )
#(#chromaticityValuesForDeviceWhiteBalanceGains: #(whiteBalanceGains) )
#(#deviceWhiteBalanceGainsForChromaticityValues: #(chromaticityValues) )
#(#deviceWhiteBalanceGainsForTemperatureAndTintValues: #(tempAndTintValues) )
#(#setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler: #(whiteBalanceGains #(handler handle)) )
#(#temperatureAndTintValuesForDeviceWhiteBalanceGains: #(whiteBalanceGains) )
)!
AVCaptureDevice buildBooleanGetters: #(
hasFlash hasTorch
)!
AVCaptureDevice buildNumberGetters: #(
torchLevel position
lensAperture lensPosition
exposureDuration
exposureTargetOffset
exposureTargetBias
minExposureTargetBias
deviceWhiteBalanceGains
maxWhiteBalanceGain
grayWorldDeviceWhiteBalanceGains
)!
AVCaptureDevice buildNumberAccessors: #(
activeVideoMinFrameDuration
activeVideoMaxFrameDuration
)!
AVCaptureDevice buildBooleanAccessors: #(
automaticallyEnablesLowLightBoostWhenAvailable
automaticallyAdjustsVideoHDREnabled
)!
AVCaptureDevice buildIsBooleanAccessors: #(
videoHDREnabled
)!
! AVCaptureDevice methodsFor: #accessing !
iso
^self handle basicAt: #ISO! !
AVCaptureDevice buildPool: #AVCaptureDeviceConstants with: #(
0 #AVCaptureDevicePositionUnspecified
#AVCaptureDevicePositionBack
#AVCaptureDevicePositionFront
0 #AVCaptureFlashModeOff
#AVCaptureFlashModeOn
#AVCaptureFlashModeAuto
0 #AVCaptureTorchModeOff
#AVCaptureTorchModeOn
#AVCaptureTorchModeAuto
0 #AVCaptureFocusModeLocked
#AVCaptureFocusModeAutoFocus
#AVCaptureFocusModeContinuousAutoFocus
0 #AVCaptureExposureModeLocked
#AVCaptureExposureModeAutoExpose
#AVCaptureExposureModeContinuousAutoExposure
#AVCaptureExposureModeCustom
0 #AVCaptureWhiteBalanceModeLocked
#AVCaptureWhiteBalanceModeAutoWhiteBalance
#AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance
0 #AVAuthorizationStatusNotDetermined
#AVAuthorizationStatusRestricted
#AVAuthorizationStatusDenied
#AVAuthorizationStatusAuthorized
0 #AVCaptureAutoFocusRangeRestrictionNone
#AVCaptureAutoFocusRangeRestrictionNear
#AVCaptureAutoFocusRangeRestrictionFar
)!
! AVCaptureInput methodsFor: #accessing !
ports
" Returns the capture input’s ports. "
^(NSArray @ self handle ports) asArray
collect: [:each| AVCaptureInputPort @ each ]! !
! AVCaptureDeviceInput class methodsFor: #instantiation !
withDevice: device error: outError
^self @ (self nativeClass deviceInputWithDevice: device handle error: outError handle)! !
AVCaptureDeviceInput buildTypedGetters: #(
#(device #AVCaptureDevice)
)!
AVCaptureSession buildFunctions: #(
#(#addInput: #(#(input handle)))
#(#addOutput: #(#(output handle)))
startRunning
stopRunning
)!
AVCaptureMetadataOutput buildFunctions: #(
#(#setMetadataObjectsDelegate:queue: #(#(objectsDelegate handle) #(objectsCallbackQueue handle)))
)!
AVCaptureMetadataOutput buildAccessors: #(
metadataObjectTypes
)!
AVCaptureMetadataOutput buildGetters: #(
availableMetadataObjectTypes
)!
! AVMetadataObject class methodsFor: #instantiation !
concreteInstance: aHandle
" Return a concrete instance of the receiver with aHandle. "
| concrete abstract |
abstract := self @ aHandle.
self allSubclassesDo: [:each|
(abstract isKindOfClass: each) ifTrue: [
^abstract as: each
].
].
^abstract! !
AVMetadataObject buildGetters: #(
type
)!
AVMetadataObject buildNumberGetters: #(
time duration
)!
AVMetadataObject buildTypedGetters: #(
#(bounds #CGRect)
)!
AVMetadataFaceObject buildNumberGetters: #(
faceID rollAngle yawAngle
)!
AVMetadataFaceObject buildBooleanGetters: #(
hasRollAngle hasYawAngle
)!
AVMetadataMachineReadableCodeObject buildGetters: #(
corners stringValue
)!
! AVCaptureVideoPreviewLayer class methodsFor: #instantiation !
withSession: anAVCaptureSession
^self @ (self nativeClass layerWithSession: anAVCaptureSession handle)! !
! AVCaptureVideoPreviewLayer class methodsFor: #instantiation !
withSessionWithNoConnection: anAVCaptureSession
^self @ (self nativeClass layerWithSessionWithNoConnection: anAVCaptureSession handle)! !
AVCaptureVideoPreviewLayer buildAccessors: #(
videoGravity
)!
AVCaptureVideoPreviewLayer buildTypedAccessors: #(
#(connection #AVCaptureConnection)
#(session #AVCaptureSession)
)!
AVCaptureVideoPreviewLayer buildFunctions: #(
#(#setSessionWithNoConnection: #(#(session handle)))
#(#captureDevicePointOfInterestForPoint: #(#(pointInLayer handle)) #CGPoint)
#(#pointForCaptureDevicePointOfInterest: #(#(captureDevicePointOfInterest handle)) #CGPoint)
#(#transformedMetadataObjectForMetadataObject: #(#(metadataObject handle)) #AVMetadataObject)
#(#metadataOutputRectOfInterestForRect: #(#(rectInLayerCoordinates handle)) #CGRect)
#(#rectForMetadataOutputRectOfInterest: #(#(rectInMetadataOutputCoordinates handle)) #CGRect)
)!
! AVCaptureConnection class methodsFor: #instantiation !
withInputPorts: ports output: anAVCaptureOutput
^self @ (self nativeClass
connectionWithInputPorts: ports handles
output: anAVCaptureOutput handle)! !
! AVCaptureConnection class methodsFor: #instantiation !
withInputPort: anAVCaptureInputPort videoPreviewLayer: anAVCaptureVideoPreviewLayer
^self @ (self nativeClass
connectionWithInputPorts: anAVCaptureInputPort handle
videoPreviewLayer: anAVCaptureVideoPreviewLayer handle)! !
AVCaptureConnection buildIsBooleanAccessors: #(
enabled videoMirrored
)!
AVCaptureConnection buildBooleanAccessors: #(
automaticallyAdjustsVideoMirroring
)!
AVCaptureConnection buildIsBooleanGetters: #(
active supportsVideoOrientation
videoMirroringSupported
videoStabilizationSupported
)!
AVCaptureConnection buildTypedGetters: #(
#(output #AVCaptureOutput)
#(videoPreviewLayer #AVCaptureVideoPreviewLayer)
)!
AVCaptureConnection buildNumberAccessors: #(
videoOrientation
videoScaleAndCropFactor
)!
AVCaptureConnection buildNumberGetters: #(
videoMaxScaleAndCropFactor
)!
! AVCaptureConnection methodsFor: #accessing !
inputPorts
^(NSArray @ self handle inputPorts) asArray
collect: [:each| AVCaptureInputPort @ each ]! !
! AVCaptureConnection methodsFor: #accessing !
audioChannels
^(NSArray @ self handle audioChannels) asArray
collect: [:each| AVCaptureAudioChannel @ each ]! !
AVCaptureConnection buildPool: #AVCaptureVideoOrientation with: #(
1 #AVCaptureVideoOrientationPortrait
#AVCaptureVideoOrientationPortraitUpsideDown
#AVCaptureVideoOrientationLandscapeRight
#AVCaptureVideoOrientationLandscapeLeft
)!
AVCaptureConnection buildPool: #AVVideoFieldMode with: #(
#AVVideoFieldModeBoth
#AVVideoFieldModeTopOnly
#AVVideoFieldModeBottomOnly
#AVVideoFieldModeDeinterlace
)!