Dela via


LowLagPhotoSequenceCapture Class

Definition

Provides methods for taking a rapid sequence of low shutter lag photos.

public ref class LowLagPhotoSequenceCapture sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class LowLagPhotoSequenceCapture final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class LowLagPhotoSequenceCapture
Public NotInheritable Class LowLagPhotoSequenceCapture
Inheritance
Object Platform::Object IInspectable LowLagPhotoSequenceCapture
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Photo sequence mode takes a rapid sequence of photos. A key scenario for photo sequence is getting photos in the past, that is prior to when the user takes a photo. If you want to take a sequence of photos that each have different settings, such as exposure or flash, use VariablePhotoSequenceCapture.

You can access the LowLagPhotoSequenceControl for the capture device through MediaCapture.VideoDeviceController. LowLagPhotoSequenceControl is used to manage settings related to the photo sequence session.

You can find out if the device supports photo sequence mode by checking LowLagPhotoSequenceControl.Supported.

Use MediaCapture.PrepareLowLagPhotoSequenceCaptureAsync to initialize the photo sequence capture. This is an asynchronous call which returns a LowLagPhotoSequenceCapture object when it is finished. This must be called before StartAsync.

To start capturing photos, call StartAsync. The app will continue to receive photos from the device until the operation is stopped.

StopAsync stops the operation, which can be restarted with StartAsync.

Add a handler to the PhotoCaptured event in order to get the captured photos in the sequence. PhotoCapturedEventArgs provides the data for the captured frames. PhotoCapturedEventArgs.Frame contains the captured photo and PhotoCapturedEventArgs.Thumbnail contains the thumbnail.

FinishAsync stops the photo sequence capture operation and releases the LowLagPhotoSequenceCapture object and resources used by the photo sequence operation. If you want to restart the photo sequence operation after calling FinishAsync, you must call MediaCapture.PrepareLowLagPhotoSequenceCaptureAsync to initialize a new LowLagPhotoSequenceCapture object.

If the media type is changed or an effect is added, you must call MediaCapture.PrepareLowLagPhotoSequenceCaptureAsync to create a new LowLagPhotoCapture object.

LowLagPhotoSequenceControl.GetCurrentFrameRate specifies the frame rate at which the photos are taken.

PhotoCapturedEventArgs.CaptureTimeOffset can be used to tell whether a frame was in the future, greater than 0, or in the past, less than 0.

If the app wants to limit how many frames it gets per second, it can use LowLagPhotoSequenceControl.PhotosPerSecondLimit. This can be useful in situations where the sensor on the device can handle 30fps, but the app only needs 4fps.

To enable thumbnails, set LowLagPhotoSequenceControl.ThumbnailEnabled to true.

You can set the desired thumbnail size through LowLagPhotoSequenceControl.DesiredThumbnailSize and set the thumbnail format through LowLagPhotoSequenceControl.ThumbnailFormat.

The number of past photos cannot be more than LowLagPhotoSequenceControl.MaxPastPhotos, which is the maximum number of past photos that is supported by the driver. The number of past photos returned will be the smaller of the following values: LowLagPhotoSequenceControl.PastPhotoLimit, LowLagPhotoSequenceControl.MaxPastPhotos, or the current number of available past photos.

Methods

FinishAsync()

Asynchronously releases the LowLagPhotoSequenceCapture object and resources used by the photo sequence capture operation.

StartAsync()

Asynchronously starts capturing photos.

StopAsync()

Asynchronously stops capturing photos.

Events

PhotoCaptured

Occurs when a photo has been captured.

Applies to

See also