!24 Camera代码优化

Merge pull request !24 from 杨帅/master
This commit is contained in:
openharmony_ci
2021-09-07 01:08:33 +00:00
committed by Gitee
3 changed files with 3 additions and 7 deletions
-1
View File
@@ -27,7 +27,6 @@ typedef enum {
CAMERA_SERVER_CREATE_CAMERA,
CAMERA_SERVER_CLOSE_CAMERA,
CAEMRA_SERVER_SET_CAMERA_CONFIG,
CAEMRA_SERVER_SET_FRAME_CONFIG,
CAMERA_SERVER_TRIGGER_SINGLE_CAPTURE,
CAMERA_SERVER_TRIGGER_LOOPING_CAPTURE,
CAMERA_SERVER_STOP_LOOPING_CAPTURE,
+2 -2
View File
@@ -37,7 +37,6 @@
using namespace OHOS;
using namespace OHOS::Media;
using namespace std;
#define DELAY_TIME_ONE_FRAME 40000
/** Indicates that the current frame is an Instantaneous Decoder Refresh (IDR) frame. */
const int32_t KEY_IS_SYNC_FRAME = 1;
@@ -47,6 +46,7 @@ const int32_t KEY_TIME_US = 2;
const int32_t IMAGE_WIDTH = 3; // "DATA_PIX_FORMAT"
const int32_t IMAGE_HEIGHT = 4; // "DATA_PIX_FORMAT"
const int32_t IMAGE_SIZE = 5; // "DATA_PIX_FORMAT"
const int32_t DELAY_TIME_ONE_FRAME = 30000;
namespace OHOS {
namespace Media {
@@ -799,4 +799,4 @@ int32_t CameraDevice::SetCameraConfig()
return MEDIA_OK;
}
} // namespace Media
} // namespace OHOS
} // namespace OHOS
+1 -4
View File
@@ -55,9 +55,6 @@ void CameraServer::CameraServerRequestHandle(int funcId, void *origin, IpcIo *re
case CAEMRA_SERVER_SET_CAMERA_CONFIG:
CameraServer::GetInstance()->SetCameraConfig(req, reply);
break;
case CAEMRA_SERVER_SET_FRAME_CONFIG:
CameraServer::GetInstance()->SetFrameConfig(req, reply);
break;
case CAMERA_SERVER_TRIGGER_LOOPING_CAPTURE:
CameraServer::GetInstance()->TriggerLoopingCapture(req, reply);
break;
@@ -253,7 +250,7 @@ void CameraServer::TriggerLoopingCapture(IpcIo *req, IpcIo *reply)
delete fc;
}
void CameraServer::TriggerSingleCapture(IpcIo *req, IpcIo *reply)
void CameraServer::TriggerSingleCapture(IpcIo *req, IpcIo *reply)
{
size_t sz;
string cameraId((const char *)(IpcIoPopString(req, &sz)));