Firefly开源社区
标题:
解决mipi摄像头只能打开一次的方案
[打印本页]
作者:
morning
时间:
2015-3-27 18:14
标题:
解决mipi摄像头只能打开一次的方案
打开/hardware/rk29/camera/CameraHal/CameraIspAdapter.cpp
@@ -171,6 +171,8 @@ void CameraIspAdapter::setupPreview(int width_sensor,int height_sensor,int previ
{
CamEngineWindow_t dcWin;
//when cts FOV ,don't crop
+ALOGE("=====width_sensor:%d,height_sensor:%d,preview_w:%d,preview:h:%d========",
+ width_sensor,height_sensor,preview_w,preview_h);
if((!mImgAllFovReq)&&((width_sensor*10/height_sensor) != (preview_w*10/preview_h))){
int ratio = ((width_sensor*10/preview_w) >= (height_sensor*10/preview_h))?(height_sensor*10/preview_h):(width
dcWin.width = ((ratio*preview_w/10) & ~0x1);
@@ -1363,6 +1365,14 @@ void CameraIspAdapter::loadSensor( const int cameraId)
m_camDevice->getPreferedSensorRes(&resReq);
m_camDevice->setSensorResConfig(resReq.resolution);
+
+ ALOGE("zhansb>>>:mCamDrvWidth=%d,mCamDrvHeight:%d,RES_W:%d,RES_H:%d",
+ mCamDrvWidth,mCamDrvHeight,
+ ISI_RES_W_GET(resReq.resolution), ISI_RES_H_GET(resReq.resolution));
+
+ mCamDrvWidth= ISI_RES_W_GET(resReq.resolution);
+ mCamDrvHeight= ISI_RES_H_GET(resReq.resolution);
+
setupPreview(mCamDrvWidth,mCamDrvHeight,DEFAULTPREVIEWWIDTH,DEFAULTPREVIEWHEIGHT,mZoomVal);
connectCamera();
mCamPreviewH = DEFAULTPREVIEWHEIGHT;
作者:
风之空响
时间:
2015-3-28 09:36
:lol赞,不错
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1