|
|
|
@ -32,6 +32,7 @@
|
|
|
|
|
#include <media/NdkImage.h>
|
|
|
|
|
#include <mat.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#ifdef USING_HDRPLUS
|
|
|
|
|
#include <hdrplus/hdrplus_pipeline.h>
|
|
|
|
@ -1661,7 +1662,7 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(256));
|
|
|
|
|
|
|
|
|
|
std::string ip = GetIpStr(localPhotoInfo.ip);
|
|
|
|
|
VendorCtrl* vendorCtrl = MakeVendorCtrl(localPhotoInfo.vendor, localPhotoInfo.channel, ip, localPhotoInfo.userName, localPhotoInfo.password, netHandle);
|
|
|
|
|
std::unique_ptr<VendorCtrl> vendorCtrl(MakeVendorCtrl(localPhotoInfo.vendor, localPhotoInfo.channel, ip, localPhotoInfo.userName, localPhotoInfo.password, netHandle, false));
|
|
|
|
|
|
|
|
|
|
NET_PHOTO_INFO netPhotoInfo = { netHandle, 0 };
|
|
|
|
|
if (localPhotoInfo.vendor == 1)
|
|
|
|
@ -1866,8 +1867,8 @@ bool CPhoneDevice::TakeVideoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(256));
|
|
|
|
|
|
|
|
|
|
std::string ip = GetIpStr(localPhotoInfo.ip);
|
|
|
|
|
VendorCtrl* vendorCtrl = MakeVendorCtrl(localPhotoInfo.vendor, localPhotoInfo.channel, ip, localPhotoInfo.userName, localPhotoInfo.password, netHandle);
|
|
|
|
|
if (vendorCtrl == NULL)
|
|
|
|
|
std::unique_ptr<VendorCtrl> vendorCtrl(MakeVendorCtrl(localPhotoInfo.vendor, localPhotoInfo.channel, ip, localPhotoInfo.userName, localPhotoInfo.password, netHandle, false));
|
|
|
|
|
if (!vendorCtrl)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Vendor(%u) not Supported CH=%u PR=%X PHOTOID=%u", (uint32_t)localPhotoInfo.vendor, (uint32_t)localPhotoInfo.channel, (unsigned int)localPhotoInfo.preset, localPhotoInfo.photoId);
|
|
|
|
|
TakePhotoCb(0, localPhotoInfo, "", 0);
|
|
|
|
@ -1999,7 +2000,7 @@ 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);
|
|
|
|
|
VendorCtrl* vendorCtrl = MakeVendorCtrl(photoInfo.vendor, photoInfo.channel, ip, photoInfo.userName, photoInfo.password, netHandle, true);
|
|
|
|
|
if (vendorCtrl == NULL)
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
@ -5186,7 +5187,7 @@ void CPhoneDevice::SetStaticIp()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VendorCtrl* CPhoneDevice::MakeVendorCtrl(int vendor, uint8_t channel, const std::string& ip, const std::string& userName, const std::string& password, net_handle_t netHandle)
|
|
|
|
|
VendorCtrl* CPhoneDevice::MakeVendorCtrl(int vendor, uint8_t channel, const std::string& ip, const std::string& userName, const std::string& password, net_handle_t netHandle, bool syncTime)
|
|
|
|
|
{
|
|
|
|
|
VendorCtrl* vendorCtrl = NULL;
|
|
|
|
|
switch (vendor)
|
|
|
|
@ -5198,15 +5199,11 @@ VendorCtrl* CPhoneDevice::MakeVendorCtrl(int vendor, uint8_t channel, const std:
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
// Yu Shi
|
|
|
|
|
vendorCtrl = new YuShiCtrl(ip, userName, password, channel, netHandle);
|
|
|
|
|
vendorCtrl = new YuShiCtrl(ip, userName, password, channel, netHandle, syncTime);
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
// Hang Yu - New
|
|
|
|
|
vendorCtrl = new HangYuCtrl(ip, userName, password, channel, netHandle);
|
|
|
|
|
}
|
|
|
|
|
if (vendorCtrl != NULL)
|
|
|
|
|
{
|
|
|
|
|
vendorCtrl->UpdateTime(time(NULL));
|
|
|
|
|
vendorCtrl = new HangYuCtrl(ip, userName, password, channel, netHandle, syncTime);
|
|
|
|
|
}
|
|
|
|
|
return vendorCtrl;
|
|
|
|
|
}
|
|
|
|
|