CapturePhotoCaptureDelegate class Null safety

Methods for monitoring progress and receiving results from a photo capture output.

You add callbacks to CapturePhotoCaptureDelegate to be notified of progress and results when capturing photos with the CapturePhotoOutput class.

To capture a photo, you pass an instance of this class to the CapturePhotoOutput.capturePhotoWithSettings method, along with a settings object that describes the capture to be performed. As the capture proceeds, the photo output calls several of the callbacks in this protocol on your delegate object, providing information about the capture’s progress and delivering the resulting photos.

Which callbacks methods the photo output calls depends on the photo settings you initiate capture with. All callbacks in this class are optional at compile time, but at run time your delegate object must respond to certain methods depending on your photo settings:

  • If you request a still photo capture (by specifying image formats or file types), your delegate either must implement the didFinishProcessingPhoto callback, or must implement callbacks in the class corresponding to whether you request capture in RAW format, processed format, or both.

  • If you request Live Photo capture (by setting the CapturePhotoSettings.livePhotoMovieFileURL property to a non-nil value), your delegate must implement the didFinishProcessingLivePhotoToMovieFile callback.

The capture output validates these requirements when you call the CapturePhotoOutput.capturePhotoWithSettings method. If your delegate does not meet these requirements, that method raises an exception.

You must use a unique CapturePhotoSettings object for each capture request. When the photo output calls your delegate methods, it provides an CaptureResolvedPhotoSettings object whose uniqueID property matches that of the photo settings you requested capture with. When making multiple captures, use this unique ID to determine which delegate method calls correspond to which requests.

The photo output may call a callback more than once, or not at all, depending on your photo settings. See the description of each callback for details.

Mixed in types
Annotations
  • @Reference('av_foundation/av_foundation/CapturePhotoCaptureDelegate')

Constructors

CapturePhotoCaptureDelegate({required FinishProcessingPhotoCallback didFinishProcessingPhoto})
Construct a CapturePhotoCaptureDelegate.

Properties

didFinishProcessingPhoto FinishProcessingPhotoCallback
Provides the delegate with the captured image and associated metadata resulting from a photo capture.
final
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited