|
@@ -2219,13 +2219,20 @@ void CMediaControllerEntity::GetCameraBrightness(SpReqAnsContext<MediaService_Ge
|
|
|
int ibrightness = 0;
|
|
|
if (0 == capture_get_camera_brightness(&ibrightness, m_capture, m_nCameraErrorCode, ctx->Req.icameraid)) {
|
|
|
ctx->Ans.result = 0;
|
|
|
+ ctx->Ans.ibrightness = ibrightness;
|
|
|
+ ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
else {
|
|
|
ctx->Ans.result = -1;
|
|
|
+ if (0 == ctx->Req.icameraid) {
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA280D").setAPI(__FUNCTION__)("上摄像头故障,请联系厂商处理");
|
|
|
+ ctx->Answer(Error_EnvCamera, LOG_WARN_ENVCAMERA_ERROR);
|
|
|
+ }
|
|
|
+ else if (1 == ctx->Req.icameraid) {
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA280E").setAPI(__FUNCTION__)("下摄像头故障,请联系厂商处理");
|
|
|
+ ctx->Answer(Error_OptCamera, LOG_WARN_OPTCAMERA_ERROR);
|
|
|
+ }
|
|
|
}
|
|
|
- ctx->Ans.ibrightness = ibrightness;
|
|
|
-
|
|
|
- ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
|
|
|
void CMediaControllerEntity::SetCameraBrightness(SpReqAnsContext<MediaService_SetCameraBrightness_Req, MediaService_SetCameraBrightness_Ans>::Pointer ctx)
|
|
@@ -2233,12 +2240,19 @@ void CMediaControllerEntity::SetCameraBrightness(SpReqAnsContext<MediaService_Se
|
|
|
int ibrightness = ctx->Req.ibrightness;
|
|
|
if (0 == capture_set_camera_brightness(ibrightness, m_capture, m_nCameraErrorCode, ctx->Req.icameraid)) {
|
|
|
ctx->Ans.result = 0;
|
|
|
+ ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
else {
|
|
|
ctx->Ans.result = -1;
|
|
|
+ if (0 == ctx->Req.icameraid) {
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA280D").setAPI(__FUNCTION__)("上摄像头故障,请联系厂商处理");
|
|
|
+ ctx->Answer(Error_EnvCamera, LOG_WARN_ENVCAMERA_ERROR);
|
|
|
+ }
|
|
|
+ else if (1 == ctx->Req.icameraid) {
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA280E").setAPI(__FUNCTION__)("下摄像头故障,请联系厂商处理");
|
|
|
+ ctx->Answer(Error_OptCamera, LOG_WARN_OPTCAMERA_ERROR);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- ctx->Answer(Error_Succeed);
|
|
|
}
|
|
|
|
|
|
|