|
|
@ -2042,11 +2042,11 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
|
|
|
|
|
|
|
|
|
|
|
|
if (photoInfo.cameraType == CAM_TYPE_MIPI)
|
|
|
|
if (photoInfo.cameraType == CAM_TYPE_MIPI)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
powerCtrlPtr = std::shared_ptr<PowerControl>(new CameraPowerCtrl(mPhotoInfo.closeDelayTime));
|
|
|
|
powerCtrlPtr = std::shared_ptr<PowerControl>(new CameraPowerCtrl(0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (photoInfo.cameraType == CAM_TYPE_USB)
|
|
|
|
else if (photoInfo.cameraType == CAM_TYPE_USB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
powerCtrlPtr = std::shared_ptr<PowerControl>(new UsbCameraPowerCtrl(mPhotoInfo.closeDelayTime));
|
|
|
|
powerCtrlPtr = std::shared_ptr<PowerControl>(new UsbCameraPowerCtrl(0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (photoInfo.cameraType == CAM_TYPE_NET)
|
|
|
|
else if (photoInfo.cameraType == CAM_TYPE_NET)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2528,18 +2528,17 @@ void CPhoneDevice::CloseCamera2(CPhoneDevice::CPhoneCamera* camera, unsigned int
|
|
|
|
{
|
|
|
|
{
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "TP: Start CloseCamera PHOTOID=%u", photoId);
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "TP: Start CloseCamera PHOTOID=%u", photoId);
|
|
|
|
|
|
|
|
|
|
|
|
// std::this_thread::sleep_for(std::chrono::milliseconds(16));
|
|
|
|
|
|
|
|
if (camera != NULL)
|
|
|
|
if (camera != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
camera->close();
|
|
|
|
camera->close();
|
|
|
|
delete camera;
|
|
|
|
delete camera;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "TP: Will Turn Off Power PHOTOID=%u", photoId);
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
auto powerCtrl = m_powerCtrlPtr;
|
|
|
|
m_powerCtrlPtr.reset();
|
|
|
|
m_powerCtrlPtr.reset();
|
|
|
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "TP: End Turn Off Power PHOTOID=%u", photoId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "TP: CloseCamera PHOTOID=%u", photoId);
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "TP: CloseCamera PHOTOID=%u", photoId);
|
|
|
|
|
|
|
|
|
|
|
|