Signed-off-by: hwzhangchuang <zhangchuang.zhang@huawei.com>
This commit is contained in:
hwzhangchuang
2023-12-11 22:25:11 +08:00
parent 423cdbaae5
commit 9bdf65eba9
6 changed files with 0 additions and 17 deletions
-4
View File
@@ -182,8 +182,6 @@ size_t InputHub::GetEvents(RawEvent *buffer, size_t bufferSize)
GetAnonyString(device->identifier.descriptor).c_str());
continue;
}
DHLOGD("shared device dhId: %s, name: %s", GetAnonyString(device->identifier.descriptor).c_str(),
device->identifier.name.c_str());
if (eventItem.events & EPOLLIN) {
event += CollectEvent(event, capacity, device, readBuffer, count);
@@ -1115,8 +1113,6 @@ InputHub::Device* InputHub::GetSupportDeviceByFd(int fd)
std::lock_guard<std::mutex> deviceLock(devicesMutex_);
for (const auto &[id, device] : devices_) {
if (device != nullptr && device->fd == fd) {
DHLOGD("GetSupportDeviceByFd device fd: %d, path: %s, dhId: %s, classes=0x%x", device->fd,
device->path.c_str(), GetAnonyString(device->identifier.descriptor).c_str(), device->classes);
return device.get();
}
}
@@ -198,7 +198,6 @@ int32_t DistributedInputSinkTransport::RespLatency(const int32_t sessionId, std:
return ERR_DH_INPUT_SERVER_SINK_TRANSPORT_RESP_LATENCY_FAIL;
}
DHLOGD("RespLatency sessionId: %d, smsg:%s.", sessionId, SetAnonyId(smsg).c_str());
return DH_SUCCESS;
}
@@ -485,10 +485,8 @@ void DistributedInputNodeManager::InjectEvent()
injectQueue_.pop();
}
DHLOGD("process event, inject queue size: %zu", injectQueue_.size());
ProcessInjectEvent(events);
}
DHLOGD("end");
}
void DistributedInputNodeManager::RegisterInjectEventCb(sptr<ISessionStateCallback> callback)
@@ -173,15 +173,11 @@ bool VirtualDevice::SetUp(const InputDevice &inputDevice, const std::string &dev
bool VirtualDevice::InjectInputEvent(const input_event &event)
{
DHLOGI("InjectInputEvent %d", fd_);
if (write(fd_, &event, sizeof(event)) < static_cast<ssize_t>(sizeof(event))) {
DHLOGE("could not inject event, removed? (fd: %d", fd_);
return false;
}
RecordEventLog(event);
DHLOGI("InjectInputEvent end\n");
return true;
}
@@ -651,8 +651,6 @@ int32_t DistributedInputSourceTransport::LatencyCount(const std::string &deviceI
return ERR_DH_INPUT_SERVER_SOURCE_TRANSPORT_LATENCY_FAIL;
}
DHLOGD("LatencyCount deviceId:%s, sessionId: %d, smsg:%s.",
GetAnonyString(deviceId).c_str(), sessionId, SetAnonyId(smsg).c_str());
return DH_SUCCESS;
}
@@ -662,7 +660,6 @@ void DistributedInputSourceTransport::StartLatencyCount(const std::string &devic
if (ret != 0) {
DHLOGE("StartLatencyCount setname failed.");
}
DHLOGI("start");
while (isLatencyThreadRunning_.load()) {
if (sendNum_ >= INPUT_LATENCY_DELAY_TIMES) {
uint64_t latency = (uint64_t)(deltaTimeAll_ / 2 / INPUT_LATENCY_DELAY_TIMES);
@@ -679,7 +676,6 @@ void DistributedInputSourceTransport::StartLatencyCount(const std::string &devic
sendNum_ += 1;
usleep(INPUT_LATENCY_DELAYTIME_US);
}
DHLOGI("end");
}
void DistributedInputSourceTransport::StartLatencyThread(const std::string &deviceId)
@@ -1095,7 +1091,6 @@ void DistributedInputSourceTransport::NotifyReceivedEventRemoteInput(int32_t ses
void DistributedInputSourceTransport::CalculateLatency(int32_t sessionId, const nlohmann::json &recMsg)
{
DHLOGD("OnBytesReceived cmdType is TRANS_SINK_MSG_LATENCY.");
std::string deviceId = DistributedInputTransportBase::GetInstance().GetDevIdBySessionId(sessionId);
if (deviceId.empty()) {
DHLOGE("OnBytesReceived cmdType is TRANS_SINK_MSG_LATENCY, deviceId is error.");
@@ -467,7 +467,6 @@ void DistributedInputTransportBase::OnBytesReceived(int32_t sessionId, const voi
}
std::string message(buf, buf + dataLen);
DHLOGD("OnBytesReceived sessionId: %d, message:%s.", sessionId, SetAnonyId(message).c_str());
HandleSession(sessionId, message);
free(buf);