描述:Camera默认不支持录像镜像,如果要实现,需要做客制化改动。
解决:客制化修改可以参考如下DIFF文件
Platform: MT6763
Branch: N1.MP16
--- a/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.BufOps.cpp
+++ b/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.BufOps.cpp
@@ -290,9 +290,18 @@ prepareAllTodoBuffers(sp<IImgBufQueue>const& rpBufQueue, sp<RecBufManager>const& (MUINTPTR)(pCameraImgBuf->getVirAddr()), (MUINTPTR)(pCameraImgBuf->getPhyAddr()), (MUINTPTR)(rpBufMgr->getBuf(i)->get_camera_memory_virAddr()));
-
int32_t i4FrontFlip = mpParamsMgr->getInt(CameraParameters::CAMSHOT_MIRROR_FRONT);
-
ImgBufQueNode node = ImgBufQueNode(pCameraImgBuf, ImgBufQueNode::eSTATUS_TODO);
-
if (i4FrontFlip == 1) {
-
if (mi4Rotation == 90 || mi4Rotation == 270)
-
node.setRotation(eTransform_FLIP_V);
-
else
-
node.setRotation(eTransform_FLIP_H);
-
}
//MY_LOGD("i4FrontFlip(%d),rotation(%d),mi4Rotation(%d)",i4FrontFlip,node.getRotation(),mi4Rotation);
//
-
ret = rpBufQueue->enqueProcessor(
-
ImgBufQueNode(pCameraImgBuf, ImgBufQueNode::eSTATUS_TODO));
- ret = rpBufQueue->enqueProcessor(node);
//
if(!ret)
{
diff --git a/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.cpp
b/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.cpp
old mode 100644
new mode 100755
index d3ee740..8f74f43
--- a/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.cpp
+++ b/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.cpp
@@ -130,6 +130,7 @@ RecordClient(sp<IParamsManager> pParamsMgr), mIsWaitBufBack(0), mpExtImgProc(NULL)
//
- , mi4Rotation(0)
//
{
MY_LOGD("+ this(%p)", this);
@@ -460,6 +461,13 @@ startRecording()
//MY_LOGD("+ current mIsRecStarted=%d", mIsRecStarted);
::android_atomic_write(1, &mIsRecStarted);
//
-
mi4Rotation = mpParamsMgr->getInt(CameraParameters::KEY_ROTATION);
-
if(mi4Rotation != 90 && mi4Rotation != 180 && mi4Rotation != 270 && mi4Rotation != 0)
{
-
MY_LOGE("wrong rotation(%d)",mi4Rotation);
-
mi4Rotation = 0;
-
}
-
//
mpParamsMgr->getVideoSize(&mi4RecWidth, &mi4RecHeight);
//
mTimeStart = systemTime();
diff --git a/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.h
b/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.h
old mode 100644
new mode 100755
index b85becc..b00d3ad
--- a/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.h
+++ b/mtkcam/middleware/v1/client/CamClient/Record/RecordClient.h
@@ -194,6 +194,7 @@ protected: //// Callback.
//
int32_t mi4CallbackRefCount; // Record callback reference count.
int64_t mi8CallbackTimeInMs; // The timestamp in millisecond of last preview callback.
- int32_t mi4Rotation;
//