Addon.Webcam.GetVideoPropertySetting()

Description

Returns the basic settings of a video property.

Syntax

.Addon.Webcam.GetVideoPropertySetting(int iProperty);

Parameters

<int> iProperty: Specifies the property to query, allowed values are:

Allowed Values EnumDWT_VideoProperty enumeration Description
0 EnumDWT_VideoProperty.VP_BRIGHTNESS Specifies the brightness, also called the black level. For NTSC, the value is expressed in IRE units * 100. For non-NTSC sources, the units are arbitrary, with zero representing blanking and 10,000 representing pure white. Values range from –10,000 to 10,000.
1 EnumDWT_VideoProperty.VP_CONTRAST Specifies the contrast, expressed as gain factor * 100. Values range from zero to 10,000.
2 EnumDWT_VideoProperty.VP_HUE Specifies the hue, in degrees * 100. Values range from -180,000 to 180,000 (-180 to +180 degrees).
3 EnumDWT_VideoProperty.VP_SATURATION Specifies the saturation. Values range from 0 to 10,000.
4 EnumDWT_VideoProperty.VP_SHARPNESS Specifies the sharpness. Values range from 0 to 100.
5 EnumDWT_VideoProperty.VP_GAMMA Specifies the gamma, as gamma * 100. Values range from 1 to 500.
6 EnumDWT_VideoProperty.VP_COLORENABLE Specifies the color enable setting. The possible values are 0 (off) and 1 (on).
7 EnumDWT_VideoProperty.VP_WHITEBALANCE Specifies the white balance, as a color temperature in degrees Kelvin. The range of values depends on the device.
8 EnumDWT_VideoProperty.VP_BACKLIGHTCOMPENSATION Specifies the backlight compensation setting. Possible values are 0 (off) and 1 (on).
9 EnumDWT_VideoProperty.VP_GAIN Specifies the gain adjustment. Zero is normal. Positive values are brighter and negative values are darker. The range of values depends on the device.

Return value

An object of the type <VideoPropertySetting> is returned. Methods available in the object are

Data Type Method Name Description
<int> GetValue() Returns the current value of the property.
<bool> GetIfAuto() Returns a value that indicates whether the setting is controlled manually or automatically.

Example

DWObject.Addon.Webcam.SelectSource(document.getElementById("source").options[document.getElementById("source").
selectedIndex].text);
var _VideoPropertySetting = DWObject.Addon.Webcam.GetVideoPropertySetting(EnumDWT_VideoProperty.
VP_BRIGHTNESS); 

var _GetValue = _VideoPropertySetting.GetValue();
var _GetIfAuto = _VideoPropertySetting.GetIfAuto();

alert("GetValue: " + _GetValue + "; IfAuto: " + _GetIfAuto);

See also

Addon.Webcam.GetVideoPropertyMoreSetting

Addon.Webcam.SetVideoPropertySetting

Addon.Webcam.GetCameraControlPropertySetting

Addon.Webcam.SetCameraControlPropertySetting

Is this page helpful?

Leave a Reply

Your email address will not be published.