jxjajs 2 months ago
commit 357c58112f

@ -5,7 +5,7 @@ plugins {
// 10,00,000 major-minor-build
def AppMajorVersion = 1
def AppMinorVersion = 3
def AppBuildNumber = 109
def AppBuildNumber = 111
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber

@ -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<IDevice::timer_uid_t, TIMER_CONTEXT*>::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<uint8_t> 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;
@ -2986,7 +2986,7 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
std::vector<std::vector<uint8_t> > localFrames;
localFrames.swap(pByteArrays.get()->byteArrays);
if (photoInfo.customHdr)
if (false /*photoInfo.customHdr*/)
{
std::vector<std::string> imagePaths;
std::vector<float> exposureTimes;
@ -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 vector<ID
#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)
{

Loading…
Cancel
Save