modify abnormal state

Signed-off-by: chen0088 <chenmenghuan3@huawei.com>
This commit is contained in:
chen0088
2022-06-22 10:13:58 +08:00
parent c7241615e6
commit 32475cf12e
2 changed files with 12 additions and 12 deletions
@@ -116,7 +116,7 @@ int32_t DcameraSinkHidumper::GetLocalCameraNumber(std::string& result)
int32_t DcameraSinkHidumper::GetOpenedCameraInfo(std::string& result)
{
DHLOGI("GetOpenedCameraInfo Dump.");
result.append("OpenedCamera\n");
result.append("OpenedCamera:\n");
std::vector<std::string> camIds = camDumpInfo_.camIds;
for (size_t i = 0; i < camIds.size(); i++) {
result.append(camIds[i]);
@@ -132,21 +132,21 @@ int32_t DcameraSourceHidumper::GetCurrentStateInfo(std::string& result)
std::map<std::string, int32_t> devState = camDumpInfo_.curState;
std::string deviceId("");
int32_t camState = 0;
result.append("CameraId\tState\n");
for (auto it = devState.begin(); it != devState.end(); it++) {
deviceId = it->first;
camState = it->second;
DHLOGI("GetCurrentStateInfo camState is %d.", camState);
auto state = STATE_MAP.find(camState);
std::string curState("");
if (state != STATE_MAP.end()) {
curState = state->second;
}
result.append(deviceId)
.append("\t")
.append(curState)
.append("\n");
}
DHLOGI("GetCurrentStateInfo camState is %d.", camState);
auto state = STATE_MAP.find(camState);
std::string curState("");
if (state != STATE_MAP.end()) {
curState = state->second;
}
result.append("CameraId ")
.append("State\n")
.append(deviceId)
.append(" ")
.append(curState);
return DCAMERA_OK;
}