From ce81c8dd4f3d33b959585b40825a81ac146d93ba Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 7 Apr 2025 19:48:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=A6=81=E7=94=A8HDR=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index c01d3262..c23f8096 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -2986,7 +2986,7 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr characteristi std::vector > localFrames; localFrames.swap(pByteArrays.get()->byteArrays); - if (photoInfo.customHdr) + if (false /*photoInfo.customHdr*/) { std::vector imagePaths; std::vector exposureTimes; From ebe52ca252cbec4f70acdeeb226de0f2c2fd4f57 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 7 Apr 2025 19:48:46 +0800 Subject: [PATCH 2/4] Update version to 1.3.110 Based Core Version to 1.4.65 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 17b35490..ed04d0ce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { // 10,00,000 major-minor-build def AppMajorVersion = 1 def AppMinorVersion = 3 -def AppBuildNumber = 109 +def AppBuildNumber = 110 def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber From 6388002df2d690baeb71cb54ceefb18ce2d0025f Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 7 Apr 2025 21:21:54 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E6=8B=8D=E7=85=A7=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 46 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index c23f8096..24989f19 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1451,9 +1451,7 @@ IDevice::timer_uid_t CPhoneDevice::RegisterTimer(unsigned int timerType, unsigne bool CPhoneDevice::UnregisterTimer(IDevice::timer_uid_t uid) { - timer_t timer = (timer_t)uid; - int res = timer_delete(timer); - + bool existed = false; m_devLocker.lock(); std::map::iterator it = mTimers.find(uid); if (it != mTimers.end()) @@ -1461,11 +1459,21 @@ bool CPhoneDevice::UnregisterTimer(IDevice::timer_uid_t uid) delete it->second; mTimers.erase(it); m_devLocker.unlock(); - return true; + existed = true; + } + else + { + m_devLocker.unlock(); } - m_devLocker.unlock(); - return false; + if (existed) + { + ALOGI("UnregisterTimer: %lld", uid); + timer_t timer = (timer_t)uid; + int res = timer_delete(timer); + } + + return existed; } uint64_t CPhoneDevice::RequestWakelock(uint64_t timeout) @@ -1693,6 +1701,7 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c // strcpy(netPhotoInfo.interface, "eth0"); std::vector img; + cv::Mat rgb; bool netCaptureResult = false; for (int idx = 0; idx < 64; idx++) @@ -1730,18 +1739,14 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c 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 += " "; - } + std::string hexStr = ByteArrayToString(&img[0], img.size()); XYLOG(XYLOG_SEVERITY_DEBUG,"Img Size<1000, img=%s", hexStr.c_str()); } - break; + rgb = cv::imdecode(cv::Mat(img), cv::IMREAD_COLOR); + if (!rgb.empty()) + { + break; + } } std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } @@ -1749,11 +1754,6 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c ethernetPowerCtrl.reset(); XYLOG(XYLOG_SEVERITY_DEBUG, "Ethernet Power OFF"); - cv::Mat rgb; - if (netCaptureResult && !img.empty()) - { - rgb = cv::imdecode(cv::Mat(img), cv::IMREAD_COLOR); - } if (!rgb.empty()) { time_t takingTime = ts; @@ -3723,7 +3723,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat mat) #endif textSize = ft2->getTextSize(it->text, fontSize, thickness, &baseline); - XYLOG(XYLOG_SEVERITY_DEBUG, "%s font Size=%d height: %d baseline=%d", it->text.c_str(), fontSize, textSize.height, baseline); + // XYLOG(XYLOG_SEVERITY_DEBUG, "%s font Size=%d height: %d baseline=%d", it->text.c_str(), fontSize, textSize.height, baseline); if (it->alignment == OSD_ALIGNMENT_TOP_LEFT) { @@ -4023,7 +4023,7 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vectorgetTextSize(it->text, fontSize, thickness, &baseline); - XYLOG(XYLOG_SEVERITY_DEBUG, "%s font Size=%d height: %d baseline=%d", it->text.c_str(), fontSize, textSize.height, baseline); + // XYLOG(XYLOG_SEVERITY_DEBUG, "%s font Size=%d height: %d baseline=%d", it->text.c_str(), fontSize, textSize.height, baseline); if (it->alignment == OSD_ALIGNMENT_TOP_LEFT) { From 79dc4e8ec72b5366ae8e176a9954437a05b5c9ca Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 7 Apr 2025 21:25:22 +0800 Subject: [PATCH 4/4] Update version to 1.3.111 Based Core Version to 1.4.65 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index ed04d0ce..e6f1a8fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { // 10,00,000 major-minor-build def AppMajorVersion = 1 def AppMinorVersion = 3 -def AppBuildNumber = 110 +def AppBuildNumber = 111 def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber