From 5698395f015228523f4a5103aa59cf11d2c959b0 Mon Sep 17 00:00:00 2001 From: chen0088 Date: Thu, 17 Oct 2024 11:12:42 +0800 Subject: [PATCH] modify Signed-off-by: chen0088 --- services/cameraservice/base/src/dcamera_capture_info_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp b/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp index 862620c8..97206641 100644 --- a/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp +++ b/services/cameraservice/base/src/dcamera_capture_info_cmd.cpp @@ -52,6 +52,7 @@ int32_t DCameraCaptureInfoCmd::Marshal(std::string& jsonStr) cJSON_AddNumberToObject(captureInfo, "StreamType", capture->streamType_); cJSON *captureSettings = cJSON_CreateArray(); CHECK_NULL_FREE_RETURN(captureSettings, DCAMERA_BAD_VALUE, rootValue); + cJSON_AddItemToObject(captureInfo, "CaptureSettings", captureSettings); for (auto settingIter = capture->captureSettings_.begin(); settingIter != capture->captureSettings_.end(); settingIter++) { cJSON *captureSetting = cJSON_CreateObject(); @@ -60,7 +61,6 @@ int32_t DCameraCaptureInfoCmd::Marshal(std::string& jsonStr) cJSON_AddStringToObject(captureSetting, "SettingValue", (*settingIter)->value_.c_str()); cJSON_AddItemToArray(captureSettings, captureSetting); } - cJSON_AddItemToObject(captureInfo, "CaptureSettings", captureSettings); } cJSON_AddNumberToObject(rootValue, "mode", sceneMode_); -- Gitee