/* RTSP plug-in defines */
var PLUGIN_ID = "RtspVapgCtrl";
var PLUGIN_NAME = "RtspVaPgDec.cab";
var PLUGIN_VER = "2,0,0,16";
var CLASS_ID = "361E6B79-4A69-4376-B0F2-3D1EBEE9D7E2";
var X_OFFSET = 10;
var Y_OFFSET = 30;
var X_OFFSET_CTRL = X_OFFSET;
var Y_OFFSET_CTRL = Y_OFFSET + 36;
var X_OFFSET_MD = X_OFFSET + 220;
var Y_OFFSET_MD = Y_OFFSET;
var CSET_TYPE = 101;
var CSET_HEIGHT = 200;
var STRETCH = "true";
var PLUGIN_LANG="EN";

/* snapshot offset */
var ss_width_offset = 40;
var ss_height_offset = 90;

/* video size definition */
var VIDEO_SIZE_HALF = '1';
var VIDEO_SIZE_HALFx2 = '2';
var VIDEO_SIZE_NORMAL = '3';
var VIDEO_SIZE_NORMALx2 = '4';
var VIDEO_SIZE_DOUBLE = '5';
var VIDEO_SIZE_RESOLUTION = '256';

/* only for CMOS */
var BaseWidth = 320;
var BaseHeight = 240;
var Width, Height;

/* decided the rendered plug-in and snapshot size */
switch(VideoSize)
{
case VIDEO_SIZE_NORMALx2:
case VIDEO_SIZE_DOUBLE:
	Width = BaseWidth * 2;
	Height = BaseHeight * 2;
	break;
case VIDEO_SIZE_RESOLUTION:
    VideoResolution.search(/x/);
	Width = parseInt(RegExp.leftContext);
	Height = parseInt(RegExp.rightContext);
	if ((Width < BaseWidth) || (Height < BaseHeight))
	{
		Width = BaseWidth;
		Height = BaseHeight;
		STRETCH = "false";
	}
    break;
default:
	Width = BaseWidth;
	Height = BaseHeight;
	break;
}

