LowLagPhotoSequenceCapture LowLagPhotoSequenceCapture LowLagPhotoSequenceCapture LowLagPhotoSequenceCapture Class

Definition

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

public : sealed class LowLagPhotoSequenceCapture : ILowLagPhotoSequenceCapturepublic sealed class LowLagPhotoSequenceCapture : ILowLagPhotoSequenceCapturePublic NotInheritable Class LowLagPhotoSequenceCapture Implements ILowLagPhotoSequenceCapture// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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() FinishAsync() FinishAsync() FinishAsync()

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

public : IAsyncAction FinishAsync()public IAsyncAction FinishAsync()Public Function FinishAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Object that is used to control the asynchronous operation.

Remarks

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.

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

StartAsync() StartAsync() StartAsync() StartAsync()

Asynchronously starts capturing photos.

public : IAsyncAction StartAsync()public IAsyncAction StartAsync()Public Function StartAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Object that is used to control the asynchronous operation.

Remarks

MediaCapture.PrepareLowLagPhotoSequenceCaptureAsync must be called before 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.

StopAsync() StopAsync() StopAsync() StopAsync()

Asynchronously stops capturing photos.

public : IAsyncAction StopAsync()public IAsyncAction StopAsync()Public Function StopAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Object that is used to control the asynchronous operation.

Remarks

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

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.

Events

PhotoCaptured PhotoCaptured PhotoCaptured PhotoCaptured

Occurs when a photo has been captured.

public : event TypedEventHandler PhotoCaptured<LowLagPhotoSequenceCapture,  PhotoCapturedEventArgs>public event TypedEventHandler PhotoCaptured<LowLagPhotoSequenceCapture,  PhotoCapturedEventArgs>Public Event PhotoCaptured<LowLagPhotoSequenceCapture,  PhotoCapturedEventArgs>// You can use this event in JavaScript.

Remarks

Add an 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.