Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 5.24 KB

lowlagphotosequencecapture.md

File metadata and controls

49 lines (29 loc) · 5.24 KB
-api-id -api-type
T:Windows.Media.Capture.LowLagPhotoSequenceCapture
winrt class

Windows.Media.Capture.LowLagPhotoSequenceCapture

-description

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

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

-examples

-see-also

MediaCapture.PrepareLowLagPhotoSequenceCaptureAsync, LowLagPhotoSequenceControl, MediaControl.VideoDeviceController, LowLagPhotoCapture