KSPROPERTY_CAMERACONTROL_EXTENDED_ZOOM

KSPROPERTY_CAMERACONTROL_EXTENDED_ZOOM is used to control digital zoom. It is defined in the KSPROPERTY_CAMERACONTROL_EXTENDED_PROPERTY enumeration and is used to get and set the zoom ratio and get zoom ranges from the driver. In Windows 10, this control is extended to also support smooth zoom.

Usage summary table

Scope Control Type

Version 1

Filter

Synchronous

The following flags can be placed in the KSCAMERA_EXTENDEDPROP_HEADER.Flags field to control smooth zoom vs. direct zoom. The default is defined by the driver.

#define KSCAMERA_EXTENDEDPROP_ZOOM_DEFAULT  0x0000000000000000
#define KSCAMERA_EXTENDEDPROP_ZOOM_DIRECT   0x0000000000000001
#define KSCAMERA_EXTENDEDPROP_ZOOM_SMOOTH   0x0000000000000002

If the driver supports this control, it must support KSCAMERA_EXTENDEDPROP_ZOOM_DEFAULT.

If the driver does not support digital zoom, the driver should not implement this control.

The following table describes the flag capabilities.

Flag Description

KSCAMERA_EXTENDEDPROP_ZOOM_DEFAULT

This is a mandatory capability. When specified, the driver will decide whether a direct zoom or smooth zoom should be applied and zoom to the target zoom factor specified in VideoProc.Value.ul accordingly. This flag is mutually exclusive with the DIRECT and SMOOTH flags.

KSCAMERA_EXTENDEDPROP_ZOOM_DIRECT

This is a mandatory capability. When specified, the driver will zoom to the target zoom factor specified in VideoProc.Value.ul as quickly as possible. This flag is mutually exclusive with the AUTO and SMOOTH flags.

KSCAMERA_EXTENDEDPROP_ZOOM_SMOOTH

This capability is optional. When specified, the driver will zoom to the target zoom factor specified in VideoProc.Value.ul gradually in a smooth manner. The number of frames takes to reach the specified zoom factor is up to the driver. This flag is mutually exclusive with the AUTO and DIRECT flags.

For each GET call, the driver must report the current zoom ranges allowed based on current configurations or setup.

The following table contains the descriptions and requirements for the KSCAMERA_EXTENDEDPROP_HEADER structure fields when using the KSPROPERTY_CAMERACONTROL_EXTENDED_ZOOM property.

Member Description

Version

This must be 1,

PinId

This must be KSCAMERA_EXTENDEDPROP_FILTERSCOPE (0xFFFFFFFF),

Size

This must be sizeof(KSCAMERA_EXTENDEDPROP_HEADER)+sizeof(KSCAMERA_EXTENDEDPROP_VIDEOPROCSETTING),

Result

This indicates the error results of the last SET operation. If no SET operation has taken place, this must be 0.

Capability

Must be a bitwise OR of the supported flags defined above.

Flags

This is a read/write field. This can be any one of the supported flags defined above.

The table below contains the descriptions and requirements for the KSCAMERA_EXTENDEDPROP_VIDEOPROCSETTING structure fields for the KSPROPERTY_CAMERACONTROL_EXTENDED_ZOOM property.

Member Description

Mode

This is unused and must be 0.

Min/Max/Step

The Min/Max/Step contains the minimum/maximum/increment of the zoom ratio supported by the camera driver in Q16 format. The driver must return these values for GET operations.

VideoProc

For SET operations, the VideoProc.Value.ul must specify the zoom ratio within the range described by the Min/Max/Step parameter. For GET operations, the driver must return the current zoom ratio.

Reserved

This is unused. This must be ignored by the driver.

This property control is synchronous and not cancelable.

Requirements

Header

Ksmedia.h