mirror of
https://github.com/openharmony/distributed_camera.git
synced 2026-07-19 16:43:57 -04:00
modify abnormal state
Signed-off-by: chen0088 <chenmenghuan3@huawei.com>
This commit is contained in:
@@ -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]);
|
||||
|
||||
+11
-11
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user