The Set method sets a specified property on the camera.
Copy
HRESULT Set( [in] long Property, [in] long lValue, [in] long Flags );Specifies the property to set, as a value from the CameraControlProperty enumeration.
lValue [in]Specifies the new value of the property.
Flags [in]Specifies the desired control setting, as a member of the CameraControlFlags enumeration.
If method succeeds, it returns S_OK. Otherwise it returns an HRESULT error code.
If the Flags parameter is CameraControl_Flags_Auto, the method ignores the lValue parameter.
//
The CameraControlProperty enumeration specifies a setting on a camera.
Copy
typedef enum tagCameraControlProperty { CameraControl_Pan, CameraControl_Tilt, CameraControl_Roll, CameraControl_Zoom, CameraControl_Exposure, CameraControl_Iris, CameraControl_Focus } CameraControlProperty;Specifies the camera's pan setting, in degrees. Values range from –180 to +180, with the default set to zero. Positive values are clockwise from the origin (the camera rotates clockwise when viewed from above), and negative values are counterclockwise from the origin.
CameraControl_TiltSpecifies the camera's tilt setting, in degrees. Values range from –180 to +180, with the default set to zero. Positive values point the imaging plane up, and negative values point the imaging plane down.
CameraControl_RollSpecifies the camera's roll setting, in degrees. Values range from –180 to +180, with the default set to zero. Positive values cause a clockwise rotation of the camera along the image-viewing axis, and negative values cause a counterclockwise rotation of the camera.
CameraControl_ZoomSpecifies the camera's zoom setting, in millimeters. Values range from 10 to 600, and the default is specific to the device.
CameraControl_ExposureSpecifies the exposure setting, in log base 2 seconds. In other words, for values less than zero, the exposure time is 1/2^n seconds, and for values zero or above, the exposure time is 2^n seconds. For example:
CameraControl_Iris
Specifies the camera's iris setting, in units of fstop* 10.
CameraControl_FocusSpecifies the camera's focus setting, as the distance to the optimally focused target, in millimeters. The range and default value are specific to the device.
For a given property, a particular device might implement only a subset of the listed range.
Header
Strmif.h (include Dshow.h)
/
The CameraControlFlags enumeration defines whether a camera setting is controlled manually or automatically.
Copy
typedef enum { CameraControl_Flags_Auto = 0x0001, CameraControl_Flags_Manual = 0x0002 } CameraControlFlags;The setting is controlled automatically.
CameraControl_Flags_ManualThe setting is controlled manually.