void CCameraConfig::initParameters()
{	
	if (mhKeyFile == 0)
	{
		ALOGW("invalid camera config file hadle");
		return ;
	}

	INIT_PARAMETER(PREVIEW_SIZE, PreviewSize)
	INIT_PARAMETER(PICTURE_SIZE, PictureSize)
	INIT_PARAMETER(FLASH_MODE, FlashMode)
	INIT_PARAMETER(COLOR_EFFECT, ColorEffect)
	INIT_PARAMETER(FRAME_RATE, FrameRate)
	INIT_PARAMETER(FOCUS_MODE, FocusMode)
	INIT_PARAMETER(SCENE_MODE, SceneMode)
	INIT_PARAMETER(WHITE_BALANCE, WhiteBalance)

	// exposure compensation
	memcpy(mUsedExposureCompensation, "0\0", 2);
	memset(mMaxExposureCompensation, 0, 4);
	memset(mMinExposureCompensation, 0, 4);
	memset(mStepExposureCompensation, 0, 4);
	memset(mDefaultExposureCompensation, 0, 4);
	if (readKey(kUSED_EXPOSURE_COMPENSATION, mUsedExposureCompensation))	
	{
		if (usedKey(mUsedExposureCompensation)) 
		{
			readKey(kMIN_EXPOSURE_COMPENSATION, mMinExposureCompensation);
			readKey(kMAX_EXPOSURE_COMPENSATION, mMaxExposureCompensation);
			readKey(kSTEP_EXPOSURE_COMPENSATION, mStepExposureCompensation);
			readKey(kDEFAULT_EXPOSURE_COMPENSATION, mDefaultExposureCompensation);
		}
		else
		{
			ALOGV("\"%s\" not support", kUSED_EXPOSURE_COMPENSATION);
		}
 	}

	// zoom
	memcpy(mUsedZoom, "0\0", 2);
	memset(mZoomSupported, 0, 8);
	memset(mSmoothZoomSupported, 0, 4);
	memset(mZoomRatios, 0, KEY_LENGTH);
	memset(mMaxZoom, 0, 4);
	memset(mDefaultZoom, 0, 4);
	if (readKey(kUSED_ZOOM, mUsedZoom))	
	{
		if (usedKey(mUsedZoom)) 
		{
			readKey(kZOOM_SUPPORTED, mZoomSupported);
			readKey(kSMOOTH_ZOOM_SUPPORTED, mSmoothZoomSupported);
			readKey(kZOOM_RATIOS, mZoomRatios);
			readKey(kMAX_ZOOM, mMaxZoom);
			readKey(kDEFAULT_ZOOM, mDefaultZoom);
		}
		else
		{
			ALOGV("\"%s\" not support", kUSED_ZOOM);
		}
 	}
}
Ejemplo n.º 2
0
Invocation::Invocation(
                     const std::string name
                   , const RefAny& p1
                   , const RefAny& p2
                   , const RefAny& p3
                   , const RefAny& p4
                   , const RefAny& p5
                   , const RefAny& p6
                   , const RefAny& p7
                   , const RefAny& p8
                   , const RefAny& p9
                   , const RefAny& p10
                   , const RefAny& p11
                   , const RefAny& p12
   )
   : This(new InvocationImpl(name))
{
    INIT_PARAMETER(1);
    INIT_PARAMETER(2);
    INIT_PARAMETER(3);
    INIT_PARAMETER(4);
    INIT_PARAMETER(5);
    INIT_PARAMETER(6);
    INIT_PARAMETER(7);
    INIT_PARAMETER(8);
    INIT_PARAMETER(9);
    INIT_PARAMETER(10);
    INIT_PARAMETER(11);
    INIT_PARAMETER(12);
}