Photo Sequence Mode

Photo sequence mode enables capturing a sequence of photos in response to a single photo click of the camera. In this mode, the capture system continuously sends buffers to the camera driver to capture the photos in a sequence. This mode also allows capturing photos from a time period prior to photo click.

Photo sequence operation

A camera driver supports the KSPROPERTY_CAMERACONTROL_EXTENDED_PHOTOMODE control if is capable of sequencing photos. The capture pipeline starts a photo sequence by sending down a KS_VideoControlFlag_StartPhotoSequenceCapture trigger to the photo stream. At this point, the driver must start sending capture buffers. The capture pipeline will stop the photo sequence by sending down KS_VideoControlFlag_StopPhotoSequenceCapture to trigger the photo stream off. For each completed photo, a new buffer is sent down to the driver for it to capture frames into.

The capture pipeline has a configuration phase for the photo sequence mode during which it will configure the number of past frames needed for a particular photo sequence session. During the configuration phase, the driver must specify the maximum number of past photo frames it supports. Also, the driver will specify how many buffers are needed to support the required number of past frames.

The extended control, KSPROPERTY_CAMERACONTROL_EXTENDED_PHOTOTRIGGERTIME, will pass down the actual time the user clicked the photo trigger in the camera application to take the photo sequence. Without this time the driver will not know which photo capture to start returning frames from when the KS_VideoControlFlag_StartPhotoSequenceCapture trigger arrives. With this control, the driver is expected to return the photo that is closest to the photo trigger time given.

Frame count negotiation

The following sequence of operations sets the photo mode and frame count for the camera driver.

  1. An application calls an API to prepare the capture system and driver for a photo sequence capture.

  2. The capture system sends a calls the Photo Mode extended property request to the driver, KSPROPERTY_CAMERACONTROL_EXTENDED_PHOTOMODE with KSCAMERA_EXTENDEDPROP_PHOTOMODE_SEQUENCE set in the flags, to start the transition of the driver to photo sequence mode.

    1. The driver is given the requested history frame count from the application. Driver must return the history frame count it is capable of supporting along with the number of buffers needed for to hold history frames.

    2. The driver must update the allocator requirements structure of the pin with the number of buffers by the photo sequence mode transition call using KsEdit.

    3. The driver will change its internal state to photo sequence mode.

  3. The capture system will transition the pin to KSSTATE_RUN and provide the driver with the number of buffers requested for photo sequence mode.

Control support requirements

Support for the following extended controls is required for a camera driver to support photo sequence mode.

Send comments about this topic to Microsoft