|
|
|
@ -1989,8 +1989,8 @@ bool CPhoneDevice::StartPushStreaming(IDevice::PHOTO_INFO& photoInfo, const std:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string ip = GetIpStr(photoInfo.ip);
|
|
|
|
|
VendorCtrl* vendorCtrl = MakeVendorCtrl(photoInfo.vendor, photoInfo.channel, ip, photoInfo.userName, photoInfo.password, netHandle, true);
|
|
|
|
|
if (vendorCtrl == NULL)
|
|
|
|
|
std::unique_ptr<VendorCtrl> vendorCtrl (MakeVendorCtrl(photoInfo.vendor, photoInfo.channel, ip, photoInfo.userName, photoInfo.password, netHandle, true));
|
|
|
|
|
if (!vendorCtrl)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Vendor(%u) not Supported CH=%u PR=%X PHOTOID=%u", (uint32_t)photoInfo.vendor, (uint32_t)photoInfo.channel, (unsigned int)photoInfo.preset, photoInfo.photoId);
|
|
|
|
|
TakePhotoCb(0, photoInfo, "", 0);
|
|
|
|
@ -2376,13 +2376,20 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
|
|
|
|
|
osds.swap(mOsds);
|
|
|
|
|
IDevice::PHOTO_INFO localPhotoInfo = mPhotoInfo;
|
|
|
|
|
|
|
|
|
|
std::thread t([localPhotoInfo, path, pThis, osds, powerCtrlPtr]() mutable
|
|
|
|
|
{
|
|
|
|
|
pThis->TakePhotoCb(1, localPhotoInfo, "", 0);
|
|
|
|
|
pThis->StartPushStreaming(localPhotoInfo, path, osds, powerCtrlPtr);
|
|
|
|
|
});
|
|
|
|
|
if(mPhotoInfo.cameraType == CAM_TYPE_PLZ)
|
|
|
|
|
{
|
|
|
|
|
pThis->TakePhotoCb(1, localPhotoInfo, "", 0);
|
|
|
|
|
m_ptzController->AddPhotoCommand(localPhotoInfo, path, osds);
|
|
|
|
|
}else
|
|
|
|
|
{
|
|
|
|
|
std::thread t([localPhotoInfo, path, pThis, osds, powerCtrlPtr]() mutable
|
|
|
|
|
{
|
|
|
|
|
pThis->TakePhotoCb(1, localPhotoInfo, "", 0);
|
|
|
|
|
pThis->StartPushStreaming(localPhotoInfo, path, osds, powerCtrlPtr);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
t.detach();
|
|
|
|
|
t.detach();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (mPhotoInfo.mediaType == 1 && (mPhotoInfo.cameraType == CAM_TYPE_PLZ))
|
|
|
|
|
{
|
|
|
|
|