Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

AVCaptureDeviceMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class AVFoundation MBS AVFoundation Plugin 13.2 Yes No No Yes, macOS only No
Function: An AVCaptureDevice object represents a physical capture device and the properties associated with that device.
Example:
dim device as AVCaptureDeviceMBS = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox device.localizedName
Notes:
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.

Feedback, Comments & Corrections

Device Position Modes

Constant Value Description
AVCaptureDevicePositionBack 1 The capture device is on the back of the unit.
AVCaptureDevicePositionFront 2 The capture device is on the front of the unit.
AVCaptureDevicePositionUnspecified 0 The capture device's position relative to the system hardware is unspecified.

Transport Control Modes

Constant Value Description
AVCaptureDeviceTransportControlsNotPlayingMode 0 Indicates that the tape transport is not threaded through the play head.
AVCaptureDeviceTransportControlsPlayingMode 1 Indicates that the tape transport is threaded through the play head.

Exposure Mode Constants

Constant Value Description
AVCaptureExposureModeAutoExpose 1 The device continuously monitors exposure levels and auto exposes when necessary.
AVCaptureExposureModeContinuousAutoExposure 2 The device performs an auto-expose operation now.
AVCaptureExposureModeLocked 0 The exposure setting is locked.

Flash Modes

Constant Value Description
AVCaptureFlashModeAuto 2 The capture device continuously monitors light levels and uses the flash when necessary.
AVCaptureFlashModeOff 0 The capture device flash is always off.
AVCaptureFlashModeOn 1 The capture device flash is always on.

Focus Modes

Constant Value Description
AVCaptureFocusModeAutoFocus 1 The capture device performs an autofocus operation now.
AVCaptureFocusModeContinuousAutoFocus 2 The capture device continuously monitors focus and auto focuses when necessary.
AVCaptureFocusModeLocked 0 The focus is locked.

Torch Modes

Constant Value Description
AVCaptureTorchModeAuto 2 The capture device continuously monitors light levels and uses the torch when necessary.
AVCaptureTorchModeOff 0 The capture device torch is always off.
AVCaptureTorchModeOn 1 The capture device torch is always on.

White Balance Modes

Constant Value Description
AVCaptureWhiteBalanceModeAutoWhiteBalance 1 The device performs an auto white balance operation now.
AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance 2 The device continuously monitors white balance and adjusts when necessary.
AVCaptureWhiteBalanceModeLocked 0 The white balance setting is locked.

This class has no sub classes.

Some methods using this class:

Some events for this class:

Some examples which use this class:


The items on this page are in the following plugins: MBS AVFoundation Plugin.


AVCaptureDeviceInputSourceMBS   -   AVCaptureFileOutputMBS





Links
MBS FileMaker Plugins