Ejemplo n.º 1
0
void CdrCamera::setPicResolution(int width,int height)
{
	HerbCamera::Parameters params;
	
	if(mHC == NULL) {
		db_error("mHC is NULL\n");
		return;
	}
	mHC->getParameters(&params);
	
	params.setPictureSize(width,height);
	mHC->setParameters(&params);
}
Ejemplo n.º 2
0
void CdrCamera::setPicResolution(PicResolution_t quality)
{
	HerbCamera::Parameters params;
	unsigned int w = 0;
	unsigned int h = 0;
	if(mHC == NULL) {
		db_error("mHC is NULL\n");
		return;
	}
	mHC->getParameters(&params);
	switch(quality) {
	case PicResolution2M:
		{
			w = 1600;
			h = 1200;
		}
		break;
	case PicResolution5M:
		{
			w = 3200;
			h = 1800;
		}
		break;
	case PicResolution8M:
		{
			w = 3840;
			h = 2160;
		}
		break;
	case PicResolution12M:
		{
			w = 4000;
			h = 3000;
		}
		break;
	default:
		{
			db_msg("not support PicResolution:%d\n", quality);
			return ;
		}
		break;
	}
	#ifdef BACK_PICTURE_SOURCE_MODE
		if (mId == CAM_UVC) {
			w = REAL_UVC_W;
			h = REAL_UVC_H;
		}
	#endif
	params.setPictureSize(w, h);
	mHC->setParameters(&params);
}