增加照片长度有误时的日志

onereq
XI.CHEN 2 months ago
parent 06842bca13
commit 9170d2bec0

@ -1728,6 +1728,19 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
if (netCaptureResult && !img.empty())
{
XYLOG(XYLOG_SEVERITY_INFO, "NetCapture Succeeded PHOTOID=%u Img Size=%u", localPhotoInfo.photoId, (uint32_t)img.size());
if(img.size() <= 1000)
{
std::string hexStr;
const size_t maxBytes = 128;
for (size_t i = 0; i < std::min(img.size(), maxBytes); ++i)
{
char buf[3];
snprintf(buf, sizeof(buf), "%02X", img[i]);
hexStr += buf;
hexStr += " ";
}
XYLOG(XYLOG_SEVERITY_DEBUG,"Img Size<1000, img=%s", hexStr.c_str());
}
break;
}
std::this_thread::sleep_for(std::chrono::milliseconds(1000));

Loading…
Cancel
Save