|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||AVFoundation||MBS AVFoundation Plugin||13.2||Yes||No||No||Yes, macOS only||No|
dim device as AVCaptureDeviceMBS = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
You use a capture device to configure the properties of the underlying hardware. A capture device also provides input data (such as audio or video) to an AVCaptureSession object.
You use the methods of the AVCaptureDevice class to enumerate the available devices, query their capabilities, and be informed about when devices come and go. Before you attempt to set properties of a capture device (its focus mode, exposure mode, and so on), you must first acquire a lock on the device using the lockForConfiguration method. You can then set the properties and release the lock using the unlockForConfiguration method. You may hold the lock if you want all settable device properties to remain unchanged. However, holding the device lock unnecessarily may degrade capture quality in other applications sharing the device and is not recommended.
May work for all built-in cameras and microphones as well as external USB webcams, as far as Apple supports them.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 31 properties
- property activeFormat as AVCaptureDeviceFormatMBS
- property activeInputSource as AVCaptureDeviceInputSourceMBS
- property activeVideoMaxFrameDuration as CMTimeMBS
- property activeVideoMinFrameDuration as CMTimeMBS
- property exposureMode as Integer
- property exposurePointOfInterest as CGPointMBS
- property flashMode as Integer
- property focusMode as Integer
- property focusPointOfInterest as CGPointMBS
- property Handle as Integer
- property hasFlash as boolean
- property hasTorch as boolean
- property isAdjustingExposure as boolean
- property isAdjustingFocus as boolean
- property isAdjustingWhiteBalance as boolean
- property isConnected as boolean
- property isExposurePointOfInterestSupported as boolean
- property isFocusPointOfInterestSupported as boolean
- property isInUseByAnotherApplication as boolean
- property isSuspended as boolean
- property localizedName as string
- property manufacturer as String
- property modelID as string
- property position as Integer
- property torchMode as Integer
- property transportControlsPlaybackMode as Integer
- property transportControlsSpeed as Double
- property transportControlsSupported as boolean
- property transportType as Integer
- property uniqueID as string
- property whiteBalanceMode as Integer
- 14 methods
- method Constructor
- method formats as AVCaptureDeviceFormatMBS()
- method hasMediaType(mediaType as string) as boolean
- method inputSources as AVCaptureDeviceInputSourceMBS()
- method isExposureModeSupported(exposureMode as Integer) as boolean
- method isFlashModeSupported(FlashMode as Integer) as boolean
- method isFocusModeSupported(focusMode as Integer) as boolean
- method isTorchModeSupported(torchMode as Integer) as boolean
- method isWhiteBalanceModeSupported(mode as Integer) as boolean
- method linkedDevices as AVCaptureDeviceMBS()
- method lockForConfiguration(byref error as NSErrorMBS) as boolean
- method setTransportControlsPlaybackMode(mode as Integer, speed as Double)
- method supportsAVCaptureSessionPreset(preset as string) as boolean
- method unlockForConfiguration
- 8 shared methods
- shared method authorizationStatusForMediaType(mediaType as string) as Integer
- shared method available as boolean
- shared method AVCaptureMaxAvailableTorchLevel as Double
- shared method defaultDeviceWithMediaType(mediaType as string) as AVCaptureDeviceMBS
- shared method devices as AVCaptureDeviceMBS()
- shared method devicesWithMediaType(mediaType as string) as AVCaptureDeviceMBS()
- shared method deviceWithUniqueID(deviceUniqueID as string) as AVCaptureDeviceMBS
- shared method requestAccessForMediaType(mediaType as string, tag as variant = nil)
- 24 constants
The client is authorized to access the hardware supporting a media type. This is default for MacOS 10.13 or older.
The user explicitly denied access to the hardware supporting a media type for the client.
Indicates that the user has not yet made a choice regarding whether the client can access the hardware.
The client is not authorized to access the hardware for the media type. The user cannot change the client's status, possibly due to active restrictions such as parental controls being in place.
Device Position Modes
The capture device is on the back of the unit.
The capture device is on the front of the unit.
The capture device's position relative to the system hardware is unspecified.
Transport Control Modes
Indicates that the tape transport is not threaded through the play head.
Indicates that the tape transport is threaded through the play head.
Exposure Mode Constants
The device continuously monitors exposure levels and auto exposes when necessary.
The device performs an auto-expose operation now.
The exposure setting is locked.
The capture device continuously monitors light levels and uses the flash when necessary.
The capture device flash is always off.
The capture device flash is always on.
The capture device performs an autofocus operation now.
The capture device continuously monitors focus and auto focuses when necessary.
The focus is locked.
The capture device continuously monitors light levels and uses the torch when necessary.
The capture device torch is always off.
The capture device torch is always on.
White Balance Modes
The device performs an auto white balance operation now.
The device continuously monitors white balance and adjusts when necessary.
The white balance setting is locked.
This class has no sub classes.
Some methods using this class:
- AVCaptureDeviceInputMBS.Constructor(Device as AVCaptureDeviceMBS, byref error as NSErrorMBS)
- AVCaptureDeviceInputMBS.device as AVCaptureDeviceMBS
- AVCaptureDeviceInputMBS.deviceInputWithDevice(device as AVCaptureDeviceMBS, byref error as NSErrorMBS) as AVCaptureDeviceInputMBS
Some events for this class:
- AVFoundationMBS.CaptureDeviceSubjectAreaDidChange(device as AVCaptureDeviceMBS, notification as Variant)
- AVFoundationMBS.CaptureDeviceWasConnected(device as AVCaptureDeviceMBS, notification as Variant)
- AVFoundationMBS.CaptureDeviceWasDisconnected(device as AVCaptureDeviceMBS, notification as Variant)
Some examples which use this class:
- /AVFoundation/AVCaptureDevice Authorization
- /AVFoundation/Device List
- /AVFoundation/Live Barcode Detection
- /AVFoundation/Live picture processing
- /AVFoundation/Screen Recorder
- /AVFoundation/Still Photos
The items on this page are in the following plugins: MBS AVFoundation Plugin.
MBS FileMaker tutorial videos